Sindbad~EG File Manager

Current Path : /home/atdotid/new.aturtoko.id/
Upload File :
Current File : /home/atdotid/new.aturtoko.id/main.6c9f7627902c4fd0c74f.js.map

{"version":3,"mappings":"qGAAA,eAGA,mCACA,8CACA,gCACAA,IAGAC,eACAA,cACAA,WACAC,kWCIA,IAAIC,EAAO,KACX,cACI,OAAOA,EAKX,YAA2BC,GAClBD,IACDA,EAAOC,GAUf,SAkBA,MAAMC,GAAW,IAAIC,MAAe,qBA+B9BC,QAAN,QACIC,UAAUC,GACN,MAAM,IAAIC,MAAM,oBAGxBH,SAAiBI,UAAO,SAAkCC,GAAK,OAAO,IAAKA,GAAKL,IAChFA,EAAiBM,cAAQC,OAAmB,CAAEC,QAASC,EAA4BC,MAAOV,EAAkBW,WAAY,aANlHX,MAeN,aACI,SAAOY,OAASC,GAQpB,MAAMC,EAAuB,IAAIf,MAAe,4BAM1Cc,QAAN,gBAAsCb,EAClCe,YAAYC,GACRC,QACAC,KAAKF,KAAOA,EACZE,KAAKC,QAITA,QACID,KAAKE,SAAWC,OAAOD,SACvBF,KAAKI,SAAWD,OAAOE,QAE3BC,qBACI,OAAOC,KAASC,YAAYR,KAAKF,MAErCW,WAAWC,GACP,MAAMP,EAASI,KAASI,qBAAqBX,KAAKF,KAAM,UACxDK,SAAOS,iBAAiB,WAAYF,GAAI,GACjC,IAAMP,EAAOU,oBAAoB,WAAYH,GAExDI,aAAaJ,GACT,MAAMP,EAASI,KAASI,qBAAqBX,KAAKF,KAAM,UACxDK,SAAOS,iBAAiB,aAAcF,GAAI,GACnC,IAAMP,EAAOU,oBAAoB,aAAcH,cAGtD,OAAOV,KAAKE,SAASa,oBAGrB,OAAOf,KAAKE,SAASc,wBAGrB,OAAOhB,KAAKE,SAASe,oBAGrB,OAAOjB,KAAKE,SAASgB,oBAGrB,OAAOlB,KAAKE,SAASiB,sBAGrB,OAAOnB,KAAKE,SAASkB,kBAGrB,OAAOpB,KAAKE,SAASmB,kBAEZC,GACTtB,KAAKE,SAAS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InjectionToken","PlatformLocation","historyGo","relativePosition","Error","ɵfac","t","ɵprov","ɵɵdefineInjectable","factory","useBrowserPlatformLocation","token","providedIn","ɵɵinject","BrowserPlatformLocation","LOCATION_INITIALIZED","constructor","_doc","super","this","_init","location","window","_history","history","getBaseHrefFromDOM","getDOM","getBaseHref","onPopState","fn","getGlobalEventTarget","addEventListener","removeEventListener","onHashChange","href","protocol","hostname","port","pathname","search","hash","newPath","pushState","state","title","url","supportsState","replaceState","forward","back","go","getState","ɵngcc0","createBrowserPlatformLocation","start","end","length","slashes","endsWith","startsWith","substring","match","pathEndIdx","index","slice","params","LocationStrategy","provideLocationStrategy","platformLocation","PathLocationStrategy","origin","APP_BASE_HREF","_platformLocation","_removeListenerFns","_baseHref","ngOnDestroy","pop","push","prepareExternalUrl","internal","joinWithSlash","path","includeHash","normalizeQueryParams","queryParams","externalUrl","_a","_b","call","HashLocationStrategy","Location","platformStrategy","_subject","EventEmitter","_urlChangeListeners","_platformStrategy","browserBaseHref","stripTrailingSlash","_stripIndexHtml","ev","emit","type","normalize","isCurrentPathEqualTo","query","baseHref","_stripBaseHref","_notifyUrlChangeListeners","onUrlChange","_urlChangeSubscription","subscribe","v","forEach","onNext","onThrow","onReturn","next","error","complete","createLocation","replace","NumberFormatStyle","Decimal","Percent","Currency","Scientific","Plural","Zero","One","Two","Few","Many","Other","FormStyle","Format","Standalone","TranslationWidth","Narrow","Abbreviated","Wide","Short","FormatWidth","Medium","Long","Full","NumberSymbol","Group","List","PercentSign","PlusSign","MinusSign","Exponential","SuperscriptingExponent","PerMille","Infinity","NaN","TimeSeparator","CurrencyDecimal","CurrencyGroup","locale","formStyle","width","data","ɵfindLocaleData","amPm","getLastDefinedValue","ɵLocaleDataIndex","days","months","symbol","res","getLocalePluralCase","ɵgetLocalePluralCase","i","time","h","m","split","hours","minutes","ISO8601_DATE_REGEX","NAMED_FORMATS","DATE_FORMATS_SPLIT","ZoneWidth","ShortGMT","Extended","DateType","FullYear","Month","Date","Hours","Minutes","Seconds","FractionalSeconds","Day","TranslationType","DayPeriods","Days","Months","Eras","value","format","timezone","date","isDate","isNaN","trim","test","y","d","map","val","createDate","parsedNb","parseFloat","tzHour","tzMin","dateSetter","setUTCFullYear","setFullYear","timeSetter","setUTCHours","setHours","Number","s","ms","Math","floor","isoStringToDate","toDate","getNamedFormat","parts","exec","concat","part","dateTimezoneOffset","getTimezoneOffset","timezoneToOffset","reverse","getTime","setMinutes","getMinutes","addDateMinutes","convertTimezoneToLocal","text","dateFormatter","DATE_FORMATS","formatter","dateStrGetter","dateGetter","weekNumberingYearGetter","weekGetter","timeZoneGetter","getDateFormatter","year","month","newDate","localeId","getLocaleId","formatValue","getLocaleDateFormat","getLocaleTimeFormat","shortTime","shortDate","formatDateTime","getLocaleDateTimeFormat","mediumTime","mediumDate","longTime","longDate","fullTime","fullDate","str","opt_values","key","num","digits","minusSign","negWrap","neg","strNum","String","substr","name","size","offset","getFullYear","getMonth","getDate","getHours","getSeconds","getMilliseconds","getDay","getDatePart","milliseconds","strMs","formatFractionalSeconds","localeMinus","getLocaleNumberSymbol","padNumber","form","extended","getLocaleMonthNames","getLocaleDayNames","currentHours","currentMinutes","rules","checkFullData","rule","extractTime","getLocaleExtraDayPeriodRules","dayPeriods","getLocaleExtraDayPeriods","findIndex","Array","isArray","from","to","afterFrom","beforeTo","getLocaleDayPeriods","getLocaleEraNames","getDateTranslation","zone","ceil","abs","datetime","monthBased","result","nbDaysBefore1stDayOfMonth","today","thisThurs","getThursdayThisWeek","firstThurs","firstDayOfYear","THURSDAY","getFirstThursdayOfYear","diff","round","fallback","requestedTimezoneOffset","parse","valueOf","NUMBER_FORMAT_REGEXP","parseInt","NgLocaleLocalization","NgLocalization","getPluralCategory","LOCALE_ID","cookieStr","encodeURIComponent","cookie","eqIndex","indexOf","cookieName","cookieValue","decodeURIComponent","NgClass","_iterableDiffers","_keyValueDiffers","_ngEl","_renderer","_iterableDiffer","_keyValueDiffer","_initialClasses","_rawClass","_removeClasses","_applyClasses","ɵisListLikeIterable","find","create","ngDoCheck","iterableChanges","_applyIterableChanges","keyValueChanges","_applyKeyValueChanges","changes","forEachAddedItem","record","_toggleClass","currentValue","forEachChangedItem","forEachRemovedItem","previousValue","item","ɵstringify","rawClassVal","Set","klass","Object","keys","enabled","addClass","nativeElement","removeClass","ɵdir","selectors","inputs","ngClass","$implicit","ngForOf","count","last","even","NgForOf","_viewContainer","_template","_differs","_ngForOf","_ngForOfDirty","_differ","_trackByFn","ngForTrackBy","getTypeName","_applyChanges","insertTuples","forEachOperation","adjustedPreviousIndex","currentIndex","previousIndex","view","createEmbeddedView","NgForOfContext","undefined","tuple","RecordViewTuple","remove","get","move","_perViewChange","ilen","viewRef","context","forEachIdentityChange","dir","ctx","ngForTemplate","NgIf","templateRef","_context","NgIfContext","_thenTemplateRef","_elseTemplateRef","_thenViewRef","_elseViewRef","condition","ngIf","_updateView","assertTemplate","clear","ngIfThen","ngIfElse","property","NgTemplateOutlet","_viewContainerRef","_viewRef","ngTemplateOutletContext","ngTemplateOutlet","ngOnChanges","viewContainerRef","features","PercentPipe","_locale","transform","digitsInfo","isValue","pattern","groupSymbol","decimalSymbol","isPercent","formattedText","isZero","isFinite","parsedNumber","integerLen","j","zeros","numStr","exponent","charAt","splice","MAX_DIGITS","parseNumber","fractionLen","toPercent","minInt","minFraction","minFrac","maxFraction","maxFrac","minIntPart","minFractionPart","maxFractionPart","parseIntAutoRadix","fractionSize","min","max","roundAt","digit","k","unshift","dropTrailingZeros","minLen","carry","reduceRight","roundNumber","decimals","every","groups","lgSize","join","gSize","negPre","negSuf","posPre","posSuf","p","patternParts","positive","negative","positiveParts","lastIndexOf","integer","fraction","ch","z","trunkLen","pos","parseNumberFormat","getLocaleNumberFormat","RegExp","formatPercent","strToNumber","invalidPipeArgumentError","message","ɵpipe","pure","CommonModule","ɵmod","ɵinj","providers","provide","useClass","PLATFORM_BROWSER_ID","platformId","ViewportScroller","BrowserViewportScroller","document","setOffset","getScrollPosition","supportsScrolling","pageXOffset","pageYOffset","scrollToPosition","position","scrollTo","scrollToAnchor","target","elSelected","documentResult","getElementById","getElementsByName","createTreeWalker","body","createShadowRoot","attachShadow","treeWalker","NodeFilter","SHOW_ELEMENT","currentNode","shadowRoot","querySelector","nextNode","findAnchorFromDocument","scrollToElement","attemptFocus","setHistoryScrollRestoration","scrollRestoration","supportScrollRestoration","el","rect","getBoundingClientRect","left","top","focusTarget","focus","activeElement","scrollRestorationDescriptor","getScrollRestorationProperty","getPrototypeOf","writable","set","obj","getOwnPropertyDescriptor","objWithPropertyToExtract","getClosureSafeProperty","source","hasOwnProperty","stringify","overriddenName","toString","newLineIndex","before","after","__forward_ref__","forwardRefFn","forwardRef","isForwardRef","code","formatRuntimeError","renderStringify","injectorName","injectorDetails","RuntimeError","stringifyForError","msg","actual","expected","comparison","opts","options","imports","getOwnDefinition","NG_PROV_DEF","NG_INJECTABLE_DEF","field","NG_INJ_DEF","NG_INJECTOR_DEF","ngInjectableDef","ngInjectorDef","InjectFlags","Default","Host","Self","SkipSelf","Optional","_injectImplementation","impl","previous","notFoundValue","flags","injectableDef","getInjectableDef","throwProviderNotFoundError","ChangeDetectionStrategy","OnPush","ViewEncapsulation","Emulated","None","ShadowDom","__globalThis","globalThis","__window","__self","self","WorkerGlobalScope","__global","global","_global","EMPTY_OBJ","EMPTY_ARRAY","NG_COMP_DEF","ɵcmp","NG_DIR_DEF","NG_PIPE_DEF","NG_MOD_DEF","NG_LOC_ID_DEF","ɵloc","NG_FACTORY_DEF","NG_ELEMENT_ID","__NG_ELEMENT_ID__","_renderCompCount","componentDefinition","noSideEffects","declaredInputs","def","providersResolver","decls","vars","template","consts","ngContentSelectors","hostBindings","hostVars","hostAttrs","contentQueries","outputs","exportAs","onPush","changeDetection","directiveDefs","pipeDefs","viewQuery","encapsulation","id","styles","_","setInput","schemas","tView","directiveTypes","directives","feature","pipeTypes","pipes","invertObject","extractDirectiveDef","extractPipeDef","getComponentDef","getDirectiveDef","getPipeDef","autoRegisterModuleById","bootstrap","declarations","exports","transitiveCompileScopes","scope","ngModuleDef","getNgModuleDef","secondary","newLookup","minifiedKey","publicName","declaredName","ɵɵdefineDirective","ɵɵdefineComponent","pipeDef","onDestroy","prototype","throwNotFound","tNode","firstChange","isFirstChange","NgOnChangesFeatureImpl","definition","ngOnChangesSetInput","rememberChangeHistoryAndInvokeOnChangesHook","simpleChangesStore","getSimpleChangesStore","current","instance","privateName","store","SIMPLE_CHANGES_STORE","setSimpleChangesStore","previousChange","SimpleChange","ɵɵNgOnChangesFeature","ngInherit","renderer","listen","domRendererFactory3","createRenderer","hostElement","rendererType","getDocument","lView","unwrapRNode","nodeIndex","hostView","slotValue","isLView","lContainer","amount","viewOrContainer","parent","instructionState","lFrame","createLFrame","bindingsEnabled","isInCheckNoChangesMode","viewToRestore","contextLView","currentTNode","getCurrentTNodePlaceholderOk","isParent","mode","bindingRootIndex","bindingStartIndex","bindingIndex","isInI18nBlock","inI18n","currentDirectiveIndex","setCurrentDirectiveIndex","currentQueryIndex","declTNode","parentTNode","parentLView","getDeclarationTNode","allocLFrame","newView","newLFrame","firstChild","currentLFrame","childLFrame","child","selectedIndex","elementDepthCount","currentNamespace","oldLFrame","leaveDI","leaveViewLight","getTNode","directiveStart","directiveEnd","lifecycleHooks","directiveDef","ngAfterContentInit","ngAfterContentChecked","ngAfterViewInit","ngAfterViewChecked","contentHooks","contentCheckHooks","viewHooks","viewCheckHooks","destroyHooks","hooks","callHooks","initPhase","currentView","arr","currentNodeIndex","nodeIndexLimit","lastNodeIndexFound","callHook","isInitHook","hook","directive","isViewProvider","injectImplementation","resolving","canSeeViewProviders","injectImpl","native","attrs","isProc","isProceduralRenderer","namespaceURI","attrName","attrVal","setAttribute","setAttributeNS","isAnimationProp","setProperty","marker","charCodeAt","dst","src","srcMarker","mergeHostAttribute","key1","key2","markerInsertPosition","dstValue","parentLocation","startView","viewOffset","getParentInjectorViewOffset","parentView","includeViewProviders","oldValue","nextNgElementId","existingInjectorIndex","getInjectorIndex","firstCreatePass","injectorIndex","insertBloom","blueprint","parentLoc","getParentInjectorLocation","hasParentInjector","parentIndex","getParentInjectorIndex","getParentInjectorView","parentData","footer","declarationViewOffset","lViewCursor","tViewType","f","bloomHash","bloomAdd","moduleInjector","previousInjectImplementation","setInjectImplementation","injectRootLimpMode","notFoundValueOrThrow","tokenId","createNodeInjector","bloomHashBitOrFactory","enterDI","lookupTokenUsingModuleInjector","previousTView","hostTElementNode","b","shouldSearchParent","bloomHasToken","searchTokensOnInjector","NOT_FOUND","NodeInjector","getCurrentTNode","getLView","currentTView","injectableIdx","locateDirectiveOrProvider","isComponentHost","getNodeInjectable","canAccessViewProviders","isHostSpecialCase","nodeProviderIndexes","providerIndexes","tInjectables","injectablesStart","directivesStart","cptViewProvidersCount","endIndex","providerTokenOrDef","dirDef","isComponentDef","tData","NodeInjectorFactory","isFactory","throwCyclicDependencyError","previousIncludeViewProviders","setIncludeViewProviders","directiveIndex","ngOnInit","wrappedOnChanges","preOrderHooks","preOrderCheckHooks","registerPreOrderHooks","injectorView","isFirstHostTNode","_tNode","_lView","getOrCreateInjectable","ownConstructor","ownFactory","getFactoryOf","objectPrototype","resolveForwardRef","getFactoryDef","attrNameToInject","classes","attrsLength","isNameOnlyAttributeMarker","injectAttributeImpl","PARAMETERS","props","parentClass","metaCtor","args","values","propName","makeMetadataCtor","ParamDecoratorFactory","apply","annotationInstance","ParamDecorator","annotation","cls","unusedKey","parameters","defineProperty","ngMetadataName","annotationCls","_desc","ANALYZE_FOR_ENTRY_COMPONENTS","Type","Function","list","flatten","input","deepForEach","keyValueArray","keyValueArrayIndexOf","array","value1","value2","arrayInsert2","shift","middle","_arrayIndexOfSorted","THROW_IF_NOT_FOUND","DI_DECORATOR_FLAG","NG_TEMP_TOKEN_PATH","NEW_LINE","SOURCE","USE_VALUE","useValue","_currentInjector","injector","former","injectInjectorOnly","types","arg","meta","flag","getInjectFlag","decorator","e","injectorErrorName","tokenPath","JSON","formatError","NG_TOKEN_PATH","Inject","attachInjectFlag","makeParamDecorator","policy","policy$1","html","trustedTypes","createPolicy","createHTML","createScript","createScriptURL","getPolicy","getPolicy$1","changingThisBreaksApplicationSecurity","SafeValueImpl","actualType","getSanitizationBypassType","trustedHtml","SafeHtmlImpl","trustedStyle","SafeStyleImpl","trustedScript","SafeScriptImpl","trustedUrl","SafeUrlImpl","trustedResourceUrl","SafeResourceUrlImpl","defaultDoc","inertDocumentHelper","InertDocumentHelper","DOMParser","parseFromString","trustedHTMLFromString","isDOMParserAvailable","DOMParserHelper","getInertBodyElement","removeChild","inertDocument","implementation","createHTMLDocument","inertHtml","createElement","appendChild","inertBodyElement","templateEl","innerHTML","inertBody","documentMode","stripCustomNsAttrs","elAttrs","attributes","removeAttribute","childNode","nodeType","Node","ELEMENT_NODE","nextSibling","SAFE_URL_PATTERN","DATA_URL_PATTERN","srcset","_sanitizeUrl","tags","sets","VOID_ELEMENTS","tagSet","OPTIONAL_END_TAG_BLOCK_ELEMENTS","OPTIONAL_END_TAG_INLINE_ELEMENTS","VALID_ELEMENTS","merge","URI_ATTRS","SRCSET_ATTRS","VALID_ATTRS","SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS","sanitizedSomething","buf","sanitizeChildren","traverseContent","startElement","n","TEXT_NODE","chars","nodeValue","endElement","checkClobberedElement","parentNode","element","tagName","nodeName","toLowerCase","elAttr","lower","sanitizeSrcset","encodeEntities","node","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","outerHTML","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","inertBodyHelper","unsafeHtmlInput","getInertBodyHelper","unsafeHtml","mXSSAttempts","parsedHtml","sanitizer","SanitizingHtmlSerializer","getTemplateContent","safeHtml","isTemplateElement","content","SecurityContext","NONE","HTML","STYLE","SCRIPT","URL","RESOURCE_URL","getSanitizer","trustedHTMLFromStringBypass","sanitize","allowSanitizationBypassAndThrow","unwrapSafeValue","_sanitizeHtml","unsafeUrl","MONKEY_PATCH_KEY_NAME","readPatchedData","ERROR_ORIGINAL_ERROR","console","_console","handleError","originalError","_findOriginalError","_findContext","errorLogger","ERROR_LOGGER","defaultErrorLogger","ERROR_DEBUG_CONTEXT","getOriginalError","COMMENT_DISALLOWED","COMMENT_DELIMITER","defaultScheduler","requestAnimationFrame","setTimeout","bind","RendererStyleFlags2","Important","DashCase","_icuContainerIterate","tIcuContainerNode","isLContainer","getNearestLContainer","container","action","lNodeToHandle","beforeNode","isComponent","rNode","o","nativeAppendChild","nativeInsertBefore","nativeRemoveNode","destroyNode","parentRElement","anchor","applyToElementOrContainer","applyView","applyContainer","createText","createTextNode","setValue","textContent","createComment","escapeCommentText","namespace","createElementNS","declarationContainer","movedViews","declarationViewIndex","insertionLContainer","updateTransplantedViewCount","removeIndex","indexInContainer","viewToDetach","declarationLContainer","detachMovedView","removedLView","removeFromArray","removeViewFromContainer","lQueries","detachView","rootView","lViewOrLContainer","cleanUpView","firstView","destroyViewTree","toCall","callContext","executeOnDestroys","tCleanup","cleanup","lCleanup","lastLCleanupIndex","idxOrTargetGetter","listener","useCaptureOrSubIdx","unsubscribe","processCleanups","destroy","getClosestRElement","getNativeByTNode","isMove","insertBefore","_getInsertInFrontOfRNodeWithI18n","_processI18nInsertBefore","getInsertInFrontOfRNodeWithNoI18n","getInsertInFrontOfRNodeWithI18n","processI18nInsertBefore","childRNode","childTNode","parentRNode","getParentRElement","anchorNode","getInsertInFrontOfRNode","nativeAppendOrInsertBefore","tNodeType","getBeforeNodeForView","elIcuContainerChild","getFirstNativeNode","rNodeOrLContainer","nextRNode","projectionNodes","getProjectionNodes","getLViewParent","componentView","projection","viewIndexInContainer","nextViewIndex","firstTNodeOfView","isHostElement","nativeParent","nativeParentNode","nativeRemoveChild","isProjection","rawSlotValue","attachPatchData","applyNodes","icuContainerIterate","applyProjectionRecursive","projectionNext","tProjectionNode","componentLView","nodeToProjectOrRNodes","componentNode","newValue","style","cssText","className","classToSearch","startingIndex","foundIndex","NG_TEMPLATE_SELECTOR","cssClassToMatch","isProjectionMode","classIndexOf","currentSelector","selector","nodeAttrs","nameOnlyMarkerIdx","getNameOnlyMarkerIndex","skipToNextSelector","hasTagAndTypeMatch","isPositive","selectorAttrValue","isCssClassMatching","attrIndexInNode","findAttrIndexInNode","isInlineTemplate","nodeAttrValue","compareAgainstClassName","bindingsMode","maybeAttrName","attr","matchTemplateAttribute","isNodeMatchingSelector","selectorListLoop","currentSelectorInList","isNegativeMode","chunk","currentChunk","valueOrMarker","attrValue","maybeWrapInNotSelector","NO_CHANGE","delta","selectIndexInternal","getTView","getSelectedIndex","checkNoChangesMode","executeCheckHooks","executeInitAndCheckHooks","setSelectedIndex","prev","tStylingRange","queryStartIdx","directiveDefIdx","setCurrentQueryIndex","host","tHostNode","rendererFactory","resetPreOrderHookFlags","createTNodeAtIndex","getCurrentParentTNode","setCurrentTNode","isCurrentTNodeParent","tParent","insertBeforeIndex","directiveStylingLast","propertyBindings","mergedAttrs","localNames","initialInputs","tViews","stylesWithoutHost","residualStyles","classesWithoutHost","residualClasses","classBindings","styleBindings","createTNode","numSlotsToAlloc","initialValue","allocIdx","enterView","executeViewQueryFn","templateFn","executeTemplate","staticContentQueries","refreshContentQueries","staticViewQueries","components","hostLView","renderComponent","renderChildComponents","incompleteFirstPass","leaveView","isInCheckNoChangesPass","setBindingIndex","hooksInitPhaseCompleted","incrementInitPhaseFlags","getFirstLContainer","getNextLContainer","movedLView","markTransplantedViewsForRefresh","embeddedLView","embeddedTView","viewAttachedToChangeDetector","refreshView","refreshEmbeddedViews","hostBindingOpCodes","opCode","directiveIdx","bindingRootIndx","hostBindingFn","setBindingRootForHostBindings","processHostBindingOpCodes","refreshComponent","refreshChildComponents","firstUpdatePass","normalExecutionPath","creationModeIsActive","isCreationMode","begin","renderView","rf","prevSelectedIndex","isUpdatePhase","isContentQueryHost","getBindingsEnabled","getOrCreateNodeInjectorForNode","addComponentLogic","setInputsFromAttrs","getComponentLViewByIndex","instantiateAllDirectives","elementIndex","dirIndex","invokeHostBindingsInCreationMode","invokeDirectivesHostBindings","viewData","localRefExtractor","localIndex","createTView","constsOrFactory","initialViewLength","createViewBlueprint","queries","fill","expandoStartIndex","directiveRegistry","pipeRegistry","cleanupFn","getOrCreateLViewCleanup","getOrCreateTViewCleanup","inputAliasMap","propStore","internalName","nativeOnly","dataValue","inputData","setInputsForProperty","viewIndex","childComponentLView","markDirtyIfOnPush","mapPropName","localRefs","hasDirectives","registry","matches","isNodeMatchingSelectorList","diPublicInInjector","markAsComponentHost","findDirectiveDefMatches","exportsMap","initTNodeFlags","preOrderHooksFound","preOrderCheckHooksFound","allocExpando","mergeHostAttrs","configureViewWithDirective","saveNameToExportMap","lifeCycleHooks","tViewData","tNodeAttrs","inputsFromAttrs","inputsStore","outputsStore","directiveInputs","generateInitialInputs","generatePropertyAliases","initializeInputAndOutputAliases","cacheMatchingLocalNames","directiveVarsIdx","elementIndx","lastSelectedElementIdx","hostTNode","numberOfDirectives","directiveFactory","nodeInjectorFactory","registerHostBindingOpCodes","getOrCreateTComponentView","addToViewTree","createLView","strValue","initialInputData","inputsToStore","hostNative","componentHostIdx","refreshContainsDirtyView","componentTView","syncViewWithBlueprint","isRootView","rootContext","rootComponent","readPatchedLView","renderComponentOrTemplate","tickRootContext","viewQueryFn","component","CLEAN_PROMISE","Promise","resolve","errorHandler","ErrorHandler","getNativeByIndex","updateTextNode","writeToHost","concatStringsWithSpace","INJECTOR$1","INJECTOR_SCOPE","NOT_YET","CIRCULAR","NULL_INJECTOR","NullInjector","defType","additionalProviders","R3Injector","getNullInjector","records","Map","injectorDefTypes","_destroyed","dedupStack","provider","processProvider","injectorDef","processInjectorType","makeRecord","assertNotDestroyed","service","previousInjector","setCurrentInjector","injectableDefInScope","injectableDefOrInjectorDefFactory","hydrate","catchInjectorError","_resolveInjectorDefTypes","tokens","defOrWrappedDef","parents","getInjectorDef","ngModule","isDuplicate","importTypesWithProviders","imported","add","defProviders","injectorType","ngModuleType","isTypeProvider","isValueProvider","providerToFactory","multi","multiRecord","injectArgs","has","paramLength","newArray","inheritedInjectableDef","typeName","warn","getInheritedInjectableDef","getUndecoratedInjectableFactory","unwrappedProvider","useFactory","isFactoryProvider","deps","useExisting","isExistingProvider","classRef","hasDeps","INJECTOR_IMPL","createInjectorWithoutInjectorInstances","createInjector","registerPostOrderHooks","superType","getSuperType","shouldInheritFields","inheritanceChain","superDef","writeableDef","maybeUnwrapEmpty","superHostBindings","inheritHostBindings","superViewQuery","superContentQueries","inheritViewQuery","inheritContentQueries","fillProperties","animation","defData","ɵɵInheritDefinitionFeature","mergeHostAttrsAcrossInheritance","prevViewQuery","prevContentQueries","prevHostBindings","Injector","NULL","_symbolIterator","Symbol","iterator","getOwnPropertyNames","entries","wrapped","WrappedValue","isWrapped","isJsObject","getSymbolIterator","is","exp1","exp2","different","bindingUpdated","nextBindingIndex","setElementAttribute","elementAttributeInternal","getSelectedTNode","ɵɵattribute","prefix","v0","suffix","i0","v1","i1","v2","i2","v3","exp3","exp4","bindingUpdated2","bindingUpdated4","getBindingIndex","incrementBindingIndex","attrsIndex","localRefsIndex","adjustedIndex","tViewConsts","getOrCreateTNode","getConstant","resolveDirectives","templateFirstCreatePass","comment","createLContainer","isDirectiveHost","createDirectivesInstances","saveResolvedLocalsInData","load","elementPropertyInternal","ɵɵproperty","isClassBased","createElementNode","computeStaticStyling","elementStart","elementStartFirstCreatePass","setUpAttributes","writeDirectClass","writeDirectStyle","executeContentQueries","setCurrentTNodeAsNotParent","elementEnd","hasClassInput","setDirectiveInputsWhichShadowsStyling","hasStyleInput","ɵɵelementStart","ɵɵelementEnd","elementContainerStartFirstCreatePass","then","isObservable","isSubscribable","eventName","listenerFn","useCapture","eventTargetResolver","listenerInternal","isTNodeDirectiveHost","processOutputs","lCleanupIndex","existingListener","tNodeIdx","cleanupEventName","listenerIdxInLCleanup","findExistingListener","__ngLastListenerFn__","__ngNextListenerFn__","wrapListener","propsLength","subscription","directiveInstance","idx","ɵɵlistener","profiler","wrapWithPreventDefault","markViewDirty","executeListenerWithErrorHandling","nextListenerFn","wrapListenerIn_markDirtyAndPreventDefault","preventDefault","returnValue","level","nestingLevel","walkUpViews","nextContextImpl","projectionSlots","wildcardNgContentIndex","ngProjectAsAttrVal","ngProjectAsAttrIdx","getProjectAsAttrValue","isSelectorInSelectorList","projectionHeads","tails","componentChild","slotIndex","matchingProjectionSlotIndex","selectorIndex","applyProjection","ɵɵpropertyInterpolate1","ɵɵpropertyInterpolate","interpolatedValue","interpolation1","tStylingKey","isPrevDir","isClassBinding","tStylingAtIndex","isMap","cursor","getTStylingRangePrev","getTStylingRangeNext","foundDuplicate","tStyleRangeAtCursor","isStylingMatch","setTStylingRangeNextDuplicate","setTStylingRangePrevDuplicate","tStylingKeyCursor","parserState","textEnd","keyEnd","valueEnd","startIndex","consumeClassToken","consumeWhitespace","prop","checkStylingProperty","ɵɵstyleProp","ɵɵclassProp","checkStylingMap","keyValueArraySet","classStringParser","resetParserState","parseClassNameNext","parseClassName","getLastParsedKey","stylingFirstUpdatePass","updateStyling","normalizeSuffix","stringParser","hasStylingInputShadow","isInHostBindings","staticPrefix","oldKeyValueArray","newKeyValueArray","oldIndex","newIndex","oldKey","newKey","setKey","x","updateStylingMap","styleKeyValueArray","unwrappedValue","toStylingKeyValueArray","isHostBindings","stylingKey","hostDirectiveDef","getCurrentDirectiveDef","residual","collectStylingFromTAttrs","collectStylingFromDirectives","templateStylingKey","bindings","getTemplateHeadTStylingKey","setTemplateHeadTStylingKey","collectResidual","wrapInStaticStylingKey","tStylingKeyWithStatic","isHostBinding","tBindings","tmplHead","tmplTail","isKeyDuplicateOfStatic","staticKeyValueArray","previousNode","toTStylingRange","setTStylingRangeNext","setTStylingRangePrev","g","markDuplicates","markDuplicateOfResidualStyling","a","insertTStylingBinding","currentDirective","desiredMarker","currentMarker","tRange","isStylingValuePresent","getTStylingRangeNextDuplicate","findStylingValue","getTStylingRangePrevDuplicate","isProcedural","classList","removeStyle","removeProperty","isImportant","setStyle","applyStyling","isPrevDirection","rawKey","containsStatics","isStylingMap","valueAtLViewIndex","keyValueArrayGet","textNative","ɵɵtextInterpolate1","ɵɵtextInterpolate","interpolated","textBindingInternal","interpolation2","ɵɵtextInterpolate2","interpolation4","ɵɵhostProperty","u","localeEn","LOCALE_DATA","normalizedLocale","normalizeLocale","getLocaleData","parentLocale","findLocaleData","LocaleDataIndex","PluralCase","ng","common","locales","LocaleId","DayPeriodsFormat","DayPeriodsStandalone","DaysFormat","DaysStandalone","MonthsFormat","MonthsStandalone","FirstDayOfWeek","WeekendRange","DateFormat","TimeFormat","DateTimeFormat","NumberSymbols","NumberFormats","CurrencyCode","CurrencySymbol","CurrencyName","Currencies","Directionality","ExtraData","pluralMapping","DEFAULT_LOCALE_ID","ELEMENT_MARKER","ICU_MARKER","I18nCreateOpCode","SHIFT","APPEND_EAGERLY","COMMENT","throwError","assertDefined","tNodeInsertBeforeIndex","i18nParent","anchorRNode","previousTNodes","newTNode","existingTNode","isI18nText","isNewTNodeCreatedBefore","getInsertBeforeIndex","setInsertBeforeIndex","setI18nHandling","addTNodeAndUpdateInsertBeforeIndex","tIcu","currentCase","currentCaseLViewIndex","mergedCode","changeMask","changeMaskCounter","mutableOpCodes","rootRNode","rootIdx","textNodeIndex","parentIdx","getParentFromIcuCreateOpCode","insertInFrontOf","w","refIdx","getRefFromIcuCreateOpCode","getTIcu","caseIndex","getCurrentICUCaseIndex","applyMutableOpCodes","anchorIdx","commentValue","commentNodeIndex","createCommentNode","elementNodeIndex","updateOpCodes","bindingsStartIndex","checkBit","skipCodes","sanitizeFn","tNodeOrTagName","rText","applyIcuSwitchCase","applyIcuUpdateCase","activeCaseIndex","mask","applyUpdateOpCodes","update","icuExpression","bindingValue","cases","resolvedCase","plural","getPluralCase","getCaseIndex","applyIcuSwitchCaseRemove","removeCodes","nodeOrIcuIndex","_stack","_removes","_index","removeOpCode","enterIcu","icuContainerIteratorNext","BINDING_REGEXP","NESTED_ICU","ICU_BLOCK_REGEXP","SUBTEMPLATE_REGEXP","PH_REGEXP","NGSP_UNICODE_REGEXP","rootTNode","existingTNodes","createOpCodes","isICU","i18nNodeIdx","loader","ensureIcuContainerVisitorLoaded","loadIcuContainerVisitor","assertEqual","setTNodeInsertBeforeIndex","hasBinding","createTNodeAndAddOpCode","generateBindingUpdateOpCodes","destinationNode","bindingStart","maskIndex","sizeIndex","textParts","textValue","toMaskBit","tagMatched","inTemplate","bindingMask","mainBinding","addUpdateIcuSwitch","setTIcu","valueArr","nestedIcus","icuIndex","parseIcuCase","addUpdateIcuUpdate","icuType","i18nParseTextIntoPartsAndICU","binding","blocks","prevPos","braceStack","results","braces","lastIndex","block","parseICUBlock","caseName","unsafeCaseHtml","inertRootNode","walkIcuTree","sharedUpdateOpCodes","depth","addCreateNodeAndAppend","lowerAttrName","addCreateAttribute","addRemoveNode","COMMENT_NODE","isNestedIcu","icuStart","addRemoveNestedIcu","appendToParentIdx","createAtIdx","icuCreateOpCode","messageIndex","subTemplateIndex","parentTNodeIndex","existingTNodeStack","msgParts","replaceNgsp","isRootTemplateMessage","removeInnerTemplateTranslation","getTranslationForTemplate","i18nStartFirstCreatePassProcessTextNode","icuContainerTNode","isClosing","createTNodePlaceholder","i18nStartFirstCreatePass","tI18n","isComment","appendNow","applyCreateOpCodes","setInI18nBlock","ɵɵi18nStart","setMaskBit","hasChange","ɵɵi18nExp","applyI18n","lInjectablesBlueprint","resolveProvider$1","providerFactory","beginIndex","ɵɵdirectiveInject","existingFactoryIndex","registerDestroyHooksIfSupported","existingProvidersFactoryIndex","existingViewProvidersFactoryIndex","doesProvidersFactoryExist","doesViewProvidersFactoryExist","factoryFn","componentProviders","multiFactoryAdd","multiFactory","multiViewProvidersFactoryResolver","multiProvidersFactoryResolver","contextIndex","indexInFactory","providerIsTypeProvider","isClassProvider","existingCallbacksIndex","isComponentProvider","lData","multiResolve","factories","componentCount","multiProviders","viewProviders","processProvidersFn","ERROR_COMPONENT","resolveComponentFactory","noComponentFactoryError","ElementRef","ComponentFactoryResolver","_NullComponentFactoryResolver","SWITCH_ELEMENT_REF_FACTORY","createElementRef","Renderer2","SWITCH_RENDERER2_FACTORY","nodeAtIndex","getOrCreateRenderer2","Sanitizer","full","major","minor","patch","VERSION","Version","supports","isListLikeIterable","trackByFn","DefaultIterableDiffer","trackByIdentity","_linkedRecords","_unlinkedRecords","_previousItHead","_itHead","_itTail","_additionsHead","_additionsTail","_movesHead","_movesTail","_removalsHead","_removalsTail","_identityChangesHead","_identityChangesTail","forEachItem","_next","nextIt","nextRemove","addRemoveOffset","moveOffsets","getPreviousIndex","adjPreviousIndex","_nextRemoved","localMovePreviousIndex","localCurrentIndex","forEachPreviousItem","_nextPrevious","_nextAdded","forEachMovedItem","_nextMoved","_nextIdentityChange","collection","check","_reset","itemTrackBy","mayBeDirty","trackById","_verifyReinsertion","_addIdentityChange","_mismatch","done","iterateListLike","_truncate","isDirty","previousRecord","_prev","_remove","_reinsertAfter","_moveAfter","_addAfter","IterableChangeRecord_","reinsertRecord","_addToMoves","nextRecord","_addToRemovals","_unlink","prevRecord","_prevRemoved","_insertAfter","_DuplicateMap","put","toIndex","_prevDup","_nextDup","_head","_tail","atOrAfterIndex","duplicates","_DuplicateItemRecordList","recordList","delete","moveOffset","DefaultKeyValueDiffer","_records","_mapHead","_appendAfter","_previousMapHead","_changesHead","_changesTail","_nextChanged","_forEach","_maybeAddToChanges","_getOrCreateRecordForKey","_insertBeforeOrAppend","KeyValueChangeRecord_","_addToAdditions","_addToChanges","IterableDiffers","DefaultIterableDifferFactory","copied","defaultIterableDiffersFactory","iterable","getTypeNameForDebugging","KeyValueDiffers","DefaultKeyValueDifferFactory","defaultKeyValueDiffersFactory","kv","lNode","lViewInAContainer","lViewFirstChildTNode","collectNativeNodes","nodesInSlot","_cdRefInjectingView","_appRef","_attachedToViewContainer","CONTEXT","viewRefs","destroyLView","callback","storeCleanupWithContext","markForCheck","detach","reattach","detectChanges","detectChangesInternal","checkNoChanges","setIsInCheckNoChangesMode","checkNoChangesInternal","attachToViewContainerRef","detachFromAppRef","attachToAppRef","appRef","ViewRef","_view","detectChangesInRootView","checkNoChangesInRootView","SWITCH_CHANGE_DETECTOR_REF_FACTORY","isPipe","createViewRef","ChangeDetectorRef","keyValDiff","defaultIterableDiffers","defaultKeyValueDiffers","SWITCH_TEMPLATE_REF_FACTORY","createTemplateRef","TemplateRef","ViewEngineTemplateRef","R3TemplateRef","_declarationLView","_declarationTContainer","elementRef","declarationViewLQueries","SWITCH_VIEW_CONTAINER_REF_FACTORY","createContainerRef","ViewContainerRef","VE_ViewContainerRef","R3ViewContainerRef","_lContainer","_hostTNode","_hostLView","getViewRefs","insert","createComponent","componentFactory","projectableNodes","ngModuleRef","contextInjector","parentInjector","NgModuleRef","componentRef","prevIdx","prevLContainer","prevVCRef","adjustedIdx","_adjustIndex","containerLength","addToArray","declaredComponentLView","insertedLContainer","trackMovedView","insertView","parentNativeNode","addViewToContainer","getOrCreateViewRefs","viewRefsArr","detachedView","commentNode","nativeNextSibling","NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","componentDef","ComponentFactory$1","nonMinified","templateName","SCHEDULER","ComponentFactory","componentType","stringifyCSSSelector","isBoundToModule","toRefArray","rootSelectorOrNode","rootViewInjector","createChainedInjector","RendererFactory2","hostRenderer","elementName","hostRNode","elementOrSelector","selectRootElement","rElement","locateHostElement","getNamespace$1","rootFlags","scheduler","playerHandler","clean","createRootContext","rootTView","rootLView","tElementNode","viewRenderer","createRootComponentView","extractAttrsAndClassesFromSelector","nodesforSlot","hostFeatures","instantiateRootComponent","createRootComponent","LifecycleHooksFeature","ComponentRef$1","_rootLView","changeDetectorRef","RootViewRef","modules","_parent","_bootstrapComponents","destroyCbs","componentFactoryResolver","ComponentFactoryResolver$1","ngLocaleIdDef","setLocaleId","maybeUnwrapFn","_r3Injector","injectFlags","destroyed","NgModuleFactory","moduleType","visited","incoming","assertSameOrNotExisting","recurse","registerNgModuleType","NgModuleRef$1","slotOffset","pureFn","thisArg","getBindingRoot","updateBinding","getBinding","exp","pureFunction1Internal","bindingRoot","getPureFunctionReturnValue","pureFunction2Internal","bindingUpdated3","pureFunction3Internal","returnValueIndex","lastReturnValue","pipeName","getPipeDef$1","pipeFactory","pipeInstance","unwrap","unwrapValue$1","isPure","Subject","isAsync","__isAsync","observerOrNext","_c","nextFn","errorFn","completeFn","observer","_wrapInTimeout","sink","Subscription","_results","_emitDistinctChangesOnly","dirty","_changesDetected","_changes","first","proto","QueryList","symbolIterator","filter","reduce","init","some","toArray","reset","resultsTree","identityAccessor","newResultFlat","valueA","valueB","arrayEquals","notifyOnChanges","setDirty","queryList","clone","LQuery_","tQueries","noOfInheritedQueries","viewLQueries","tQuery","getByIndex","indexInDeclarationView","LQueries_","dirtyQueriesWithMatches","getTQuery","predicate","read","queriesForTemplateRef","childQueryIndex","tqueryClone","TQueries_","track","tquery","metadata","crossesNgTemplate","_appliesToNextNode","_declarationNodeIndex","isApplyingToNode","matchTNode","addMatch","TQuery_","declarationNodeIdx","matchTNodeWithReadOption","getIdxOfMatchingSelector","nodeMatchIdx","directiveOrProviderIdx","matchIdx","matchingIdx","createResultByTNodeType","createSpecialToken","queryIndex","lQuery","tQueryMatches","matchedNodeIdx","createResultForNode","lViewResults","materializeViewResults","collectQueryResults","embeddedLViews","getCurrentQueryIndex","unwrapElementRef","createTQuery","TQueryMetadata_","createLQuery","tViewContentQueries","saveContentQueryAndDirectiveIndex","APP_INITIALIZER","ApplicationInitStatus","appInits","noop","reject","initialized","donePromise","rej","runInitializers","asyncInitPromises","initResult","isPromise","observableAsPromise","all","catch","APP_ID","APP_ID_RANDOM_PROVIDER","_randomChar","fromCharCode","random","PLATFORM_INITIALIZER","PLATFORM_ID","APP_BOOTSTRAP_LISTENER","Console","log","LOCALE_ID$1","DEFAULT_CURRENCY_CODE","ngModuleFactory","componentFactories","Compiler_compileModuleSync__POST_R3__","NgModuleFactory$1","Compiler_compileModuleSync","Compiler_compileModuleAsync","Compiler_compileModuleAndAllComponentsSync__POST_R3__","declaration","ModuleWithComponentFactories","Compiler_compileModuleAndAllComponentsSync","Compiler_compileModuleAndAllComponentsAsync","Compiler","compileModuleSync","compileModuleAsync","compileModuleAndAllComponentsSync","compileModuleAndAllComponentsAsync","clearCache","clearCacheFor","getModuleId","promise","Zone","scheduleMicroTask","enableLongStackTrace","shouldCoalesceEventChangeDetection","shouldCoalesceRunChangeDetection","hasPendingMacrotasks","hasPendingMicrotasks","isStable","onUnstable","onMicrotaskEmpty","onStable","onError","assertZonePatched","_nesting","_outer","_inner","TaskTrackingZoneSpec","fork","longStackTraceZoneSpec","lastRequestAnimationFrameId","nativeRequestAnimationFrame","nativeCancelAnimationFrame","cancelAnimationFrame","unpatchedRequestAnimationFrame","__symbol__","unpatchedCancelAnimationFrame","getNativeRequestAnimationFrame","delayChangeDetectionForEventsDelegate","isCheckStableRunning","fakeTopEventTask","root","scheduleEventTask","updateMicroTaskStatus","checkStable","invoke","delayChangeDetectionForEvents","properties","isAngularZone","onInvokeTask","delegate","task","applyThis","applyArgs","onEnter","invokeTask","onLeave","onInvoke","onHasTask","hasTaskState","hasTask","change","_hasPendingMicrotasks","microTask","macroTask","onHandleError","runOutsideAngular","forkInnerZoneWithAngularBehavior","assertInAngularZone","NgZone","isInAngularZone","run","runTask","EMPTY_PAYLOAD","cancelTask","runGuarded","Testability","_ngZone","_pendingCount","_isZoneStable","_didWork","_callbacks","taskTrackingZone","_watchAngularEvents","assertNotInAngularZone","_runCallbacksIfReady","increasePendingRequestCount","decreasePendingRequestCount","cb","clearTimeout","timeoutId","doneCb","pending","getPendingTasks","updateCb","macroTasks","creationLocation","addCallback","timeout","whenStable","getPendingRequestCount","findProviders","using","exactMatch","TestabilityRegistry","_applications","_testabilityGetter","addToWindow","registerApplication","testability","unregisterApplication","unregisterAllApplications","getTestability","elem","getAllTestabilities","getAllRootElements","findTestabilityInTree","findInAncestors","getter","_NoopGetTestability","_devMode","_runModeLocked","_platform","ALLOW_MULTIPLE_PLATFORMS","parentPlatformFactory","desc","extraProviders","platform","getPlatform","injectedProviders","PlatformRef","inits","createPlatform","requiredToken","assertPlatform","_injector","_modules","_destroyListeners","bootstrapModuleFactory","moduleFactory","ngZone","ngZoneOption","extra","NoopNgZone","ngZoneEventCoalescing","ngZoneRunCoalescing","getNgZone","ngZoneInjector","moduleRef","exceptionHandler","_callAndReportToErrorHandler","initStatus","_moduleDoBootstrap","bootstrapModule","compilerOptions","optionsReducer","compileNgModuleFactory","ApplicationRef","ngDoBootstrap","module","objs","assign","_zone","_exceptionHandler","_componentFactoryResolver","_initStatus","_bootstrapListeners","_views","_runningTick","_stable","componentTypes","_onMicrotaskEmptySubscription","tick","isCurrentlyStable","Observable","stableSub","unstableSub","merge$1","pipe","share","componentOrFactory","cf","compRef","testabilityRegistry","_loadComponent","attachView","DEFAULT_CONFIG","factoryPathPrefix","factoryPathSuffix","SystemJsNgModuleLoader","_compiler","config","_config","loadAndCompile","exportName","System","checkNotEmpty","loadFactory","factoryClassSuffix","SystemJsNgModuleLoaderConfig","modulePath","getDebugNodeR2","_nativeNode","platformCore","createPlatformFactory","APPLICATION_MODULE_PROVIDERS","queue","$localize","ApplicationModule","ɵɵdefineNgModule","ɵɵdefineInjector","sources","subscriber","len","completed","emitted","hasValue","err","BaseControlValueAccessor","_elementRef","onChange","onTouched","registerOnTouched","registerOnChange","setDisabledState","isDisabled","BuiltInControlValueAccessor","ɵBuiltInControlValueAccessor_BaseFactory","NG_VALUE_ACCESSOR","CHECKBOX_VALUE_ACCESSOR","CheckboxControlValueAccessor","writeValue","ɵCheckboxControlValueAccessor_BaseFactory","$event","checked","DEFAULT_VALUE_ACCESSOR","DefaultValueAccessor","COMPOSITION_BUFFER_MODE","_compositionMode","_composing","userAgent","ɵgetDOM","getUserAgent","_isAndroid","_handleInput","_compositionStart","_compositionEnd","NG_VALIDATORS","NG_ASYNC_VALIDATORS","EMAIL_REGEXP","control","isEmptyInputValue","required","email","minLength","minLengthValidator","maxLength","hasValidLength","maxlength","requiredLength","actualLength","patternValidator","validators","compose","composeAsync","minlength","nullValidator","regex","regexStr","requiredPattern","actualValue","obs","ɵisPromise","ɵisObservable","arrayOfErrors","errors","validator","validate","isValidatorFn","c","presentValidators","isPresent","mergeErrors","executeValidators","normalizeValidators","forkJoinInternal","isObject","resultSelector","forkJoin","toObservable","controlValidators","dirValidator","_rawValidators","_rawAsyncValidators","includes","currentValidators","makeValidatorsArray","validatorsToAdd","hasValidator","AbstractControlDirective","_onDestroyCallbacks","valid","invalid","disabled","pristine","touched","status","untouched","statusChanges","valueChanges","_setValidators","_composedValidatorFn","composeValidators","_setAsyncValidators","_composedAsyncValidatorFn","composeAsyncValidators","_registerOnDestroy","_invokeOnDestroyCallbacks","hasError","errorCode","getError","ControlContainer","formDirective","ɵControlContainer_BaseFactory","arguments","valueAccessor","cd","_cd","submitted","NgControlStatus","AbstractControlStatus","NgControl","NgControlStatusGroup","setUpValidators","_pendingValue","_pendingChange","_pendingDirty","updateOn","updateControl","setUpViewChangePipeline","emitModelEvent","viewToModelUpdate","_unregisterOnChange","setUpModelChangePipeline","_pendingTouched","markAsTouched","setUpBlurPipeline","onDisabledChange","registerOnDisabledChange","_unregisterOnDisabledChange","setUpDisabledChangeHandler","validateControlPresenceOnChange","cleanUpValidators","_registerOnCollectionChange","registerOnValidatorChange","getControlValidators","setValidators","mergeValidators","asyncValidators","getControlAsyncValidators","asyncValidator","setAsyncValidators","onValidatorChange","updateValueAndValidity","isControlUpdated","updatedValidators","updatedAsyncValidators","markAsDirty","emitModelToViewChange","VALID","INVALID","PENDING","DISABLED","validatorOrOpts","isOptionsObj","_hasOwnPendingAsyncValidator","_onCollectionChange","_onDisabledChange","coerceToValidator","coerceToAsyncValidator","validatorFn","asyncValidatorFn","_updateOn","addValidators","addAsyncValidators","removeValidators","removeAsyncValidators","hasAsyncValidator","clearValidators","clearAsyncValidators","onlySelf","markAllAsTouched","_forEachChild","markAsUntouched","_updateTouched","markAsPristine","_updatePristine","markAsPending","emitEvent","disable","skipPristineCheck","_parentMarkedDirty","_updateValue","_updateAncestors","changeFn","enable","setParent","_setInitialStatus","_cancelExistingSubscription","_runValidator","_calculateStatus","_runAsyncValidator","_updateTreeValidity","ctrl","_allControlsDisabled","_asyncValidationSubscription","setErrors","_updateControlsErrors","delimiter","controlToFind","FormGroup","controls","FormArray","at","_find","_initObservables","_anyControlsHaveStatus","_anyControls","_anyControlsDirty","_anyControlsTouched","_isBoxedValue","formState","_setUpdateStrategy","AbstractControl","pickValidators","pickAsyncValidators","_onChange","_applyFormState","emitViewToModelChange","patchValue","removeListItem","_syncPendingControls","_setUpControls","registerControl","addControl","removeControl","setControl","contains","controlName","_checkAllValuesPresent","_throwIfControlMissing","getRawValue","_reduceChildren","acc","FormControl","subtreeUpdated","updated","_reduceValue","initValue","_registerControl","removeAt","ɵNgNoValidate","RadioControlRegistryModule","NG_MODEL_WITH_FORM_CONTROL_WARNING","formDirectiveProvider$1","FormGroupDirective","_updateDomValue","ngSubmit","_checkFormPresent","_updateValidators","_updateRegistrations","_oldForm","setUpControl","getControl","cleanUpControl","addFormGroup","_setUpFormContainer","removeFormGroup","_cleanUpFormContainer","getFormGroup","addFormArray","removeFormArray","getFormArray","updateModel","onSubmit","syncPendingControls","onReset","resetForm","oldCtrl","newCtrl","setUpFormContainer","cleanUpFormContainer","controlNameBinding","FormControlName","valueAccessors","_ngModelWarningConfig","_added","_ngModelWarningSent","defaultAccessor","builtinAccessor","customAccessor","Ir","selectValueAccessor","_setUpControl","viewModel","model","isPropertyUpdated","controlPath","_checkParentType","_ngModelWarningSentOnce","SELECT_VALUE_ACCESSOR","SelectControlValueAccessor","_optionMap","_idCounter","_compareWith","_getOptionId","valueString","_buildValueString","_getOptionValue","_registerOption","_extractId","ɵSelectControlValueAccessor_BaseFactory","compareWith","NgSelectOption","_element","_select","_setElementValue","ngValue","SELECT_MULTIPLE_VALUE_ACCESSOR","SelectMultipleControlValueAccessor","optionSelectedStateSetter","ids","opt","_setSelected","selected","selectedOptions","_value","_extractId$1","ɵSelectMultipleControlValueAccessor_BaseFactory","ɵNgSelectMultipleOption","_buildValueString$1","MIN_LENGTH_VALIDATOR","MinLengthValidator","_validator","_createValidator","toNumber","PATTERN_VALIDATOR","PatternValidator","ɵInternalFormsSharedModule","FormsModule","ReactiveFormsModule","withConfig","warnOnNgModelWithFormControl","FormBuilder","group","controlsConfig","_reduceControls","isAbstractControlOptions","_createControl","controlConfig","dueTime","periodOrScheduler","period","isNumeric","isScheduler","async","due","now","schedule","dispatch","closed","observables","fromArray","lift","RaceOperator","RaceSubscriber","OuterSubscriber","destination","hasFirst","subscriptions","observable","_complete","subscribeToResult","notifyNext","_outerValue","innerValue","outerIndex","ZipOperator","ZipSubscriber","Subscriber","iterators","active","StaticArrayIterator","Symbol_iterator","StaticIterator","ZipBufferIterator","stillUnsubscribed","notifyInactive","checkIterators","shouldComplete","hasCompleted","_tryresultSelector","nextResult","Boolean","SimpleOuterSubscriber","buffer","isComplete","notifyComplete","innerSubscribe","SimpleInnerSubscriber","notifier","TakeUntilOperator","takeUntilSubscriber","TakeUntilSubscriber","notifierSubscription","seenValue","compare","keySelector","DistinctUntilChangedOperator","DistinctUntilChangedSubscriber","hasKey","project","WithLatestFromOperator","WithLatestFromSubscriber","toRespond","found","_tryProject","_c3","_r6","slide_r4","restoredCtx","ctx_r5","select","NgbSlideEventSource","INDICATOR","ctx_r0","activeId","NgbCarousel_div_3_ng_template_3_Template","slide_r7","i_r8","c_r9","tplRef","_r12","arrowLeft","_r14","arrowRight","_c31","ctx_r1","header","_r5","NgbToast_ng_template_2_ng_template_1_Template","hide","ctx_r2","_r0","contentHeaderTpl","Element","closest","msMatchesSelector","webkitMatchesSelector","documentElement","parentElement","environment","transitionTimerDelayMs","NgbConfig","noopFn","runningTransitions","ngbRunTransition","startFn","running","runningTransition","EMPTY","transition$","endFn","getComputedStyle","transitionProperty","of","runInZone","finishTransition$","stop$","endWith","transitionDurationMs","transitionDelay","transitionDuration","getTransitionDurationMs","transitionEnd$","fromEvent","takeUntil","race","timer","asObservable","NgbAccordionModule","NgbAlertModule","NgbButtonsModule","NgbCarouselConfig","_ngbConfig","interval","wrap","keyboard","pauseOnHover","pauseOnFocus","showNavigationArrows","showNavigationIndicators","_animation","NgbSlideEventDirection","LEFT","RIGHT","isBeingAnimated","removeDirectionClasses","removeClasses","ngbCarouselTransitionIn","direction","reflow","ngbCarouselTransitionOut","nextId$2","NgbSlide","slid","NgbCarousel","_platformId","_container","_destroy$","_interval$","BehaviorSubject","_mouseHover$","_focused$","_pauseOnHover$","_pauseOnFocus$","_pause$","_wrap$","slide","_transitionIds","ARROW_LEFT","ARROW_RIGHT","isPlatformBrowser","hasNextSlide$","combineLatest","slideEvent","startWith","slides","currentSlideId","slideArr","currentSlideIdx","_getSlideIdxById","distinctUntilChanged","pause","mouseHover","focused","hasNextSlide","switchMap","NEVER","TIMER","ngbCompleteTransition","_getSlideElement","take","activeSlide","_getSlideById","slideId","_cycleToSelected","_getSlideEventDirection","_getPrevSlide","_getNextSlide","cycle","slideIdx","transitionIds","selectedSlide","paused","transitions","activeSlideTransition","isShown","previousId","nextSlide","transition","zip","currentActiveSlideId","nextActiveSlideId","isLastSlide","isFirstSlide","_t","i18n_4","i18n_6","i18n_8","NgbCarousel_li_1_Template","NgbCarousel_div_3_Template","NgbCarousel_a_4_Template","NgbCarousel_a_5_Template","ɵngcc1","NgbCarouselModule","NgbCollapseModule","Key","Tab","Enter","Escape","Space","PageUp","PageDown","End","Home","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","isContainedIn","matchesSelectorIfAny","isMobile","navigator","maxTouchPoints","FOCUSABLE_ELEMENTS_SELECTOR","querySelectorAll","tabIndex","placementSeparator","positionService","getAllStyles","getStyle","isStaticPositioned","offsetParent","offsetParentEl","elPosition","parentOffset","height","bottom","right","clientTop","clientLeft","elBcr","viewportOffset","elOffset","offsetHeight","offsetWidth","positionElements","targetElement","placement","appendToBody","placementPrimary","placementSecondary","hostElPosition","targetElStyles","marginTop","marginBottom","marginLeft","marginRight","topPosition","leftPosition","targetElBCR","windowHeight","innerHeight","clientHeight","windowWidth","innerWidth","clientWidth","NgbDatepickerModule","NgbDropdownConfig","autoClose","NgbNavbar","NgbDropdownItem","_disabled","NgbDropdownMenu","dropdown","isOpen","NgbDropdown","menuItems","onKeyDown","NgbDropdownAnchor","NgbDropdownToggle","toggle","_changeDetector","_document","ngbNavbar","_closed$","_bodyContainer","_open","openChange","display","_zoneSubscription","_positionMenu","_applyPlacementClasses","_setCloseHandlers","_applyContainer","dropdownClass","_applyCustomDropdownClass","open","_anchor","close","closed$","insideElements","ignoreElements","insideSelector","wrapAsyncForMobile","escapes$","which","tap","mouseDowns$","event","button","closeableClicks$","withLatestFrom","shouldClose","delay","ngbAutoClose","_menu","_resetContainer","itemElements","_getMenuElements","itemElement","isEventFromToggle","_isEventFromToggle","_isDropup","shiftKey","focusableElements","relatedTarget","menu","baseClass","placementVals","allowedPlacements","addClassesToTarget","targetPlacement","primary","classname","placementToRemove","hasAuto","testPlacement","isInViewport","addedClasses","_getFirstPlacement","dropdownMenuElement","bodyContainer","newClass","oldClass","dropdownElement","NgbDropdownModule","NgbModalConfig","backdrop","nodes","ScrollBar","compensate","_getWidth","_isPresent","_adjustBody","scrollbarWidth","userSetPaddingStyle","paddingRight","actualPadding","measurer","NgbModalBackdrop","_el","backdropClass","dismiss","reason","_windowCmptRef","_contentRef","_backdropCmptRef","_beforeDismiss","_closed","_dismissed","_hidden","dismissEvent","_resolve","_reject","componentInstance","shown","_removeModalElements","_dismiss","windowTransition$","backdropTransition$","ModalDismissReasons","BACKDROP_CLICK","ESC","NgbModalWindow","_elRef","_elWithFocus","hidden","_show","_disableEventHandling","transitions$","_dialogEl","_restoreFocus","_enableEventHandling","_setFocus","defaultPrevented","_bumpBackdrop","preventClose","autoFocusable","firstFocusable","getFocusableBoundaryElements","elWithFocus","elementToFocus","ariaLabelledBy","ariaDescribedBy","windowClass","centered","scrollable","modalDialogClass","NgbModalStack","_applicationRef","_scrollBar","_rendererFactory","_activeWindowCmptHasChanged","_ariaHiddenValues","_backdropAttributes","_modalRefs","_windowAttributes","_windowCmpts","_activeInstances","activeWindowCmpt","stopFocusTrap$","refocusOnClick","lastFocusedElement$","tabEvent","focusedElement","lastFocusedElement","ngbFocusTrap","_revertAriaHidden","_setAriaHidden","moduleCFR","contentInjector","containerEl","HTMLElement","isDefined","revertPaddingForScrollBar","removeBodyClass","activeModal","NgbActiveModal","contentRef","_getContentRef","backdropCmptRef","_attachBackdrop","windowCmptRef","_attachWindowComponent","ngbModalRef","NgbModalRef","beforeDismiss","_registerModalRef","_registerWindowCmpt","_applyWindowOptions","_applyBackdropOptions","dismissAll","hasOpenModals","backdropFactory","windowFactory","windowInstance","optionName","backdropInstance","_createFromTemplateRef","isString","_createFromString","_createFromComponent","ContentRef","rootNodes","contentCmptFactory","modalContentInjector","componentNativeEl","children","sibling","getAttribute","unregisterModalRef","ngbWindowCmpt","NgbModal","_moduleCFR","_modalStack","combinedOptions","activeInstances","NgbModalModule","NgbNavModule","NgbPaginationModule","NgbPopoverModule","NgbProgressbarModule","NgbRatingModule","NgbTimepickerModule","NgbToastConfig","autohide","ariaLive","ngbToastFadeInTransition","ngbToastFadeOutTransition","NgbToastHeader","NgbToast","show","_clearTimeout","_timeoutID","i18n_85","NgbToast_ng_template_0_Template","NgbToast_ng_template_2_Template","NgbToastModule","NgbTooltipModule","NgbTypeaheadModule","NGB_MODULES","NgbModule","_c0","SlickCarouselComponent","afterChange","beforeChange","breakpoint","_removedSlides","_addedSlides","unslick","isPlatformServer","nextSlidesLength","slickItem","$instance","slick","initSlick","jQuery","on","initialSlide","currentSlide","$slides","slidesToScroll","addSlide","removeSlide","slickGoTo","slickNext","slickPrev","slickPause","slickPlay","refresh","newOptions","SlickItemDirective","carousel","SlickCarouselModule","getValue","_subscribe","thrownError","ObjectUnsubscribedError","_isScalar","operator","nextOrObserver","rxSubscriberSymbol","emptyObserver","toSubscriber","syncErrorThrowable","_trySubscribe","syncErrorThrown","syncErrorValue","isStopped","canReportError","promiseCtor","getPromiseCtor","Symbol_observable","operations","fns","identity","pipeFromArray","toPromise","empty","hostReportError","outerValue","innerIndex","innerSub","notifyError","subject","observers","subscriberIndex","SubjectSubscriber","AnonymousSubject","copy","SubjectSubscription","destinationOrNext","SafeSubscriber","_error","_unsubscribeAndRecycle","_parentOrParents","_parentSubscriber","isFunction","__tryOrSetError","__tryOrUnsub","useDeprecatedSynchronousErrorHandling","wrappedComplete","_unsubscribe","UnsubscriptionError","UnsubscriptionErrorImpl","_subscriptions","_ctorUnsubscribe","flattenUnsubscriptionErrors","sub","teardown","tmp","subscriptionIndex","errs","_enable_super_gross_mode_that_will_cause_bad_things","stack","innerSubscriber","subscribeTo","subjectFactory","_refCount","_isComplete","getSubject","connect","connection","_connection","ConnectableSubscriber","refCount","higherOrderRefCount","connectableObservableDescriptor","connectableProto","ConnectableObservable","connectable","CombineLatestOperator","CombineLatestSubscriber","unused","_tryResultSelector","mergeAll","concatAll","emptyScheduled","isInteropObservable","scheduleObservable","schedulePromise","isArrayLike","scheduleArray","isIterable","return","scheduleIterable","TypeError","scheduled","subscribeToArray","setupSubscription","sourceObj","handler","isEventTarget","off","isJQueryStyleEventEmitter","addListener","removeListener","isNodeStyleEventEmitter","concurrent","POSITIVE_INFINITY","kind","observe","do","accept","Notification","undefinedValueNotification","completeNotification","delayFor","absoluteDelay","DelayOperator","DelaySubscriber","errored","notification","_schedule","scheduleNotification","DelayMessage","FilterOperator","FilterSubscriber","MapOperator","MapSubscriber","mergeMap","ii","MergeMapOperator","MergeMapSubscriber","_tryNext","_innerSub","ish","innerSubscription","W","subjectOrSubjectFactory","MulticastOperator","RefCountOperator","refCounter","RefCountSubscriber","sharedConnection","multicast","shareSubjectFactory","SwitchMapOperator","SwitchMapSubscriber","TakeOperator","total","ArgumentOutOfRangeError","TakeSubscriber","DoOperator","TapSubscriber","_tapNext","_tapError","_tapComplete","work","Scheduler","SchedulerAction","AsyncScheduler","actions","flush","execute","Action","recycleAsyncId","requestAsyncId","setInterval","clearInterval","_execute","errorValue","rxSubscriber","ArgumentOutOfRangeErrorImpl","ObjectUnsubscribedErrorImpl","subscribeToObservable","subscribeToPromise","subscribeToIterable","outerSubscriber","InnerSubscriber","ɵDomAdapter","supportsDOMEvents","GenericBrowserDomAdapter","makeCurrent","ɵsetRootDomAdapter","BrowserDomAdapter","onAndCancel","evt","dispatchEvent","doc","getDefaultDocument","createHtmlDocument","isElementNode","isShadowRoot","DocumentFragment","baseElement","urlParsingNode","pathName","relativePath","resetBaseElement","getCookie","ɵparseCookieValue","TRANSITION_ID","SERVER_TRANSITION_PROVIDERS","transitionId","dom","setTestabilityGetter","BrowserGetTestability","ɵglobal","testabilities","didWork","decrement","didWork_","BrowserXhr","build","XMLHttpRequest","EVENT_MANAGER_PLUGINS","EventManager","plugins","_eventNameToPlugin","manager","_plugins","plugin","_findPluginFor","addGlobalEventListener","getZone","SharedStylesHost","_stylesSet","addStyles","additions","onStylesAdded","DomSharedStylesHost","_hostNodes","head","_addStylesToHost","styleNodes","styleEl","addHost","hostNode","removeHost","styleNode","NAMESPACE_URIS","svg","xhtml","xlink","xml","xmlns","COMPONENT_REGEX","compId","flattenStyles","eventHandler","DomRendererFactory2","eventManager","sharedStylesHost","appId","rendererByCompId","defaultRenderer","DefaultDomRenderer2","EmulatedEncapsulationDomRenderer2","applyToHost","ShadowDomRenderer","newChild","refChild","oldChild","selectorOrNode","preserveContent","namespaceUri","removeAttributeNS","decoratePreventDefault","contentAttr","hostAttr","hostEl","nodeOrShadowRoot","DomEventsPlugin","EventManagerPlugin","MODIFIER_KEYS","_keyMap","Del","Esc","Left","Right","Up","Down","Menu","Scroll","Win","_chromeNumKeyPadMap","A","B","C","D","E","F","G","H","I","J","K","M","N","O","MODIFIER_KEY_GETTERS","alt","altKey","ctrlKey","metaKey","KeyEventsPlugin","parseEventName","parsedEvent","outsideHandler","eventCallback","fullKey","domEventName","_normalizeKey","modifierName","keyIdentifier","getEventKey","modifierGetter","getEventFullKey","keyName","platformBrowser","ɵPLATFORM_BROWSER_ID","ɵsetDocument","BROWSER_MODULE_PROVIDERS","ɵINJECTOR_SCOPE","XhrFactory","BrowserModule","parentModule","headers","normalizedNames","lazyUpdate","lazyInit","line","maybeSetNormalizedName","getAll","append","op","lcName","HttpHeaders","copyFrom","applyUpdate","other","base","toDelete","existing","encodeKey","standardEncoding","encodeValue","decodeKey","decodeValue","STANDARD_ENCODING_REGEX","STANDARD_ENCODING_REPLACEMENTS","updates","cloneFrom","encoder","HttpUrlEncodingCodec","fromString","fromObject","rawParams","codec","param","eqIdx","paramParser","appendAll","eKey","HttpParams","valueToString","defaultValue","ArrayBuffer","Blob","FormData","method","third","fourth","reportProgress","withCredentials","responseType","toUpperCase","Hn","HttpContext","urlWithParams","qIdx","serializeBody","isArrayBuffer","isBlob","isFormData","URLSearchParams","detectContentTypeHeader","setHeaders","setParams","HttpRequest","HttpEventType","Sent","UploadProgress","ResponseHeader","DownloadProgress","Response","User","defaultStatus","defaultStatusText","statusText","ok","HttpResponseBase","HttpHeaderResponse","HttpResponse","HttpClient","request","req","events$","concatMap","handle","res$","jsonp","callbackParam","addBody","post","HttpHandler","interceptor","intercept","HTTP_INTERCEPTORS","NoopInterceptor","XSSI_PREFIX","HttpXhrBackend","xhrFactory","xhr","setRequestHeader","detectedType","reqBody","headerResponse","partialFromXhr","getAllResponseHeaders","responseURL","getResponseHeader","getResponseUrl","onLoad","response","responseText","originalBody","HttpErrorResponse","sentHeaders","onDownProgress","progressEvent","loaded","lengthComputable","partialText","onUpProgress","progress","upload","send","readyState","DONE","abort","XSRF_COOKIE_NAME","XSRF_HEADER_NAME","HttpXsrfCookieExtractor","lastCookieString","lastToken","parseCount","getToken","cookieString","HttpXsrfInterceptor","tokenService","headerName","lcUrl","HttpXsrfTokenExtractor","HttpInterceptingHandler","backend","chain","interceptors","HttpInterceptorHandler","HttpBackend","HttpClientXsrfModule","HttpClientModule","withOptions","EmptyError","EmptyErrorImpl","observableFactory","accumulator","seed","hasSeed","ScanOperator","ScanSubscriber","_seed","CatchOperator","caught","CatchSubscriber","err2","TakeLastOperator","TakeLastSubscriber","ring","errorFactory","defaultErrorFactory","ThrowIfEmptyOperator","ThrowIfEmptySubscriber","DefaultIfEmptyOperator","DefaultIfEmptySubscriber","isEmpty","hasDefaultValue","defaultIfEmpty","throwIfEmpty","FinallySubscriber","RouterEvent","navigationTrigger","restoredState","urlAfterRedirects","shouldActivate","route","snapshot","routeConfig","routerEvent","PRIMARY_OUTLET","ParamsAsMap","NAVIGATION_CANCELING_ERROR","segments","segmentGroup","pathMatch","hasChildren","posParams","segment","consumed","k1","k2","equalArraysOrString","aSorted","sort","bSorted","pathCompareMap","exact","containee","matrixParams","equalPath","matrixParamsMatch","numberOfChildren","equalSegmentGroups","subset","containsSegmentGroup","paramCompareMap","shallowEqual","ignored","paths","fragment","containsSegmentGroupHelper","containeePaths","containerPaths","containeeSegment","_queryParamMap","convertToParamMap","DEFAULT_SERIALIZER","serialize","serializePaths","_parameterMap","serializePath","as","bs","UrlParser","UrlTree","parseRootSegment","parseQueryParams","parseFragment","tree","serializeSegment","strParams","encodeUriQuery","serializeQueryParams","encodeURI","DefaultUrlSerializer","childOutlet","mapChildrenIntoArray","encodeUriString","decode","encodeUriSegment","serializeMatrixParams","SEGMENT_RE","QUERY_PARAM_RE","QUERY_PARAM_VALUE_RE","remaining","consumeOptional","peekStartsWith","UrlSegmentGroup","parseChildren","parseQueryParam","parseSegment","capture","parseParens","matchSegments","UrlSegment","parseMatrixParams","parseParam","valueMatch","matchQueryParams","matchUrlQueryParamValue","decodedKey","decodeQuery","decodedVal","currentVal","allowPrimary","outletName","_root","pathFromRoot","findNode","siblings","findPath","cc","outlet","Tree","setRouterState","urlTree","activated","ActivatedRouteSnapshot","RouterStateSnapshot","TreeNode","createEmptyStateSnapshot","emptyUrl","emptyParams","emptyData","emptyQueryParams","ActivatedRoute","RouterState","futureSnapshot","_futureSnapshot","_routerState","_paramMap","paramsInheritanceStrategy","inheritingStartingFrom","curr","_resolvedData","flattenInherited","urlSegment","lastPathIndex","_urlSegment","_lastPathIndex","serializeNode","currentSnapshot","nextSnapshot","shallowEqualArrays","equalSegments","equalParamsAndUrlSegments","routeReuseStrategy","prevState","shouldReuseRoute","createNode","createOrReuseChildren","shouldAttach","detachedRouteHandle","retrieve","setFutureSnapshotsOfActivatedRoutes","createActivatedRoute","command","outlets","segmentPath","oldSegmentGroup","newSegmentGroup","qp","replaceSegment","oldSegment","newSegment","isAbsolute","numberOfDoubleDots","commands","isMatrixParams","cmdWithOutlet","isCommandWithOutlets","toRoot","processChildren","updateSegmentGroupChildren","currentCommandIndex","currentPathIndex","noMatch","pathIndex","commandIndex","prefixedWith","slicedCommands","createNewSegmentGroup","getOutlets","updateSegmentGroup","createNewSegmentChildren","futureState","currState","forwardEvent","activate","parentContexts","futureRoot","currRoot","deactivateChildRoutes","advanceActivatedRoute","activateChildRoutes","futureNode","currNode","contexts","nodeChildrenAsMap","futureChild","childOutletName","deactivateRoutes","childName","deactivateRouteAndItsChildren","parentContext","future","getContext","shouldDetach","detachAndStoreRouteSubtree","deactivateRouteAndOutlet","onOutletDeactivated","deactivate","attachRef","resolver","activateRoutes","ActivationEnd","ChildActivationEnd","getOrCreateContext","stored","onOutletReAttached","attach","advanceActivatedRouteNodeAndItsChildren","_loadedConfig","parentLoadedConfig","cmpFactoryResolver","activateWith","routes","INITIAL_VALUE","scan","isPending","innerAcc","isUrlTree","ɵEmptyOutletComponent","RouterOutlet","parentPath","validateNode","getFullPath","fullPath","validateConfig","currentRoute","standardizeConfig","loadChildren","sortedConfig","getOutlet","matched","consumedSegments","lastChild","positionalParamSegments","matcher","defaultUrlMatcher","slicedSegments","relativeLinkResolution","emptyPathMatch","containsEmptyPathMatchesWithNamedOutlets","primarySegment","_sourceSegment","_segmentIndexShift","createChildrenForEmptyPaths","containsEmptyPathMatches","addEmptyPathsToChildrenIfNeeded","rawSegment","NoMatch","newTree","AbsoluteRedirect","redirectTo","configLoader","urlSerializer","allowRedirects","splitGroup","rootSegmentGroup","expandSegmentGroup","createUrlTree","squashSegmentGroup","catchError","noMatchError","expanded$","rootCandidate","expandChildren","expandSegment","childOutlets","sortedRoutes","sortByMatchingOutlets","expandedChild","takeLast","last$1","expandSegmentAgainstRoute","noLeftoversInUrl","isImmediateMatch","matchSegmentAgainstRoute","expandSegmentAgainstRouteUsingRedirect","noMatch$1","expandWildCardWithParamsAgainstRouteUsingRedirect","expandRegularSegmentAgainstRouteUsingRedirect","applyRedirectCommands","absoluteRedirect","lineralizeSegments","newSegments","rawSegmentGroup","cfg","rawSlicedSegments","getChildConfig","routerConfig","childModule","childConfig","splitSegmentGroup","matchedOnOutlet","cs","LoadedRouterConfig","runCanLoadGuards","shouldLoadResult","navigationCancelingError","canLoad","canLoadObservables","injectionToken","guard","guardVal","wrapIntoObservable","prioritizedGuardValue","namedOutletsRedirect","applyRedirectCreatreUrlTree","newRoot","createSegmentGroup","createQueryParams","redirectToParams","actualParams","sourceName","updatedSegments","createSegments","redirectToSegments","actualSegments","findPosParam","findOrReturn","redirectToUrlSegment","newChildren","childCandidate","mergeTrivialChildren","getChildRouteGuards","getClosestLoadedConfig","futurePath","checks","canDeactivateChecks","canActivateChecks","prevChildren","shouldRun","shouldRunGuardsAndResolvers","runGuardsAndResolvers","CanActivate","isActivated","CanDeactivate","getRouteGuards","rootComponentType","recognize","processSegmentGroup","freeze","rootNode","routeState","inheritParamsAndData","routeNode","inheritedParamsDataResolve","processSegment","outletChildren","mergedChildren","mergeEmptyPathMatches","sortActivatedRouteSnapshots","localeCompare","processSegmentAgainstRoute","getData","getSourceSegmentGroup","getPathIndexShift","getResolve","mergedNodes","hasEmptyPathConfig","duplicateEmptyPathNode","resultNode","mergedNode","detachedTree","ROUTES","compiler","onLoadStartListener","onLoadEndListener","_loader$","loadRunner","loadModuleFactory","ChildrenOutletContexts","onChildOutletCreated","onChildOutletDestroyed","OutletContext","shouldProcessUrl","extract","newUrlPart","wholeUrl","runExtras","exactMatchOptions","subsetMatchOptions","Router","rootContexts","lastSuccessfulNavigation","currentNavigation","disposed","lastLocationChangeInfo","navigationId","currentPageId","isNgZoneEnabled","events","defaultErrorHandler","malformedUriErrorHandler","defaultMalformedUriErrorHandler","navigated","lastSuccessfulId","beforePreactivation","defaultRouterHook","afterPreactivation","urlHandlingStrategy","DefaultUrlHandlingStrategy","DefaultRouteReuseStrategy","onSameUrlNavigation","urlUpdateStrategy","canceledNavigationResolution","ɵConsole","resetConfig","currentUrlTree","rawUrlTree","browserUrlTree","RouterConfigLoader","triggerEvent","RouteConfigLoadStart","RouteConfigLoadEnd","routerState","createEmptyState","targetPageId","currentRawUrl","extractedUrl","rawUrl","extras","targetSnapshot","currentRouterState","targetRouterState","guards","guardsResult","navigations","setupNavigations","processNavigations","ɵrouterPageId","eventsSubject","initialUrl","trigger","previousNavigation","urlTransition","processCurrentUrl","isBrowserTriggeredNavigation","NavigationStart","serializeUrl","ApplyRedirects","applyRedirects","applyRedirects$1","finalUrl","serializer","Recognizer","newObservableError","NoMatch$1","recognize$1","skipLocationChange","setBrowserUrl","routesRecognized","RoutesRecognized","navStart","replaceUrl","switchTap","appliedUrlTree","guardsStart","GuardsCheckStart","getAllRouteGuards","futureRSS","currRSS","currARS","canDeactivate","canDeactivateObservables","isCanDeactivate","runCanDeactivate","runCanDeactivateChecks","isBoolean","ChildActivationStart","fireChildActivationStart","ActivationStart","fireActivationStart","futureARS","canActivateChildGuardsMapped","canActivateChildGuards","canActivateChild","getCanActivateChild","defer","guardsMapped","isCanActivateChild","runCanActivateChild","canActivate","canActivateObservables","isCanActivate","runCanActivate","runCanActivateChecks","checkGuards","guardsEnd","GuardsCheckEnd","restoreHistory","cancelNavigationTransition","resolveStart","ResolveStart","dataResolved","canActivateChecksResolved","getResolver","resolveNode","resolvedData","runResolve","resolveData","resolveEnd","ResolveEnd","createRouterState","ActivateRoutes","FinallyOperator","finalize","cancelationReason","isNavigationCancelingError","redirecting","navCancel","NavigationCancel","mergedTree","scheduleNavigation","navError","NavigationError","ee","resetRootComponentType","getTransition","setTransition","initialNavigation","setUpLocationChangeListener","navigateByUrl","locationSubscription","currentChange","extractLocationChangeInfoFromEvent","shouldScheduleNavigation","stateCopy","parseUrl","sameDestination","getCurrentNavigation","dispose","navigationExtras","relativeTo","queryParamsHandling","preserveFragment","q","removeEmptyProps","nav","Navigation","cmd","cmdIdx","urlPart","partIndex","computeNavigation","startingPosition","Position","modifier","ci","dd","createPositionApplyingDoubleDots","findStartingPosition","navigate","validateCommands","isActive","matchOptions","containsTree","NavigationEnd","priorPromise","lastNavigation","browserNavPrecededByRouterNav","duplicateNav","browserPageId","generateNgRouterState","restoringFromCaughtError","targetPagePosition","resetState","resetUrlToCurrentUrlTree","routerPageId","UrlSerializer","RouterLink","router","onChanges","onClick","attrBoolValue","routerLink","RouterLinkWithHref","locationStrategy","updateTargetUrlAndHref","RouterLinkActive","cdr","link","linkWithHref","routerLinkActiveOptions","routerEventsSubscription","links","linksWithHrefs","subscribeToEachLinkOnChanges","linkInputChangesSubscription","allLinkChanges","isLinkActive","hasActiveLinks","isActiveMatchOptions","isActiveCheckFn","routerLinkActive","changeDetector","_activatedRoute","activateEvents","deactivateEvents","cmp","ref","activatedRoute","childContexts","OutletInjector","preload","RouterPreloader","moduleLoader","preloadingStrategy","setUpPreloading","processRoutes","preloadConfig","PreloadingStrategy","RouterScroller","viewportScroller","lastId","lastSource","restoredId","scrollPositionRestoration","anchorScrolling","createScrollEvents","scrollEventsSubscription","consumeScrollEvents","scheduleScrollEvent","ROUTER_CONFIGURATION","ROUTER_FORROOT_GUARD","ROUTER_PROVIDERS","assignExtraOptionsToRouter","enableTracing","groupEnd","NgModuleFactoryLoader","NoPreloading","NgProbeToken","RouterModule","forRoot","provideRoutes","provideForRootGuard","createRouterScroller","routerNgProbeToken","RouterInitializer","getAppInitializer","ROUTER_INITIALIZER","getBootstrapListener","provideRouterInitializer","scrollOffset","platformLocationStrategy","useHash","initNavigation","resultOfPreactivationDone","appInitializer","bootstrapListener","bootstrappedComponentRef","preloader","routerScroller","uc","label","brand","testimonial","l","createLinkForCanonicalURL","me","img","autoplay","slidesToShow","dots","centerPadding","centerMode","variableWidth","focusOnSelect","responsive","settings","arrows","swipe","lazyLoad","autoplaySpeed","seo","testimonials","rt","short","truncate","slickInit","toTestimonial","we","Re","tnc","Xe","toasts","textOrTpl","pd","P","AboutModule","ProductsModule","hasParams","regForm","fb","nama_toko","be","nama_pengguna","no_telp","jenis_usaha","alamat_toko","password","c_password","role_id","marketplace","is_active","pilihan_paket","jt","http","ts","viewTnC","stopPropagation","modalService","Eh","wi","oxw","toastService","Mh","isTemplate","$i","register","ERR_SW_NOT_SUPPORTED","serviceWorker","controllerChanges","controller","currentController","controllerWithChanges","worker","registration","getRegistration","rawEventPayload","postMessage","payload","sw","postMessageWithStatus","nonce","waitForStatus","generateNonce","eventsOfType","nextEventOfType","SwPush","subscriptionChanges","isEnabled","messages","notificationClicks","pushManager","workerDrivenSubscriptions","pm","getSubscription","requestSubscription","pushOptions","userVisibleOnly","decodeBase64","serverPublicKey","applicationServerKey","Uint8Array","success","atob","NgswCommChannel","SwUpdate","available","unrecoverable","checkForUpdate","statusNonce","activateUpdate","script","readyToRegister$","registrationStrategy","strategy","delayWithTimeout","stable","ServiceWorkerModule","SwRegistrationOptions","ngswCommChannelFactory","ngswAppInitializer","nl","Qn","xh","Sr"],"sources":["./$_lazy_route_resources|lazy|groupOptions: {}|namespace object","./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js","./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js","./node_modules/rxjs/_esm2015/internal/observable/forkJoin.js","./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js","./node_modules/rxjs/_esm2015/internal/util/isNumeric.js","./node_modules/rxjs/_esm2015/internal/observable/timer.js","./node_modules/rxjs/_esm2015/internal/observable/race.js","./node_modules/rxjs/_esm2015/internal/observable/zip.js","./node_modules/rxjs/_esm2015/internal/operators/takeUntil.js","./node_modules/rxjs/_esm2015/internal/operators/distinctUntilChanged.js","./node_modules/rxjs/_esm2015/internal/operators/withLatestFrom.js","./node_modules/@ng-bootstrap/ng-bootstrap/__ivy_ngcc__/fesm2015/ng-bootstrap.js","./node_modules/rxjs/_esm2015/internal/operators/endWith.js","./node_modules/ngx-slick-carousel/__ivy_ngcc__/fesm2015/ngx-slick-carousel.js","./node_modules/rxjs/_esm2015/internal/BehaviorSubject.js","./node_modules/rxjs/_esm2015/internal/Observable.js","./node_modules/rxjs/_esm2015/internal/util/toSubscriber.js","./node_modules/rxjs/_esm2015/internal/util/canReportError.js","./node_modules/rxjs/_esm2015/internal/util/pipe.js","./node_modules/rxjs/_esm2015/internal/Observer.js","./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js","./node_modules/rxjs/_esm2015/internal/SubjectSubscription.js","./node_modules/rxjs/_esm2015/internal/Subject.js","./node_modules/rxjs/_esm2015/internal/Subscriber.js","./node_modules/rxjs/_esm2015/internal/util/UnsubscriptionError.js","./node_modules/rxjs/_esm2015/internal/Subscription.js","./node_modules/rxjs/_esm2015/internal/config.js","./node_modules/rxjs/_esm2015/internal/innerSubscribe.js","./node_modules/rxjs/_esm2015/internal/observable/ConnectableObservable.js","./node_modules/rxjs/_esm2015/internal/observable/combineLatest.js","./node_modules/rxjs/_esm2015/internal/observable/concat.js","./node_modules/rxjs/_esm2015/internal/operators/concatAll.js","./node_modules/rxjs/_esm2015/internal/observable/empty.js","./node_modules/rxjs/_esm2015/internal/observable/from.js","./node_modules/rxjs/_esm2015/internal/scheduled/scheduled.js","./node_modules/rxjs/_esm2015/internal/util/isInteropObservable.js","./node_modules/rxjs/_esm2015/internal/scheduled/scheduleObservable.js","./node_modules/rxjs/_esm2015/internal/scheduled/schedulePromise.js","./node_modules/rxjs/_esm2015/internal/util/isIterable.js","./node_modules/rxjs/_esm2015/internal/scheduled/scheduleIterable.js","./node_modules/rxjs/_esm2015/internal/observable/fromArray.js","./node_modules/rxjs/_esm2015/internal/observable/fromEvent.js","./node_modules/rxjs/_esm2015/internal/observable/merge.js","./node_modules/rxjs/_esm2015/internal/observable/never.js","./node_modules/rxjs/_esm2015/internal/observable/of.js","./node_modules/rxjs/_esm2015/internal/observable/throwError.js","./node_modules/rxjs/_esm2015/internal/Notification.js","./node_modules/rxjs/_esm2015/internal/operators/delay.js","./node_modules/rxjs/_esm2015/internal/util/isDate.js","./node_modules/rxjs/_esm2015/internal/operators/filter.js","./node_modules/rxjs/_esm2015/internal/operators/map.js","./node_modules/rxjs/_esm2015/internal/operators/mergeAll.js","./node_modules/rxjs/_esm2015/internal/operators/mergeMap.js","./node_modules/rxjs/_esm2015/internal/operators/multicast.js","./node_modules/rxjs/_esm2015/internal/operators/refCount.js","./node_modules/rxjs/_esm2015/internal/operators/share.js","./node_modules/rxjs/_esm2015/internal/operators/startWith.js","./node_modules/rxjs/_esm2015/internal/operators/switchMap.js","./node_modules/rxjs/_esm2015/internal/operators/take.js","./node_modules/rxjs/_esm2015/internal/operators/tap.js","./node_modules/rxjs/_esm2015/internal/scheduled/scheduleArray.js","./node_modules/rxjs/_esm2015/internal/scheduler/Action.js","./node_modules/rxjs/_esm2015/internal/Scheduler.js","./node_modules/rxjs/_esm2015/internal/scheduler/AsyncScheduler.js","./node_modules/rxjs/_esm2015/internal/scheduler/async.js","./node_modules/rxjs/_esm2015/internal/scheduler/AsyncAction.js","./node_modules/rxjs/_esm2015/internal/symbol/iterator.js","./node_modules/rxjs/_esm2015/internal/symbol/observable.js","./node_modules/rxjs/_esm2015/internal/symbol/rxSubscriber.js","./node_modules/rxjs/_esm2015/internal/util/ArgumentOutOfRangeError.js","./node_modules/rxjs/_esm2015/internal/util/ObjectUnsubscribedError.js","./node_modules/rxjs/_esm2015/internal/util/hostReportError.js","./node_modules/rxjs/_esm2015/internal/util/identity.js","./node_modules/rxjs/_esm2015/internal/util/isArray.js","./node_modules/rxjs/_esm2015/internal/util/isArrayLike.js","./node_modules/rxjs/_esm2015/internal/util/isFunction.js","./node_modules/rxjs/_esm2015/internal/util/isObject.js","./node_modules/rxjs/_esm2015/internal/util/isPromise.js","./node_modules/rxjs/_esm2015/internal/util/isScheduler.js","./node_modules/rxjs/_esm2015/internal/util/noop.js","./node_modules/rxjs/_esm2015/internal/util/subscribeTo.js","./node_modules/rxjs/_esm2015/internal/util/subscribeToObservable.js","./node_modules/rxjs/_esm2015/internal/util/subscribeToPromise.js","./node_modules/rxjs/_esm2015/internal/util/subscribeToIterable.js","./node_modules/rxjs/_esm2015/internal/util/subscribeToArray.js","./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js","./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js","./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js","./node_modules/rxjs/_esm2015/internal/operators/concatMap.js","./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js","./node_modules/rxjs/_esm2015/internal/util/EmptyError.js","./node_modules/rxjs/_esm2015/internal/observable/defer.js","./node_modules/rxjs/_esm2015/internal/operators/scan.js","./node_modules/rxjs/_esm2015/internal/operators/catchError.js","./node_modules/rxjs/_esm2015/internal/operators/takeLast.js","./node_modules/rxjs/_esm2015/internal/operators/throwIfEmpty.js","./node_modules/rxjs/_esm2015/internal/operators/defaultIfEmpty.js","./node_modules/rxjs/_esm2015/internal/operators/first.js","./node_modules/rxjs/_esm2015/internal/operators/finalize.js","./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js","./node_modules/rxjs/_esm2015/internal/operators/last.js","./src/app/dashboard/clients.ts","./src/app/seo.service.ts","./src/app/dashboard/dashboard.component.html","./src/app/dashboard/dashboard.component.ts","./src/app/products/tnc/tnc.ts","./src/app/products/tnc/tnc.component.ts","./src/app/products/tnc/tnc.component.html","./src/app/toast.service.ts","./src/app/products/register/register.component.html","./src/app/app-routing.module.ts","./src/app/products/register/register.component.ts","./src/app/toast/toast.component.ts","./src/app/app.component.ts","./src/app/app.component.html","./node_modules/@angular/service-worker/__ivy_ngcc__/fesm2015/service-worker.js","./node_modules/rxjs/_esm2015/internal/operators/publish.js","./src/app/app.module.ts","./src/environments/environment.prod.ts","./src/main.ts"],"sourcesContent":["function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(() => {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = () => ([]);\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = 8255;\nmodule.exports = webpackEmptyAsyncContext;","/**\n * @license Angular v12.2.5\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { InjectionToken, ɵɵdefineInjectable, Injectable, ɵɵinject, Inject, Optional, EventEmitter, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵisListLikeIterable, ɵstringify, Directive, IterableDiffers, KeyValueDiffers, ElementRef, Renderer2, Input, NgModuleRef, ComponentFactoryResolver, ViewContainerRef, TemplateRef, Host, ɵRuntimeError, Attribute, ɵisPromise, ɵisSubscribable, Pipe, ChangeDetectorRef, DEFAULT_CURRENCY_CODE, NgModule, Version } from '@angular/core';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport * as ɵngcc0 from '@angular/core';\nlet _DOM = null;\nfunction getDOM() {\n    return _DOM;\n}\nfunction setDOM(adapter) {\n    _DOM = adapter;\n}\nfunction setRootDomAdapter(adapter) {\n    if (!_DOM) {\n        _DOM = adapter;\n    }\n}\n/* tslint:disable:requireParameterType */\n/**\n * Provides DOM operations in an environment-agnostic way.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nclass DomAdapter {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A DI Token representing the main rendering context. In a browser this is the DOM Document.\n *\n * Note: Document might not be available in the Application Context when Application and Rendering\n * Contexts are not the same (e.g. when running the application in a Web Worker).\n *\n * @publicApi\n */\nconst DOCUMENT = new InjectionToken('DocumentToken');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n *\n * `PlatformLocation` encapsulates all calls to DOM APIs, which allows the Router to be\n * platform-agnostic.\n * This means that we can have different implementation of `PlatformLocation` for the different\n * platforms that Angular supports. For example, `@angular/platform-browser` provides an\n * implementation specific to the browser environment, while `@angular/platform-server` provides\n * one suitable for use with server-side rendering.\n *\n * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}\n * when they need to interact with the DOM APIs like pushState, popState, etc.\n *\n * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly\n * by the {@link Router} in order to navigate between routes. Since all interactions between {@link\n * Router} /\n * {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation`\n * class, they are all platform-agnostic.\n *\n * @publicApi\n */\nclass PlatformLocation {\n    historyGo(relativePosition) {\n        throw new Error('Not implemented');\n    }\n}\nPlatformLocation.ɵfac = function PlatformLocation_Factory(t) { return new (t || PlatformLocation)(); };\nPlatformLocation.ɵprov = ɵɵdefineInjectable({ factory: useBrowserPlatformLocation, token: PlatformLocation, providedIn: \"platform\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(PlatformLocation, [{\n        type: Injectable,\n        args: [{\n                providedIn: 'platform',\n                // See #23917\n                useFactory: useBrowserPlatformLocation\n            }]\n    }], null, null); })();\nfunction useBrowserPlatformLocation() {\n    return ɵɵinject(BrowserPlatformLocation);\n}\n/**\n * @description\n * Indicates when a location is initialized.\n *\n * @publicApi\n */\nconst LOCATION_INITIALIZED = new InjectionToken('Location Initialized');\n/**\n * `PlatformLocation` encapsulates all of the direct calls to platform APIs.\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n */\nclass BrowserPlatformLocation extends PlatformLocation {\n    constructor(_doc) {\n        super();\n        this._doc = _doc;\n        this._init();\n    }\n    // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it\n    /** @internal */\n    _init() {\n        this.location = window.location;\n        this._history = window.history;\n    }\n    getBaseHrefFromDOM() {\n        return getDOM().getBaseHref(this._doc);\n    }\n    onPopState(fn) {\n        const window = getDOM().getGlobalEventTarget(this._doc, 'window');\n        window.addEventListener('popstate', fn, false);\n        return () => window.removeEventListener('popstate', fn);\n    }\n    onHashChange(fn) {\n        const window = getDOM().getGlobalEventTarget(this._doc, 'window');\n        window.addEventListener('hashchange', fn, false);\n        return () => window.removeEventListener('hashchange', fn);\n    }\n    get href() {\n        return this.location.href;\n    }\n    get protocol() {\n        return this.location.protocol;\n    }\n    get hostname() {\n        return this.location.hostname;\n    }\n    get port() {\n        return this.location.port;\n    }\n    get pathname() {\n        return this.location.pathname;\n    }\n    get search() {\n        return this.location.search;\n    }\n    get hash() {\n        return this.location.hash;\n    }\n    set pathname(newPath) {\n        this.location.pathname = newPath;\n    }\n    pushState(state, title, url) {\n        if (supportsState()) {\n            this._history.pushState(state, title, url);\n        }\n        else {\n            this.location.hash = url;\n        }\n    }\n    replaceState(state, title, url) {\n        if (supportsState()) {\n            this._history.replaceState(state, title, url);\n        }\n        else {\n            this.location.hash = url;\n        }\n    }\n    forward() {\n        this._history.forward();\n    }\n    back() {\n        this._history.back();\n    }\n    historyGo(relativePosition = 0) {\n        this._history.go(relativePosition);\n    }\n    getState() {\n        return this._history.state;\n    }\n}\nBrowserPlatformLocation.ɵfac = function BrowserPlatformLocation_Factory(t) { return new (t || BrowserPlatformLocation)(ɵngcc0.ɵɵinject(DOCUMENT)); };\nBrowserPlatformLocation.ɵprov = ɵɵdefineInjectable({ factory: createBrowserPlatformLocation, token: BrowserPlatformLocation, providedIn: \"platform\" });\nBrowserPlatformLocation.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BrowserPlatformLocation, [{\n        type: Injectable,\n        args: [{\n                providedIn: 'platform',\n                // See #23917\n                useFactory: createBrowserPlatformLocation\n            }]\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }]; }, null); })();\nfunction supportsState() {\n    return !!window.history.pushState;\n}\nfunction createBrowserPlatformLocation() {\n    return new BrowserPlatformLocation(ɵɵinject(DOCUMENT));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Joins two parts of a URL with a slash if needed.\n *\n * @param start  URL string\n * @param end    URL string\n *\n *\n * @returns The joined URL string.\n */\nfunction joinWithSlash(start, end) {\n    if (start.length == 0) {\n        return end;\n    }\n    if (end.length == 0) {\n        return start;\n    }\n    let slashes = 0;\n    if (start.endsWith('/')) {\n        slashes++;\n    }\n    if (end.startsWith('/')) {\n        slashes++;\n    }\n    if (slashes == 2) {\n        return start + end.substring(1);\n    }\n    if (slashes == 1) {\n        return start + end;\n    }\n    return start + '/' + end;\n}\n/**\n * Removes a trailing slash from a URL string if needed.\n * Looks for the first occurrence of either `#`, `?`, or the end of the\n * line as `/` characters and removes the trailing slash if one exists.\n *\n * @param url URL string.\n *\n * @returns The URL string, modified if needed.\n */\nfunction stripTrailingSlash(url) {\n    const match = url.match(/#|\\?|$/);\n    const pathEndIdx = match && match.index || url.length;\n    const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n    return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}\n/**\n * Normalizes URL parameters by prepending with `?` if needed.\n *\n * @param  params String of URL parameters.\n *\n * @returns The normalized URL parameters string.\n */\nfunction normalizeQueryParams(params) {\n    return params && params[0] !== '?' ? '?' + params : params;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Enables the `Location` service to read route state from the browser's URL.\n * Angular provides two strategies:\n * `HashLocationStrategy` and `PathLocationStrategy`.\n *\n * Applications should use the `Router` or `Location` services to\n * interact with application route state.\n *\n * For instance, `HashLocationStrategy` produces URLs like\n * <code class=\"no-auto-link\">http://example.com#/foo</code>,\n * and `PathLocationStrategy` produces\n * <code class=\"no-auto-link\">http://example.com/foo</code> as an equivalent URL.\n *\n * See these two classes for more.\n *\n * @publicApi\n */\nclass LocationStrategy {\n    historyGo(relativePosition) {\n        throw new Error('Not implemented');\n    }\n}\nLocationStrategy.ɵfac = function LocationStrategy_Factory(t) { return new (t || LocationStrategy)(); };\nLocationStrategy.ɵprov = ɵɵdefineInjectable({ factory: provideLocationStrategy, token: LocationStrategy, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(LocationStrategy, [{\n        type: Injectable,\n        args: [{ providedIn: 'root', useFactory: provideLocationStrategy }]\n    }], null, null); })();\nfunction provideLocationStrategy(platformLocation) {\n    // See #23917\n    const location = ɵɵinject(DOCUMENT).location;\n    return new PathLocationStrategy(ɵɵinject(PlatformLocation), location && location.origin || '');\n}\n/**\n * A predefined [DI token](guide/glossary#di-token) for the base href\n * to be used with the `PathLocationStrategy`.\n * The base href is the URL prefix that should be preserved when generating\n * and recognizing URLs.\n *\n * @usageNotes\n *\n * The following example shows how to use this token to configure the root app injector\n * with a base href value, so that the DI framework can supply the dependency anywhere in the app.\n *\n * ```typescript\n * import {Component, NgModule} from '@angular/core';\n * import {APP_BASE_HREF} from '@angular/common';\n *\n * @NgModule({\n *   providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]\n * })\n * class AppModule {}\n * ```\n *\n * @publicApi\n */\nconst APP_BASE_HREF = new InjectionToken('appBaseHref');\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the\n * browser's URL.\n *\n * If you're using `PathLocationStrategy`, you must provide a {@link APP_BASE_HREF}\n * or add a `<base href>` element to the document.\n *\n * For instance, if you provide an `APP_BASE_HREF` of `'/my/app/'` and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`. To ensure all relative URIs resolve correctly,\n * the `<base href>` and/or `APP_BASE_HREF` should end with a `/`.\n *\n * Similarly, if you add `<base href='/my/app/'/>` to the document and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`.\n *\n * Note that when using `PathLocationStrategy`, neither the query nor\n * the fragment in the `<base href>` will be preserved, as outlined\n * by the [RFC](https://tools.ietf.org/html/rfc3986#section-5.2.2).\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/path_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\nclass PathLocationStrategy extends LocationStrategy {\n    constructor(_platformLocation, href) {\n        super();\n        this._platformLocation = _platformLocation;\n        this._removeListenerFns = [];\n        if (href == null) {\n            href = this._platformLocation.getBaseHrefFromDOM();\n        }\n        if (href == null) {\n            throw new Error(`No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.`);\n        }\n        this._baseHref = href;\n    }\n    ngOnDestroy() {\n        while (this._removeListenerFns.length) {\n            this._removeListenerFns.pop()();\n        }\n    }\n    onPopState(fn) {\n        this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn));\n    }\n    getBaseHref() {\n        return this._baseHref;\n    }\n    prepareExternalUrl(internal) {\n        return joinWithSlash(this._baseHref, internal);\n    }\n    path(includeHash = false) {\n        const pathname = this._platformLocation.pathname + normalizeQueryParams(this._platformLocation.search);\n        const hash = this._platformLocation.hash;\n        return hash && includeHash ? `${pathname}${hash}` : pathname;\n    }\n    pushState(state, title, url, queryParams) {\n        const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n        this._platformLocation.pushState(state, title, externalUrl);\n    }\n    replaceState(state, title, url, queryParams) {\n        const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n        this._platformLocation.replaceState(state, title, externalUrl);\n    }\n    forward() {\n        this._platformLocation.forward();\n    }\n    back() {\n        this._platformLocation.back();\n    }\n    historyGo(relativePosition = 0) {\n        var _a, _b;\n        (_b = (_a = this._platformLocation).historyGo) === null || _b === void 0 ? void 0 : _b.call(_a, relativePosition);\n    }\n}\nPathLocationStrategy.ɵfac = function PathLocationStrategy_Factory(t) { return new (t || PathLocationStrategy)(ɵngcc0.ɵɵinject(PlatformLocation), ɵngcc0.ɵɵinject(APP_BASE_HREF, 8)); };\nPathLocationStrategy.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: PathLocationStrategy, factory: PathLocationStrategy.ɵfac });\nPathLocationStrategy.ctorParameters = () => [\n    { type: PlatformLocation },\n    { type: String, decorators: [{ type: Optional }, { type: Inject, args: [APP_BASE_HREF,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(PathLocationStrategy, [{\n        type: Injectable\n    }], function () { return [{ type: PlatformLocation }, { type: String, decorators: [{\n                type: Optional\n            }, {\n                type: Inject,\n                args: [APP_BASE_HREF]\n            }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)\n * of the browser's URL.\n *\n * For instance, if you call `location.go('/foo')`, the browser's URL will become\n * `example.com#/foo`.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/hash_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\nclass HashLocationStrategy extends LocationStrategy {\n    constructor(_platformLocation, _baseHref) {\n        super();\n        this._platformLocation = _platformLocation;\n        this._baseHref = '';\n        this._removeListenerFns = [];\n        if (_baseHref != null) {\n            this._baseHref = _baseHref;\n        }\n    }\n    ngOnDestroy() {\n        while (this._removeListenerFns.length) {\n            this._removeListenerFns.pop()();\n        }\n    }\n    onPopState(fn) {\n        this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn));\n    }\n    getBaseHref() {\n        return this._baseHref;\n    }\n    path(includeHash = false) {\n        // the hash value is always prefixed with a `#`\n        // and if it is empty then it will stay empty\n        let path = this._platformLocation.hash;\n        if (path == null)\n            path = '#';\n        return path.length > 0 ? path.substring(1) : path;\n    }\n    prepareExternalUrl(internal) {\n        const url = joinWithSlash(this._baseHref, internal);\n        return url.length > 0 ? ('#' + url) : url;\n    }\n    pushState(state, title, path, queryParams) {\n        let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));\n        if (url.length == 0) {\n            url = this._platformLocation.pathname;\n        }\n        this._platformLocation.pushState(state, title, url);\n    }\n    replaceState(state, title, path, queryParams) {\n        let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));\n        if (url.length == 0) {\n            url = this._platformLocation.pathname;\n        }\n        this._platformLocation.replaceState(state, title, url);\n    }\n    forward() {\n        this._platformLocation.forward();\n    }\n    back() {\n        this._platformLocation.back();\n    }\n    historyGo(relativePosition = 0) {\n        var _a, _b;\n        (_b = (_a = this._platformLocation).historyGo) === null || _b === void 0 ? void 0 : _b.call(_a, relativePosition);\n    }\n}\nHashLocationStrategy.ɵfac = function HashLocationStrategy_Factory(t) { return new (t || HashLocationStrategy)(ɵngcc0.ɵɵinject(PlatformLocation), ɵngcc0.ɵɵinject(APP_BASE_HREF, 8)); };\nHashLocationStrategy.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: HashLocationStrategy, factory: HashLocationStrategy.ɵfac });\nHashLocationStrategy.ctorParameters = () => [\n    { type: PlatformLocation },\n    { type: String, decorators: [{ type: Optional }, { type: Inject, args: [APP_BASE_HREF,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(HashLocationStrategy, [{\n        type: Injectable\n    }], function () { return [{ type: PlatformLocation }, { type: String, decorators: [{\n                type: Optional\n            }, {\n                type: Inject,\n                args: [APP_BASE_HREF]\n            }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * A service that applications can use to interact with a browser's URL.\n *\n * Depending on the `LocationStrategy` used, `Location` persists\n * to the URL's path or the URL's hash segment.\n *\n * @usageNotes\n *\n * It's better to use the `Router.navigate()` service to trigger route changes. Use\n * `Location` only if you need to interact with or create normalized URLs outside of\n * routing.\n *\n * `Location` is responsible for normalizing the URL against the application's base href.\n * A normalized URL is absolute from the URL host, includes the application's base href, and has no\n * trailing slash:\n * - `/my/app/user/123` is normalized\n * - `my/app/user/123` **is not** normalized\n * - `/my/app/user/123/` **is not** normalized\n *\n * ### Example\n *\n * <code-example path='common/location/ts/path_location_component.ts'\n * region='LocationComponent'></code-example>\n *\n * @publicApi\n */\nclass Location {\n    constructor(platformStrategy, platformLocation) {\n        /** @internal */\n        this._subject = new EventEmitter();\n        /** @internal */\n        this._urlChangeListeners = [];\n        this._platformStrategy = platformStrategy;\n        const browserBaseHref = this._platformStrategy.getBaseHref();\n        this._platformLocation = platformLocation;\n        this._baseHref = stripTrailingSlash(_stripIndexHtml(browserBaseHref));\n        this._platformStrategy.onPopState((ev) => {\n            this._subject.emit({\n                'url': this.path(true),\n                'pop': true,\n                'state': ev.state,\n                'type': ev.type,\n            });\n        });\n    }\n    /**\n     * Normalizes the URL path for this location.\n     *\n     * @param includeHash True to include an anchor fragment in the path.\n     *\n     * @returns The normalized URL path.\n     */\n    // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is\n    // removed.\n    path(includeHash = false) {\n        return this.normalize(this._platformStrategy.path(includeHash));\n    }\n    /**\n     * Reports the current state of the location history.\n     * @returns The current value of the `history.state` object.\n     */\n    getState() {\n        return this._platformLocation.getState();\n    }\n    /**\n     * Normalizes the given path and compares to the current normalized path.\n     *\n     * @param path The given URL path.\n     * @param query Query parameters.\n     *\n     * @returns True if the given URL path is equal to the current normalized path, false\n     * otherwise.\n     */\n    isCurrentPathEqualTo(path, query = '') {\n        return this.path() == this.normalize(path + normalizeQueryParams(query));\n    }\n    /**\n     * Normalizes a URL path by stripping any trailing slashes.\n     *\n     * @param url String representing a URL.\n     *\n     * @returns The normalized URL string.\n     */\n    normalize(url) {\n        return Location.stripTrailingSlash(_stripBaseHref(this._baseHref, _stripIndexHtml(url)));\n    }\n    /**\n     * Normalizes an external URL path.\n     * If the given URL doesn't begin with a leading slash (`'/'`), adds one\n     * before normalizing. Adds a hash if `HashLocationStrategy` is\n     * in use, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.\n     *\n     * @param url String representing a URL.\n     *\n     * @returns  A normalized platform-specific URL.\n     */\n    prepareExternalUrl(url) {\n        if (url && url[0] !== '/') {\n            url = '/' + url;\n        }\n        return this._platformStrategy.prepareExternalUrl(url);\n    }\n    // TODO: rename this method to pushState\n    /**\n     * Changes the browser's URL to a normalized version of a given URL, and pushes a\n     * new item onto the platform's history.\n     *\n     * @param path  URL path to normalize.\n     * @param query Query parameters.\n     * @param state Location history state.\n     *\n     */\n    go(path, query = '', state = null) {\n        this._platformStrategy.pushState(state, '', path, query);\n        this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);\n    }\n    /**\n     * Changes the browser's URL to a normalized version of the given URL, and replaces\n     * the top item on the platform's history stack.\n     *\n     * @param path  URL path to normalize.\n     * @param query Query parameters.\n     * @param state Location history state.\n     */\n    replaceState(path, query = '', state = null) {\n        this._platformStrategy.replaceState(state, '', path, query);\n        this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);\n    }\n    /**\n     * Navigates forward in the platform's history.\n     */\n    forward() {\n        this._platformStrategy.forward();\n    }\n    /**\n     * Navigates back in the platform's history.\n     */\n    back() {\n        this._platformStrategy.back();\n    }\n    /**\n     * Navigate to a specific page from session history, identified by its relative position to the\n     * current page.\n     *\n     * @param relativePosition  Position of the target page in the history relative to the current\n     *     page.\n     * A negative value moves backwards, a positive value moves forwards, e.g. `location.historyGo(2)`\n     * moves forward two pages and `location.historyGo(-2)` moves back two pages. When we try to go\n     * beyond what's stored in the history session, we stay in the current page. Same behaviour occurs\n     * when `relativePosition` equals 0.\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/History_API#Moving_to_a_specific_point_in_history\n     */\n    historyGo(relativePosition = 0) {\n        var _a, _b;\n        (_b = (_a = this._platformStrategy).historyGo) === null || _b === void 0 ? void 0 : _b.call(_a, relativePosition);\n    }\n    /**\n     * Registers a URL change listener. Use to catch updates performed by the Angular\n     * framework that are not detectible through \"popstate\" or \"hashchange\" events.\n     *\n     * @param fn The change handler function, which take a URL and a location history state.\n     */\n    onUrlChange(fn) {\n        this._urlChangeListeners.push(fn);\n        if (!this._urlChangeSubscription) {\n            this._urlChangeSubscription = this.subscribe(v => {\n                this._notifyUrlChangeListeners(v.url, v.state);\n            });\n        }\n    }\n    /** @internal */\n    _notifyUrlChangeListeners(url = '', state) {\n        this._urlChangeListeners.forEach(fn => fn(url, state));\n    }\n    /**\n     * Subscribes to the platform's `popState` events.\n     *\n     * Note: `Location.go()` does not trigger the `popState` event in the browser. Use\n     * `Location.onUrlChange()` to subscribe to URL changes instead.\n     *\n     * @param value Event that is triggered when the state history changes.\n     * @param exception The exception to throw.\n     *\n     * @see [onpopstate](https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate)\n     *\n     * @returns Subscribed events.\n     */\n    subscribe(onNext, onThrow, onReturn) {\n        return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn });\n    }\n}\nLocation.ɵfac = function Location_Factory(t) { return new (t || Location)(ɵngcc0.ɵɵinject(LocationStrategy), ɵngcc0.ɵɵinject(PlatformLocation)); };\n/**\n * Normalizes URL parameters by prepending with `?` if needed.\n *\n * @param  params String of URL parameters.\n *\n * @returns The normalized URL parameters string.\n */\nLocation.normalizeQueryParams = normalizeQueryParams;\n/**\n * Joins two parts of a URL with a slash if needed.\n *\n * @param start  URL string\n * @param end    URL string\n *\n *\n * @returns The joined URL string.\n */\nLocation.joinWithSlash = joinWithSlash;\n/**\n * Removes a trailing slash from a URL string if needed.\n * Looks for the first occurrence of either `#`, `?`, or the end of the\n * line as `/` characters and removes the trailing slash if one exists.\n *\n * @param url URL string.\n *\n * @returns The URL string, modified if needed.\n */\nLocation.stripTrailingSlash = stripTrailingSlash;\nLocation.ɵprov = ɵɵdefineInjectable({ factory: createLocation, token: Location, providedIn: \"root\" });\nLocation.ctorParameters = () => [\n    { type: LocationStrategy },\n    { type: PlatformLocation }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(Location, [{\n        type: Injectable,\n        args: [{\n                providedIn: 'root',\n                // See #23917\n                useFactory: createLocation\n            }]\n    }], function () { return [{ type: LocationStrategy }, { type: PlatformLocation }]; }, null); })();\nfunction createLocation() {\n    return new Location(ɵɵinject(LocationStrategy), ɵɵinject(PlatformLocation));\n}\nfunction _stripBaseHref(baseHref, url) {\n    return baseHref && url.startsWith(baseHref) ? url.substring(baseHref.length) : url;\n}\nfunction _stripIndexHtml(url) {\n    return url.replace(/\\/index.html$/, '');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** @internal */\nconst CURRENCIES_EN = { \"ADP\": [undefined, undefined, 0], \"AFN\": [undefined, undefined, 0], \"ALL\": [undefined, undefined, 0], \"AMD\": [undefined, undefined, 2], \"AOA\": [undefined, \"Kz\"], \"ARS\": [undefined, \"$\"], \"AUD\": [\"A$\", \"$\"], \"BAM\": [undefined, \"KM\"], \"BBD\": [undefined, \"$\"], \"BDT\": [undefined, \"৳\"], \"BHD\": [undefined, undefined, 3], \"BIF\": [undefined, undefined, 0], \"BMD\": [undefined, \"$\"], \"BND\": [undefined, \"$\"], \"BOB\": [undefined, \"Bs\"], \"BRL\": [\"R$\"], \"BSD\": [undefined, \"$\"], \"BWP\": [undefined, \"P\"], \"BYN\": [undefined, \"р.\", 2], \"BYR\": [undefined, undefined, 0], \"BZD\": [undefined, \"$\"], \"CAD\": [\"CA$\", \"$\", 2], \"CHF\": [undefined, undefined, 2], \"CLF\": [undefined, undefined, 4], \"CLP\": [undefined, \"$\", 0], \"CNY\": [\"CN¥\", \"¥\"], \"COP\": [undefined, \"$\", 2], \"CRC\": [undefined, \"₡\", 2], \"CUC\": [undefined, \"$\"], \"CUP\": [undefined, \"$\"], \"CZK\": [undefined, \"Kč\", 2], \"DJF\": [undefined, undefined, 0], \"DKK\": [undefined, \"kr\", 2], \"DOP\": [undefined, \"$\"], \"EGP\": [undefined, \"E£\"], \"ESP\": [undefined, \"₧\", 0], \"EUR\": [\"€\"], \"FJD\": [undefined, \"$\"], \"FKP\": [undefined, \"£\"], \"GBP\": [\"£\"], \"GEL\": [undefined, \"₾\"], \"GIP\": [undefined, \"£\"], \"GNF\": [undefined, \"FG\", 0], \"GTQ\": [undefined, \"Q\"], \"GYD\": [undefined, \"$\", 2], \"HKD\": [\"HK$\", \"$\"], \"HNL\": [undefined, \"L\"], \"HRK\": [undefined, \"kn\"], \"HUF\": [undefined, \"Ft\", 2], \"IDR\": [undefined, \"Rp\", 2], \"ILS\": [\"₪\"], \"INR\": [\"₹\"], \"IQD\": [undefined, undefined, 0], \"IRR\": [undefined, undefined, 0], \"ISK\": [undefined, \"kr\", 0], \"ITL\": [undefined, undefined, 0], \"JMD\": [undefined, \"$\"], \"JOD\": [undefined, undefined, 3], \"JPY\": [\"¥\", undefined, 0], \"KHR\": [undefined, \"៛\"], \"KMF\": [undefined, \"CF\", 0], \"KPW\": [undefined, \"₩\", 0], \"KRW\": [\"₩\", undefined, 0], \"KWD\": [undefined, undefined, 3], \"KYD\": [undefined, \"$\"], \"KZT\": [undefined, \"₸\"], \"LAK\": [undefined, \"₭\", 0], \"LBP\": [undefined, \"L£\", 0], \"LKR\": [undefined, \"Rs\"], \"LRD\": [undefined, \"$\"], \"LTL\": [undefined, \"Lt\"], \"LUF\": [undefined, undefined, 0], \"LVL\": [undefined, \"Ls\"], \"LYD\": [undefined, undefined, 3], \"MGA\": [undefined, \"Ar\", 0], \"MGF\": [undefined, undefined, 0], \"MMK\": [undefined, \"K\", 0], \"MNT\": [undefined, \"₮\", 2], \"MRO\": [undefined, undefined, 0], \"MUR\": [undefined, \"Rs\", 2], \"MXN\": [\"MX$\", \"$\"], \"MYR\": [undefined, \"RM\"], \"NAD\": [undefined, \"$\"], \"NGN\": [undefined, \"₦\"], \"NIO\": [undefined, \"C$\"], \"NOK\": [undefined, \"kr\", 2], \"NPR\": [undefined, \"Rs\"], \"NZD\": [\"NZ$\", \"$\"], \"OMR\": [undefined, undefined, 3], \"PHP\": [undefined, \"₱\"], \"PKR\": [undefined, \"Rs\", 2], \"PLN\": [undefined, \"zł\"], \"PYG\": [undefined, \"₲\", 0], \"RON\": [undefined, \"lei\"], \"RSD\": [undefined, undefined, 0], \"RUB\": [undefined, \"₽\"], \"RUR\": [undefined, \"р.\"], \"RWF\": [undefined, \"RF\", 0], \"SBD\": [undefined, \"$\"], \"SEK\": [undefined, \"kr\", 2], \"SGD\": [undefined, \"$\"], \"SHP\": [undefined, \"£\"], \"SLL\": [undefined, undefined, 0], \"SOS\": [undefined, undefined, 0], \"SRD\": [undefined, \"$\"], \"SSP\": [undefined, \"£\"], \"STD\": [undefined, undefined, 0], \"STN\": [undefined, \"Db\"], \"SYP\": [undefined, \"£\", 0], \"THB\": [undefined, \"฿\"], \"TMM\": [undefined, undefined, 0], \"TND\": [undefined, undefined, 3], \"TOP\": [undefined, \"T$\"], \"TRL\": [undefined, undefined, 0], \"TRY\": [undefined, \"₺\"], \"TTD\": [undefined, \"$\"], \"TWD\": [\"NT$\", \"$\", 2], \"TZS\": [undefined, undefined, 2], \"UAH\": [undefined, \"₴\"], \"UGX\": [undefined, undefined, 0], \"USD\": [\"$\"], \"UYI\": [undefined, undefined, 0], \"UYU\": [undefined, \"$\"], \"UYW\": [undefined, undefined, 4], \"UZS\": [undefined, undefined, 2], \"VEF\": [undefined, \"Bs\", 2], \"VND\": [\"₫\", undefined, 0], \"VUV\": [undefined, undefined, 0], \"XAF\": [\"FCFA\", undefined, 0], \"XCD\": [\"EC$\", \"$\"], \"XOF\": [\"CFA\", undefined, 0], \"XPF\": [\"CFPF\", undefined, 0], \"XXX\": [\"¤\"], \"YER\": [undefined, undefined, 0], \"ZAR\": [undefined, \"R\"], \"ZMK\": [undefined, undefined, 0], \"ZMW\": [undefined, \"ZK\"], \"ZWD\": [undefined, undefined, 0] };\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Format styles that can be used to represent numbers.\n * @see `getLocaleNumberFormat()`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nvar NumberFormatStyle;\n(function (NumberFormatStyle) {\n    NumberFormatStyle[NumberFormatStyle[\"Decimal\"] = 0] = \"Decimal\";\n    NumberFormatStyle[NumberFormatStyle[\"Percent\"] = 1] = \"Percent\";\n    NumberFormatStyle[NumberFormatStyle[\"Currency\"] = 2] = \"Currency\";\n    NumberFormatStyle[NumberFormatStyle[\"Scientific\"] = 3] = \"Scientific\";\n})(NumberFormatStyle || (NumberFormatStyle = {}));\n/**\n * Plurality cases used for translating plurals to different languages.\n *\n * @see `NgPlural`\n * @see `NgPluralCase`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nvar Plural;\n(function (Plural) {\n    Plural[Plural[\"Zero\"] = 0] = \"Zero\";\n    Plural[Plural[\"One\"] = 1] = \"One\";\n    Plural[Plural[\"Two\"] = 2] = \"Two\";\n    Plural[Plural[\"Few\"] = 3] = \"Few\";\n    Plural[Plural[\"Many\"] = 4] = \"Many\";\n    Plural[Plural[\"Other\"] = 5] = \"Other\";\n})(Plural || (Plural = {}));\n/**\n * Context-dependant translation forms for strings.\n * Typically the standalone version is for the nominative form of the word,\n * and the format version is used for the genitive case.\n * @see [CLDR website](http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles)\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nvar FormStyle;\n(function (FormStyle) {\n    FormStyle[FormStyle[\"Format\"] = 0] = \"Format\";\n    FormStyle[FormStyle[\"Standalone\"] = 1] = \"Standalone\";\n})(FormStyle || (FormStyle = {}));\n/**\n * String widths available for translations.\n * The specific character widths are locale-specific.\n * Examples are given for the word \"Sunday\" in English.\n *\n * @publicApi\n */\nvar TranslationWidth;\n(function (TranslationWidth) {\n    /** 1 character for `en-US`. For example: 'S' */\n    TranslationWidth[TranslationWidth[\"Narrow\"] = 0] = \"Narrow\";\n    /** 3 characters for `en-US`. For example: 'Sun' */\n    TranslationWidth[TranslationWidth[\"Abbreviated\"] = 1] = \"Abbreviated\";\n    /** Full length for `en-US`. For example: \"Sunday\" */\n    TranslationWidth[TranslationWidth[\"Wide\"] = 2] = \"Wide\";\n    /** 2 characters for `en-US`, For example: \"Su\" */\n    TranslationWidth[TranslationWidth[\"Short\"] = 3] = \"Short\";\n})(TranslationWidth || (TranslationWidth = {}));\n/**\n * String widths available for date-time formats.\n * The specific character widths are locale-specific.\n * Examples are given for `en-US`.\n *\n * @see `getLocaleDateFormat()`\n * @see `getLocaleTimeFormat()`\n * @see `getLocaleDateTimeFormat()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n * @publicApi\n */\nvar FormatWidth;\n(function (FormatWidth) {\n    /**\n     * For `en-US`, 'M/d/yy, h:mm a'`\n     * (Example: `6/15/15, 9:03 AM`)\n     */\n    FormatWidth[FormatWidth[\"Short\"] = 0] = \"Short\";\n    /**\n     * For `en-US`, `'MMM d, y, h:mm:ss a'`\n     * (Example: `Jun 15, 2015, 9:03:01 AM`)\n     */\n    FormatWidth[FormatWidth[\"Medium\"] = 1] = \"Medium\";\n    /**\n     * For `en-US`, `'MMMM d, y, h:mm:ss a z'`\n     * (Example: `June 15, 2015 at 9:03:01 AM GMT+1`)\n     */\n    FormatWidth[FormatWidth[\"Long\"] = 2] = \"Long\";\n    /**\n     * For `en-US`, `'EEEE, MMMM d, y, h:mm:ss a zzzz'`\n     * (Example: `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00`)\n     */\n    FormatWidth[FormatWidth[\"Full\"] = 3] = \"Full\";\n})(FormatWidth || (FormatWidth = {}));\n/**\n * Symbols that can be used to replace placeholders in number patterns.\n * Examples are based on `en-US` values.\n *\n * @see `getLocaleNumberSymbol()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nvar NumberSymbol;\n(function (NumberSymbol) {\n    /**\n     * Decimal separator.\n     * For `en-US`, the dot character.\n     * Example: 2,345`.`67\n     */\n    NumberSymbol[NumberSymbol[\"Decimal\"] = 0] = \"Decimal\";\n    /**\n     * Grouping separator, typically for thousands.\n     * For `en-US`, the comma character.\n     * Example: 2`,`345.67\n     */\n    NumberSymbol[NumberSymbol[\"Group\"] = 1] = \"Group\";\n    /**\n     * List-item separator.\n     * Example: \"one, two, and three\"\n     */\n    NumberSymbol[NumberSymbol[\"List\"] = 2] = \"List\";\n    /**\n     * Sign for percentage (out of 100).\n     * Example: 23.4%\n     */\n    NumberSymbol[NumberSymbol[\"PercentSign\"] = 3] = \"PercentSign\";\n    /**\n     * Sign for positive numbers.\n     * Example: +23\n     */\n    NumberSymbol[NumberSymbol[\"PlusSign\"] = 4] = \"PlusSign\";\n    /**\n     * Sign for negative numbers.\n     * Example: -23\n     */\n    NumberSymbol[NumberSymbol[\"MinusSign\"] = 5] = \"MinusSign\";\n    /**\n     * Computer notation for exponential value (n times a power of 10).\n     * Example: 1.2E3\n     */\n    NumberSymbol[NumberSymbol[\"Exponential\"] = 6] = \"Exponential\";\n    /**\n     * Human-readable format of exponential.\n     * Example: 1.2x103\n     */\n    NumberSymbol[NumberSymbol[\"SuperscriptingExponent\"] = 7] = \"SuperscriptingExponent\";\n    /**\n     * Sign for permille (out of 1000).\n     * Example: 23.4‰\n     */\n    NumberSymbol[NumberSymbol[\"PerMille\"] = 8] = \"PerMille\";\n    /**\n     * Infinity, can be used with plus and minus.\n     * Example: ∞, +∞, -∞\n     */\n    NumberSymbol[NumberSymbol[\"Infinity\"] = 9] = \"Infinity\";\n    /**\n     * Not a number.\n     * Example: NaN\n     */\n    NumberSymbol[NumberSymbol[\"NaN\"] = 10] = \"NaN\";\n    /**\n     * Symbol used between time units.\n     * Example: 10:52\n     */\n    NumberSymbol[NumberSymbol[\"TimeSeparator\"] = 11] = \"TimeSeparator\";\n    /**\n     * Decimal separator for currency values (fallback to `Decimal`).\n     * Example: $2,345.67\n     */\n    NumberSymbol[NumberSymbol[\"CurrencyDecimal\"] = 12] = \"CurrencyDecimal\";\n    /**\n     * Group separator for currency values (fallback to `Group`).\n     * Example: $2,345.67\n     */\n    NumberSymbol[NumberSymbol[\"CurrencyGroup\"] = 13] = \"CurrencyGroup\";\n})(NumberSymbol || (NumberSymbol = {}));\n/**\n * The value for each day of the week, based on the `en-US` locale\n *\n * @publicApi\n */\nvar WeekDay;\n(function (WeekDay) {\n    WeekDay[WeekDay[\"Sunday\"] = 0] = \"Sunday\";\n    WeekDay[WeekDay[\"Monday\"] = 1] = \"Monday\";\n    WeekDay[WeekDay[\"Tuesday\"] = 2] = \"Tuesday\";\n    WeekDay[WeekDay[\"Wednesday\"] = 3] = \"Wednesday\";\n    WeekDay[WeekDay[\"Thursday\"] = 4] = \"Thursday\";\n    WeekDay[WeekDay[\"Friday\"] = 5] = \"Friday\";\n    WeekDay[WeekDay[\"Saturday\"] = 6] = \"Saturday\";\n})(WeekDay || (WeekDay = {}));\n/**\n * Retrieves the locale ID from the currently loaded locale.\n * The loaded locale could be, for example, a global one rather than a regional one.\n * @param locale A locale code, such as `fr-FR`.\n * @returns The locale code. For example, `fr`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleId(locale) {\n    return ɵfindLocaleData(locale)[ɵLocaleDataIndex.LocaleId];\n}\n/**\n * Retrieves day period strings for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized period strings. For example, `[AM, PM]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleDayPeriods(locale, formStyle, width) {\n    const data = ɵfindLocaleData(locale);\n    const amPmData = [\n        data[ɵLocaleDataIndex.DayPeriodsFormat], data[ɵLocaleDataIndex.DayPeriodsStandalone]\n    ];\n    const amPm = getLastDefinedValue(amPmData, formStyle);\n    return getLastDefinedValue(amPm, width);\n}\n/**\n * Retrieves days of the week for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example,`[Sunday, Monday, ... Saturday]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleDayNames(locale, formStyle, width) {\n    const data = ɵfindLocaleData(locale);\n    const daysData = [data[ɵLocaleDataIndex.DaysFormat], data[ɵLocaleDataIndex.DaysStandalone]];\n    const days = getLastDefinedValue(daysData, formStyle);\n    return getLastDefinedValue(days, width);\n}\n/**\n * Retrieves months of the year for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example,  `[January, February, ...]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleMonthNames(locale, formStyle, width) {\n    const data = ɵfindLocaleData(locale);\n    const monthsData = [data[ɵLocaleDataIndex.MonthsFormat], data[ɵLocaleDataIndex.MonthsStandalone]];\n    const months = getLastDefinedValue(monthsData, formStyle);\n    return getLastDefinedValue(months, width);\n}\n/**\n * Retrieves Gregorian-calendar eras for the given locale.\n * @param locale A locale code for the locale format rules to use.\n * @param width The required character width.\n\n * @returns An array of localized era strings.\n * For example, `[AD, BC]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleEraNames(locale, width) {\n    const data = ɵfindLocaleData(locale);\n    const erasData = data[ɵLocaleDataIndex.Eras];\n    return getLastDefinedValue(erasData, width);\n}\n/**\n * Retrieves the first day of the week for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns A day index number, using the 0-based week-day index for `en-US`\n * (Sunday = 0, Monday = 1, ...).\n * For example, for `fr-FR`, returns 1 to indicate that the first day is Monday.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleFirstDayOfWeek(locale) {\n    const data = ɵfindLocaleData(locale);\n    return data[ɵLocaleDataIndex.FirstDayOfWeek];\n}\n/**\n * Range of week days that are considered the week-end for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The range of day values, `[startDay, endDay]`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleWeekEndRange(locale) {\n    const data = ɵfindLocaleData(locale);\n    return data[ɵLocaleDataIndex.WeekendRange];\n}\n/**\n * Retrieves a localized date-value formating string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formating string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleDateFormat(locale, width) {\n    const data = ɵfindLocaleData(locale);\n    return getLastDefinedValue(data[ɵLocaleDataIndex.DateFormat], width);\n}\n/**\n * Retrieves a localized time-value formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n\n * @publicApi\n */\nfunction getLocaleTimeFormat(locale, width) {\n    const data = ɵfindLocaleData(locale);\n    return getLastDefinedValue(data[ɵLocaleDataIndex.TimeFormat], width);\n}\n/**\n * Retrieves a localized date-time formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleDateTimeFormat(locale, width) {\n    const data = ɵfindLocaleData(locale);\n    const dateTimeFormatData = data[ɵLocaleDataIndex.DateTimeFormat];\n    return getLastDefinedValue(dateTimeFormatData, width);\n}\n/**\n * Retrieves a localized number symbol that can be used to replace placeholders in number formats.\n * @param locale The locale code.\n * @param symbol The symbol to localize.\n * @returns The character for the localized symbol.\n * @see `NumberSymbol`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleNumberSymbol(locale, symbol) {\n    const data = ɵfindLocaleData(locale);\n    const res = data[ɵLocaleDataIndex.NumberSymbols][symbol];\n    if (typeof res === 'undefined') {\n        if (symbol === NumberSymbol.CurrencyDecimal) {\n            return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Decimal];\n        }\n        else if (symbol === NumberSymbol.CurrencyGroup) {\n            return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Group];\n        }\n    }\n    return res;\n}\n/**\n * Retrieves a number format for a given locale.\n *\n * Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00`\n * when used to format the number 12345.678 could result in \"12'345,678\". That would happen if the\n * grouping separator for your language is an apostrophe, and the decimal separator is a comma.\n *\n * <b>Important:</b> The characters `.` `,` `0` `#` (and others below) are special placeholders\n * that stand for the decimal separator, and so on, and are NOT real characters.\n * You must NOT \"translate\" the placeholders. For example, don't change `.` to `,` even though in\n * your language the decimal point is written with a comma. The symbols should be replaced by the\n * local equivalents, using the appropriate `NumberSymbol` for your language.\n *\n * Here are the special characters used in number patterns:\n *\n * | Symbol | Meaning |\n * |--------|---------|\n * | . | Replaced automatically by the character used for the decimal point. |\n * | , | Replaced by the \"grouping\" (thousands) separator. |\n * | 0 | Replaced by a digit (or zero if there aren't enough digits). |\n * | # | Replaced by a digit (or nothing if there aren't enough). |\n * | ¤ | Replaced by a currency symbol, such as $ or USD. |\n * | % | Marks a percent format. The % symbol may change position, but must be retained. |\n * | E | Marks a scientific format. The E symbol may change position, but must be retained. |\n * | ' | Special characters used as literal characters are quoted with ASCII single quotes. |\n *\n * @param locale A locale code for the locale format rules to use.\n * @param type The type of numeric value to be formatted (such as `Decimal` or `Currency`.)\n * @returns The localized format string.\n * @see `NumberFormatStyle`\n * @see [CLDR website](http://cldr.unicode.org/translation/number-patterns)\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleNumberFormat(locale, type) {\n    const data = ɵfindLocaleData(locale);\n    return data[ɵLocaleDataIndex.NumberFormats][type];\n}\n/**\n * Retrieves the symbol used to represent the currency for the main country\n * corresponding to a given locale. For example, '$' for `en-US`.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The localized symbol character,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleCurrencySymbol(locale) {\n    const data = ɵfindLocaleData(locale);\n    return data[ɵLocaleDataIndex.CurrencySymbol] || null;\n}\n/**\n * Retrieves the name of the currency for the main country corresponding\n * to a given locale. For example, 'US Dollar' for `en-US`.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency name,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleCurrencyName(locale) {\n    const data = ɵfindLocaleData(locale);\n    return data[ɵLocaleDataIndex.CurrencyName] || null;\n}\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n * @publicApi\n */\nfunction getLocaleCurrencyCode(locale) {\n    return ɵgetLocaleCurrencyCode(locale);\n}\n/**\n * Retrieves the currency values for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency values.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nfunction getLocaleCurrencies(locale) {\n    const data = ɵfindLocaleData(locale);\n    return data[ɵLocaleDataIndex.Currencies];\n}\n/**\n * @alias core/ɵgetLocalePluralCase\n * @publicApi\n */\nconst getLocalePluralCase = ɵgetLocalePluralCase;\nfunction checkFullData(data) {\n    if (!data[ɵLocaleDataIndex.ExtraData]) {\n        throw new Error(`Missing extra locale data for the locale \"${data[ɵLocaleDataIndex\n            .LocaleId]}\". Use \"registerLocaleData\" to load new data. See the \"I18n guide\" on angular.io to know more.`);\n    }\n}\n/**\n * Retrieves locale-specific rules used to determine which day period to use\n * when more than one period is defined for a locale.\n *\n * There is a rule for each defined day period. The\n * first rule is applied to the first day period and so on.\n * Fall back to AM/PM when no rules are available.\n *\n * A rule can specify a period as time range, or as a single time value.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n#i18n-pipes).\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The rules for the locale, a single time value or array of *from-time, to-time*,\n * or null if no periods are available.\n *\n * @see `getLocaleExtraDayPeriods()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleExtraDayPeriodRules(locale) {\n    const data = ɵfindLocaleData(locale);\n    checkFullData(data);\n    const rules = data[ɵLocaleDataIndex.ExtraData][2 /* ExtraDayPeriodsRules */] || [];\n    return rules.map((rule) => {\n        if (typeof rule === 'string') {\n            return extractTime(rule);\n        }\n        return [extractTime(rule[0]), extractTime(rule[1])];\n    });\n}\n/**\n * Retrieves locale-specific day periods, which indicate roughly how a day is broken up\n * in different languages.\n * For example, for `en-US`, periods are morning, noon, afternoon, evening, and midnight.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n#i18n-pipes).\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns The translated day-period strings.\n * @see `getLocaleExtraDayPeriodRules()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleExtraDayPeriods(locale, formStyle, width) {\n    const data = ɵfindLocaleData(locale);\n    checkFullData(data);\n    const dayPeriodsData = [\n        data[ɵLocaleDataIndex.ExtraData][0 /* ExtraDayPeriodFormats */],\n        data[ɵLocaleDataIndex.ExtraData][1 /* ExtraDayPeriodStandalone */]\n    ];\n    const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];\n    return getLastDefinedValue(dayPeriods, width) || [];\n}\n/**\n * Retrieves the writing direction of a specified locale\n * @param locale A locale code for the locale format rules to use.\n * @publicApi\n * @returns 'rtl' or 'ltr'\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nfunction getLocaleDirection(locale) {\n    const data = ɵfindLocaleData(locale);\n    return data[ɵLocaleDataIndex.Directionality];\n}\n/**\n * Retrieves the first value that is defined in an array, going backwards from an index position.\n *\n * To avoid repeating the same data (as when the \"format\" and \"standalone\" forms are the same)\n * add the first value to the locale data arrays, and add other values only if they are different.\n *\n * @param data The data array to retrieve from.\n * @param index A 0-based index into the array to start from.\n * @returns The value immediately before the given index position.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLastDefinedValue(data, index) {\n    for (let i = index; i > -1; i--) {\n        if (typeof data[i] !== 'undefined') {\n            return data[i];\n        }\n    }\n    throw new Error('Locale data API: locale data undefined');\n}\n/**\n * Extracts the hours and minutes from a string like \"15:45\"\n */\nfunction extractTime(time) {\n    const [h, m] = time.split(':');\n    return { hours: +h, minutes: +m };\n}\n/**\n * Retrieves the currency symbol for a given currency code.\n *\n * For example, for the default `en-US` locale, the code `USD` can\n * be represented by the narrow symbol `$` or the wide symbol `US$`.\n *\n * @param code The currency code.\n * @param format The format, `wide` or `narrow`.\n * @param locale A locale code for the locale format rules to use.\n *\n * @returns The symbol, or the currency code if no symbol is available.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getCurrencySymbol(code, format, locale = 'en') {\n    const currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];\n    const symbolNarrow = currency[1 /* SymbolNarrow */];\n    if (format === 'narrow' && typeof symbolNarrow === 'string') {\n        return symbolNarrow;\n    }\n    return currency[0 /* Symbol */] || code;\n}\n// Most currencies have cents, that's why the default is 2\nconst DEFAULT_NB_OF_CURRENCY_DIGITS = 2;\n/**\n * Reports the number of decimal digits for a given currency.\n * The value depends upon the presence of cents in that particular currency.\n *\n * @param code The currency code.\n * @returns The number of decimal digits, typically 0 or 2.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getNumberOfCurrencyDigits(code) {\n    let digits;\n    const currency = CURRENCIES_EN[code];\n    if (currency) {\n        digits = currency[2 /* NbOfDigits */];\n    }\n    return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ISO8601_DATE_REGEX = /^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n//    1        2       3         4          5          6          7          8  9     10      11\nconst NAMED_FORMATS = {};\nconst DATE_FORMATS_SPLIT = /((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\\s\\S]*)/;\nvar ZoneWidth;\n(function (ZoneWidth) {\n    ZoneWidth[ZoneWidth[\"Short\"] = 0] = \"Short\";\n    ZoneWidth[ZoneWidth[\"ShortGMT\"] = 1] = \"ShortGMT\";\n    ZoneWidth[ZoneWidth[\"Long\"] = 2] = \"Long\";\n    ZoneWidth[ZoneWidth[\"Extended\"] = 3] = \"Extended\";\n})(ZoneWidth || (ZoneWidth = {}));\nvar DateType;\n(function (DateType) {\n    DateType[DateType[\"FullYear\"] = 0] = \"FullYear\";\n    DateType[DateType[\"Month\"] = 1] = \"Month\";\n    DateType[DateType[\"Date\"] = 2] = \"Date\";\n    DateType[DateType[\"Hours\"] = 3] = \"Hours\";\n    DateType[DateType[\"Minutes\"] = 4] = \"Minutes\";\n    DateType[DateType[\"Seconds\"] = 5] = \"Seconds\";\n    DateType[DateType[\"FractionalSeconds\"] = 6] = \"FractionalSeconds\";\n    DateType[DateType[\"Day\"] = 7] = \"Day\";\n})(DateType || (DateType = {}));\nvar TranslationType;\n(function (TranslationType) {\n    TranslationType[TranslationType[\"DayPeriods\"] = 0] = \"DayPeriods\";\n    TranslationType[TranslationType[\"Days\"] = 1] = \"Days\";\n    TranslationType[TranslationType[\"Months\"] = 2] = \"Months\";\n    TranslationType[TranslationType[\"Eras\"] = 3] = \"Eras\";\n})(TranslationType || (TranslationType = {}));\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date according to locale rules.\n *\n * @param value The date to format, as a Date, or a number (milliseconds since UTC epoch)\n * or an [ISO date-time string](https://www.w3.org/TR/NOTE-datetime).\n * @param format The date-time components to include. See `DatePipe` for details.\n * @param locale A locale code for the locale format rules to use.\n * @param timezone The time zone. A time zone offset from GMT (such as `'+0430'`),\n * or a standard UTC/GMT or continental US time zone abbreviation.\n * If not specified, uses host system settings.\n *\n * @returns The formatted date string.\n *\n * @see `DatePipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction formatDate(value, format, locale, timezone) {\n    let date = toDate(value);\n    const namedFormat = getNamedFormat(locale, format);\n    format = namedFormat || format;\n    let parts = [];\n    let match;\n    while (format) {\n        match = DATE_FORMATS_SPLIT.exec(format);\n        if (match) {\n            parts = parts.concat(match.slice(1));\n            const part = parts.pop();\n            if (!part) {\n                break;\n            }\n            format = part;\n        }\n        else {\n            parts.push(format);\n            break;\n        }\n    }\n    let dateTimezoneOffset = date.getTimezoneOffset();\n    if (timezone) {\n        dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n        date = convertTimezoneToLocal(date, timezone, true);\n    }\n    let text = '';\n    parts.forEach(value => {\n        const dateFormatter = getDateFormatter(value);\n        text += dateFormatter ?\n            dateFormatter(date, locale, dateTimezoneOffset) :\n            value === '\\'\\'' ? '\\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\\'');\n    });\n    return text;\n}\n/**\n * Create a new Date object with the given date value, and the time set to midnight.\n *\n * We cannot use `new Date(year, month, date)` because it maps years between 0 and 99 to 1900-1999.\n * See: https://github.com/angular/angular/issues/40377\n *\n * Note that this function returns a Date object whose time is midnight in the current locale's\n * timezone. In the future we might want to change this to be midnight in UTC, but this would be a\n * considerable breaking change.\n */\nfunction createDate(year, month, date) {\n    // The `newDate` is set to midnight (UTC) on January 1st 1970.\n    // - In PST this will be December 31st 1969 at 4pm.\n    // - In GMT this will be January 1st 1970 at 1am.\n    // Note that they even have different years, dates and months!\n    const newDate = new Date(0);\n    // `setFullYear()` allows years like 0001 to be set correctly. This function does not\n    // change the internal time of the date.\n    // Consider calling `setFullYear(2019, 8, 20)` (September 20, 2019).\n    // - In PST this will now be September 20, 2019 at 4pm\n    // - In GMT this will now be September 20, 2019 at 1am\n    newDate.setFullYear(year, month, date);\n    // We want the final date to be at local midnight, so we reset the time.\n    // - In PST this will now be September 20, 2019 at 12am\n    // - In GMT this will now be September 20, 2019 at 12am\n    newDate.setHours(0, 0, 0);\n    return newDate;\n}\nfunction getNamedFormat(locale, format) {\n    const localeId = getLocaleId(locale);\n    NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {};\n    if (NAMED_FORMATS[localeId][format]) {\n        return NAMED_FORMATS[localeId][format];\n    }\n    let formatValue = '';\n    switch (format) {\n        case 'shortDate':\n            formatValue = getLocaleDateFormat(locale, FormatWidth.Short);\n            break;\n        case 'mediumDate':\n            formatValue = getLocaleDateFormat(locale, FormatWidth.Medium);\n            break;\n        case 'longDate':\n            formatValue = getLocaleDateFormat(locale, FormatWidth.Long);\n            break;\n        case 'fullDate':\n            formatValue = getLocaleDateFormat(locale, FormatWidth.Full);\n            break;\n        case 'shortTime':\n            formatValue = getLocaleTimeFormat(locale, FormatWidth.Short);\n            break;\n        case 'mediumTime':\n            formatValue = getLocaleTimeFormat(locale, FormatWidth.Medium);\n            break;\n        case 'longTime':\n            formatValue = getLocaleTimeFormat(locale, FormatWidth.Long);\n            break;\n        case 'fullTime':\n            formatValue = getLocaleTimeFormat(locale, FormatWidth.Full);\n            break;\n        case 'short':\n            const shortTime = getNamedFormat(locale, 'shortTime');\n            const shortDate = getNamedFormat(locale, 'shortDate');\n            formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);\n            break;\n        case 'medium':\n            const mediumTime = getNamedFormat(locale, 'mediumTime');\n            const mediumDate = getNamedFormat(locale, 'mediumDate');\n            formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);\n            break;\n        case 'long':\n            const longTime = getNamedFormat(locale, 'longTime');\n            const longDate = getNamedFormat(locale, 'longDate');\n            formatValue =\n                formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);\n            break;\n        case 'full':\n            const fullTime = getNamedFormat(locale, 'fullTime');\n            const fullDate = getNamedFormat(locale, 'fullDate');\n            formatValue =\n                formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]);\n            break;\n    }\n    if (formatValue) {\n        NAMED_FORMATS[localeId][format] = formatValue;\n    }\n    return formatValue;\n}\nfunction formatDateTime(str, opt_values) {\n    if (opt_values) {\n        str = str.replace(/\\{([^}]+)}/g, function (match, key) {\n            return (opt_values != null && key in opt_values) ? opt_values[key] : match;\n        });\n    }\n    return str;\n}\nfunction padNumber(num, digits, minusSign = '-', trim, negWrap) {\n    let neg = '';\n    if (num < 0 || (negWrap && num <= 0)) {\n        if (negWrap) {\n            num = -num + 1;\n        }\n        else {\n            num = -num;\n            neg = minusSign;\n        }\n    }\n    let strNum = String(num);\n    while (strNum.length < digits) {\n        strNum = '0' + strNum;\n    }\n    if (trim) {\n        strNum = strNum.substr(strNum.length - digits);\n    }\n    return neg + strNum;\n}\nfunction formatFractionalSeconds(milliseconds, digits) {\n    const strMs = padNumber(milliseconds, 3);\n    return strMs.substr(0, digits);\n}\n/**\n * Returns a date formatter that transforms a date into its locale digit representation\n */\nfunction dateGetter(name, size, offset = 0, trim = false, negWrap = false) {\n    return function (date, locale) {\n        let part = getDatePart(name, date);\n        if (offset > 0 || part > -offset) {\n            part += offset;\n        }\n        if (name === DateType.Hours) {\n            if (part === 0 && offset === -12) {\n                part = 12;\n            }\n        }\n        else if (name === DateType.FractionalSeconds) {\n            return formatFractionalSeconds(part, size);\n        }\n        const localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n        return padNumber(part, size, localeMinus, trim, negWrap);\n    };\n}\nfunction getDatePart(part, date) {\n    switch (part) {\n        case DateType.FullYear:\n            return date.getFullYear();\n        case DateType.Month:\n            return date.getMonth();\n        case DateType.Date:\n            return date.getDate();\n        case DateType.Hours:\n            return date.getHours();\n        case DateType.Minutes:\n            return date.getMinutes();\n        case DateType.Seconds:\n            return date.getSeconds();\n        case DateType.FractionalSeconds:\n            return date.getMilliseconds();\n        case DateType.Day:\n            return date.getDay();\n        default:\n            throw new Error(`Unknown DateType value \"${part}\".`);\n    }\n}\n/**\n * Returns a date formatter that transforms a date into its locale string representation\n */\nfunction dateStrGetter(name, width, form = FormStyle.Format, extended = false) {\n    return function (date, locale) {\n        return getDateTranslation(date, locale, name, width, form, extended);\n    };\n}\n/**\n * Returns the locale translation of a date for a given form, type and width\n */\nfunction getDateTranslation(date, locale, name, width, form, extended) {\n    switch (name) {\n        case TranslationType.Months:\n            return getLocaleMonthNames(locale, form, width)[date.getMonth()];\n        case TranslationType.Days:\n            return getLocaleDayNames(locale, form, width)[date.getDay()];\n        case TranslationType.DayPeriods:\n            const currentHours = date.getHours();\n            const currentMinutes = date.getMinutes();\n            if (extended) {\n                const rules = getLocaleExtraDayPeriodRules(locale);\n                const dayPeriods = getLocaleExtraDayPeriods(locale, form, width);\n                const index = rules.findIndex(rule => {\n                    if (Array.isArray(rule)) {\n                        // morning, afternoon, evening, night\n                        const [from, to] = rule;\n                        const afterFrom = currentHours >= from.hours && currentMinutes >= from.minutes;\n                        const beforeTo = (currentHours < to.hours ||\n                            (currentHours === to.hours && currentMinutes < to.minutes));\n                        // We must account for normal rules that span a period during the day (e.g. 6am-9am)\n                        // where `from` is less (earlier) than `to`. But also rules that span midnight (e.g.\n                        // 10pm - 5am) where `from` is greater (later!) than `to`.\n                        //\n                        // In the first case the current time must be BOTH after `from` AND before `to`\n                        // (e.g. 8am is after 6am AND before 10am).\n                        //\n                        // In the second case the current time must be EITHER after `from` OR before `to`\n                        // (e.g. 4am is before 5am but not after 10pm; and 11pm is not before 5am but it is\n                        // after 10pm).\n                        if (from.hours < to.hours) {\n                            if (afterFrom && beforeTo) {\n                                return true;\n                            }\n                        }\n                        else if (afterFrom || beforeTo) {\n                            return true;\n                        }\n                    }\n                    else { // noon or midnight\n                        if (rule.hours === currentHours && rule.minutes === currentMinutes) {\n                            return true;\n                        }\n                    }\n                    return false;\n                });\n                if (index !== -1) {\n                    return dayPeriods[index];\n                }\n            }\n            // if no rules for the day periods, we use am/pm by default\n            return getLocaleDayPeriods(locale, form, width)[currentHours < 12 ? 0 : 1];\n        case TranslationType.Eras:\n            return getLocaleEraNames(locale, width)[date.getFullYear() <= 0 ? 0 : 1];\n        default:\n            // This default case is not needed by TypeScript compiler, as the switch is exhaustive.\n            // However Closure Compiler does not understand that and reports an error in typed mode.\n            // The `throw new Error` below works around the problem, and the unexpected: never variable\n            // makes sure tsc still checks this code is unreachable.\n            const unexpected = name;\n            throw new Error(`unexpected translation type ${unexpected}`);\n    }\n}\n/**\n * Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or\n * GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30,\n * extended = +04:30)\n */\nfunction timeZoneGetter(width) {\n    return function (date, locale, offset) {\n        const zone = -1 * offset;\n        const minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n        const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);\n        switch (width) {\n            case ZoneWidth.Short:\n                return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) +\n                    padNumber(Math.abs(zone % 60), 2, minusSign);\n            case ZoneWidth.ShortGMT:\n                return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 1, minusSign);\n            case ZoneWidth.Long:\n                return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +\n                    padNumber(Math.abs(zone % 60), 2, minusSign);\n            case ZoneWidth.Extended:\n                if (offset === 0) {\n                    return 'Z';\n                }\n                else {\n                    return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +\n                        padNumber(Math.abs(zone % 60), 2, minusSign);\n                }\n            default:\n                throw new Error(`Unknown zone width \"${width}\"`);\n        }\n    };\n}\nconst JANUARY = 0;\nconst THURSDAY = 4;\nfunction getFirstThursdayOfYear(year) {\n    const firstDayOfYear = createDate(year, JANUARY, 1).getDay();\n    return createDate(year, 0, 1 + ((firstDayOfYear <= THURSDAY) ? THURSDAY : THURSDAY + 7) - firstDayOfYear);\n}\nfunction getThursdayThisWeek(datetime) {\n    return createDate(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + (THURSDAY - datetime.getDay()));\n}\nfunction weekGetter(size, monthBased = false) {\n    return function (date, locale) {\n        let result;\n        if (monthBased) {\n            const nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;\n            const today = date.getDate();\n            result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);\n        }\n        else {\n            const thisThurs = getThursdayThisWeek(date);\n            // Some days of a year are part of next year according to ISO 8601.\n            // Compute the firstThurs from the year of this week's Thursday\n            const firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear());\n            const diff = thisThurs.getTime() - firstThurs.getTime();\n            result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n        }\n        return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n    };\n}\n/**\n * Returns a date formatter that provides the week-numbering year for the input date.\n */\nfunction weekNumberingYearGetter(size, trim = false) {\n    return function (date, locale) {\n        const thisThurs = getThursdayThisWeek(date);\n        const weekNumberingYear = thisThurs.getFullYear();\n        return padNumber(weekNumberingYear, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim);\n    };\n}\nconst DATE_FORMATS = {};\n// Based on CLDR formats:\n// See complete list: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n// See also explanations: http://cldr.unicode.org/translation/date-time\n// TODO(ocombe): support all missing cldr formats: U, Q, D, F, e, j, J, C, A, v, V, X, x\nfunction getDateFormatter(format) {\n    if (DATE_FORMATS[format]) {\n        return DATE_FORMATS[format];\n    }\n    let formatter;\n    switch (format) {\n        // Era name (AD/BC)\n        case 'G':\n        case 'GG':\n        case 'GGG':\n            formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Abbreviated);\n            break;\n        case 'GGGG':\n            formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Wide);\n            break;\n        case 'GGGGG':\n            formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Narrow);\n            break;\n        // 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199)\n        case 'y':\n            formatter = dateGetter(DateType.FullYear, 1, 0, false, true);\n            break;\n        // 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n        case 'yy':\n            formatter = dateGetter(DateType.FullYear, 2, 0, true, true);\n            break;\n        // 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10)\n        case 'yyy':\n            formatter = dateGetter(DateType.FullYear, 3, 0, false, true);\n            break;\n        // 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010)\n        case 'yyyy':\n            formatter = dateGetter(DateType.FullYear, 4, 0, false, true);\n            break;\n        // 1 digit representation of the week-numbering year, e.g. (AD 1 => 1, AD 199 => 199)\n        case 'Y':\n            formatter = weekNumberingYearGetter(1);\n            break;\n        // 2 digit representation of the week-numbering year, padded (00-99). (e.g. AD 2001 => 01, AD\n        // 2010 => 10)\n        case 'YY':\n            formatter = weekNumberingYearGetter(2, true);\n            break;\n        // 3 digit representation of the week-numbering year, padded (000-999). (e.g. AD 1 => 001, AD\n        // 2010 => 2010)\n        case 'YYY':\n            formatter = weekNumberingYearGetter(3);\n            break;\n        // 4 digit representation of the week-numbering year (e.g. AD 1 => 0001, AD 2010 => 2010)\n        case 'YYYY':\n            formatter = weekNumberingYearGetter(4);\n            break;\n        // Month of the year (1-12), numeric\n        case 'M':\n        case 'L':\n            formatter = dateGetter(DateType.Month, 1, 1);\n            break;\n        case 'MM':\n        case 'LL':\n            formatter = dateGetter(DateType.Month, 2, 1);\n            break;\n        // Month of the year (January, ...), string, format\n        case 'MMM':\n            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated);\n            break;\n        case 'MMMM':\n            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide);\n            break;\n        case 'MMMMM':\n            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow);\n            break;\n        // Month of the year (January, ...), string, standalone\n        case 'LLL':\n            formatter =\n                dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);\n            break;\n        case 'LLLL':\n            formatter =\n                dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);\n            break;\n        case 'LLLLL':\n            formatter =\n                dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);\n            break;\n        // Week of the year (1, ... 52)\n        case 'w':\n            formatter = weekGetter(1);\n            break;\n        case 'ww':\n            formatter = weekGetter(2);\n            break;\n        // Week of the month (1, ...)\n        case 'W':\n            formatter = weekGetter(1, true);\n            break;\n        // Day of the month (1-31)\n        case 'd':\n            formatter = dateGetter(DateType.Date, 1);\n            break;\n        case 'dd':\n            formatter = dateGetter(DateType.Date, 2);\n            break;\n        // Day of the Week StandAlone (1, 1, Mon, Monday, M, Mo)\n        case 'c':\n        case 'cc':\n            formatter = dateGetter(DateType.Day, 1);\n            break;\n        case 'ccc':\n            formatter =\n                dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated, FormStyle.Standalone);\n            break;\n        case 'cccc':\n            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide, FormStyle.Standalone);\n            break;\n        case 'ccccc':\n            formatter =\n                dateStrGetter(TranslationType.Days, TranslationWidth.Narrow, FormStyle.Standalone);\n            break;\n        case 'cccccc':\n            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short, FormStyle.Standalone);\n            break;\n        // Day of the Week\n        case 'E':\n        case 'EE':\n        case 'EEE':\n            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated);\n            break;\n        case 'EEEE':\n            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide);\n            break;\n        case 'EEEEE':\n            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow);\n            break;\n        case 'EEEEEE':\n            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short);\n            break;\n        // Generic period of the day (am-pm)\n        case 'a':\n        case 'aa':\n        case 'aaa':\n            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated);\n            break;\n        case 'aaaa':\n            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide);\n            break;\n        case 'aaaaa':\n            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow);\n            break;\n        // Extended period of the day (midnight, at night, ...), standalone\n        case 'b':\n        case 'bb':\n        case 'bbb':\n            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Standalone, true);\n            break;\n        case 'bbbb':\n            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Standalone, true);\n            break;\n        case 'bbbbb':\n            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Standalone, true);\n            break;\n        // Extended period of the day (midnight, night, ...), standalone\n        case 'B':\n        case 'BB':\n        case 'BBB':\n            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true);\n            break;\n        case 'BBBB':\n            formatter =\n                dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);\n            break;\n        case 'BBBBB':\n            formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true);\n            break;\n        // Hour in AM/PM, (1-12)\n        case 'h':\n            formatter = dateGetter(DateType.Hours, 1, -12);\n            break;\n        case 'hh':\n            formatter = dateGetter(DateType.Hours, 2, -12);\n            break;\n        // Hour of the day (0-23)\n        case 'H':\n            formatter = dateGetter(DateType.Hours, 1);\n            break;\n        // Hour in day, padded (00-23)\n        case 'HH':\n            formatter = dateGetter(DateType.Hours, 2);\n            break;\n        // Minute of the hour (0-59)\n        case 'm':\n            formatter = dateGetter(DateType.Minutes, 1);\n            break;\n        case 'mm':\n            formatter = dateGetter(DateType.Minutes, 2);\n            break;\n        // Second of the minute (0-59)\n        case 's':\n            formatter = dateGetter(DateType.Seconds, 1);\n            break;\n        case 'ss':\n            formatter = dateGetter(DateType.Seconds, 2);\n            break;\n        // Fractional second\n        case 'S':\n            formatter = dateGetter(DateType.FractionalSeconds, 1);\n            break;\n        case 'SS':\n            formatter = dateGetter(DateType.FractionalSeconds, 2);\n            break;\n        case 'SSS':\n            formatter = dateGetter(DateType.FractionalSeconds, 3);\n            break;\n        // Timezone ISO8601 short format (-0430)\n        case 'Z':\n        case 'ZZ':\n        case 'ZZZ':\n            formatter = timeZoneGetter(ZoneWidth.Short);\n            break;\n        // Timezone ISO8601 extended format (-04:30)\n        case 'ZZZZZ':\n            formatter = timeZoneGetter(ZoneWidth.Extended);\n            break;\n        // Timezone GMT short format (GMT+4)\n        case 'O':\n        case 'OO':\n        case 'OOO':\n        // Should be location, but fallback to format O instead because we don't have the data yet\n        case 'z':\n        case 'zz':\n        case 'zzz':\n            formatter = timeZoneGetter(ZoneWidth.ShortGMT);\n            break;\n        // Timezone GMT long format (GMT+0430)\n        case 'OOOO':\n        case 'ZZZZ':\n        // Should be location, but fallback to format O instead because we don't have the data yet\n        case 'zzzz':\n            formatter = timeZoneGetter(ZoneWidth.Long);\n            break;\n        default:\n            return null;\n    }\n    DATE_FORMATS[format] = formatter;\n    return formatter;\n}\nfunction timezoneToOffset(timezone, fallback) {\n    // Support: IE 11 only, Edge 13-15+\n    // IE/Edge do not \"understand\" colon (`:`) in timezone\n    timezone = timezone.replace(/:/g, '');\n    const requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;\n    return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;\n}\nfunction addDateMinutes(date, minutes) {\n    date = new Date(date.getTime());\n    date.setMinutes(date.getMinutes() + minutes);\n    return date;\n}\nfunction convertTimezoneToLocal(date, timezone, reverse) {\n    const reverseValue = reverse ? -1 : 1;\n    const dateTimezoneOffset = date.getTimezoneOffset();\n    const timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n    return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset));\n}\n/**\n * Converts a value to date.\n *\n * Supported input formats:\n * - `Date`\n * - number: timestamp\n * - string: numeric (e.g. \"1234\"), ISO and date strings in a format supported by\n *   [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\n *   Note: ISO strings without time return a date without timeoffset.\n *\n * Throws if unable to convert to a date.\n */\nfunction toDate(value) {\n    if (isDate(value)) {\n        return value;\n    }\n    if (typeof value === 'number' && !isNaN(value)) {\n        return new Date(value);\n    }\n    if (typeof value === 'string') {\n        value = value.trim();\n        if (/^(\\d{4}(-\\d{1,2}(-\\d{1,2})?)?)$/.test(value)) {\n            /* For ISO Strings without time the day, month and year must be extracted from the ISO String\n            before Date creation to avoid time offset and errors in the new Date.\n            If we only replace '-' with ',' in the ISO String (\"2015,01,01\"), and try to create a new\n            date, some browsers (e.g. IE 9) will throw an invalid Date error.\n            If we leave the '-' (\"2015-01-01\") and try to create a new Date(\"2015-01-01\") the timeoffset\n            is applied.\n            Note: ISO months are 0 for January, 1 for February, ... */\n            const [y, m = 1, d = 1] = value.split('-').map((val) => +val);\n            return createDate(y, m - 1, d);\n        }\n        const parsedNb = parseFloat(value);\n        // any string that only contains numbers, like \"1234\" but not like \"1234hello\"\n        if (!isNaN(value - parsedNb)) {\n            return new Date(parsedNb);\n        }\n        let match;\n        if (match = value.match(ISO8601_DATE_REGEX)) {\n            return isoStringToDate(match);\n        }\n    }\n    const date = new Date(value);\n    if (!isDate(date)) {\n        throw new Error(`Unable to convert \"${value}\" into a date`);\n    }\n    return date;\n}\n/**\n * Converts a date in ISO8601 to a Date.\n * Used instead of `Date.parse` because of browser discrepancies.\n */\nfunction isoStringToDate(match) {\n    const date = new Date(0);\n    let tzHour = 0;\n    let tzMin = 0;\n    // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n    const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n    const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n    // if there is a timezone defined like \"+01:00\" or \"+0100\"\n    if (match[9]) {\n        tzHour = Number(match[9] + match[10]);\n        tzMin = Number(match[9] + match[11]);\n    }\n    dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n    const h = Number(match[4] || 0) - tzHour;\n    const m = Number(match[5] || 0) - tzMin;\n    const s = Number(match[6] || 0);\n    // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n    // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n    // becomes `999ms`.\n    const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n    timeSetter.call(date, h, m, s, ms);\n    return date;\n}\nfunction isDate(value) {\n    return value instanceof Date && !isNaN(value.valueOf());\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NUMBER_FORMAT_REGEXP = /^(\\d+)?\\.((\\d+)(-(\\d+))?)?$/;\nconst MAX_DIGITS = 22;\nconst DECIMAL_SEP = '.';\nconst ZERO_CHAR = '0';\nconst PATTERN_SEP = ';';\nconst GROUP_SEP = ',';\nconst DIGIT_CHAR = '#';\nconst CURRENCY_CHAR = '¤';\nconst PERCENT_CHAR = '%';\n/**\n * Transforms a number to a locale string based on a style and a format.\n */\nfunction formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo, isPercent = false) {\n    let formattedText = '';\n    let isZero = false;\n    if (!isFinite(value)) {\n        formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);\n    }\n    else {\n        let parsedNumber = parseNumber(value);\n        if (isPercent) {\n            parsedNumber = toPercent(parsedNumber);\n        }\n        let minInt = pattern.minInt;\n        let minFraction = pattern.minFrac;\n        let maxFraction = pattern.maxFrac;\n        if (digitsInfo) {\n            const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);\n            if (parts === null) {\n                throw new Error(`${digitsInfo} is not a valid digit info`);\n            }\n            const minIntPart = parts[1];\n            const minFractionPart = parts[3];\n            const maxFractionPart = parts[5];\n            if (minIntPart != null) {\n                minInt = parseIntAutoRadix(minIntPart);\n            }\n            if (minFractionPart != null) {\n                minFraction = parseIntAutoRadix(minFractionPart);\n            }\n            if (maxFractionPart != null) {\n                maxFraction = parseIntAutoRadix(maxFractionPart);\n            }\n            else if (minFractionPart != null && minFraction > maxFraction) {\n                maxFraction = minFraction;\n            }\n        }\n        roundNumber(parsedNumber, minFraction, maxFraction);\n        let digits = parsedNumber.digits;\n        let integerLen = parsedNumber.integerLen;\n        const exponent = parsedNumber.exponent;\n        let decimals = [];\n        isZero = digits.every(d => !d);\n        // pad zeros for small numbers\n        for (; integerLen < minInt; integerLen++) {\n            digits.unshift(0);\n        }\n        // pad zeros for small numbers\n        for (; integerLen < 0; integerLen++) {\n            digits.unshift(0);\n        }\n        // extract decimals digits\n        if (integerLen > 0) {\n            decimals = digits.splice(integerLen, digits.length);\n        }\n        else {\n            decimals = digits;\n            digits = [0];\n        }\n        // format the integer digits with grouping separators\n        const groups = [];\n        if (digits.length >= pattern.lgSize) {\n            groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));\n        }\n        while (digits.length > pattern.gSize) {\n            groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));\n        }\n        if (digits.length) {\n            groups.unshift(digits.join(''));\n        }\n        formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol));\n        // append the decimal digits\n        if (decimals.length) {\n            formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join('');\n        }\n        if (exponent) {\n            formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent;\n        }\n    }\n    if (value < 0 && !isZero) {\n        formattedText = pattern.negPre + formattedText + pattern.negSuf;\n    }\n    else {\n        formattedText = pattern.posPre + formattedText + pattern.posSuf;\n    }\n    return formattedText;\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as currency using locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param currency A string containing the currency symbol or its name,\n * such as \"$\" or \"Canadian Dollar\". Used in output string, but does not affect the operation\n * of the function.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)\n * currency code, such as `USD` for the US dollar and `EUR` for the euro.\n * Used to determine the number of digits in the decimal part.\n * @param digitsInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted currency value.\n *\n * @see `formatNumber()`\n * @see `DecimalPipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction formatCurrency(value, locale, currency, currencyCode, digitsInfo) {\n    const format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);\n    const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n    pattern.minFrac = getNumberOfCurrencyDigits(currencyCode);\n    pattern.maxFrac = pattern.minFrac;\n    const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);\n    return res\n        .replace(CURRENCY_CHAR, currency)\n        // if we have 2 time the currency character, the second one is ignored\n        .replace(CURRENCY_CHAR, '')\n        // If there is a spacing between currency character and the value and\n        // the currency character is supressed by passing an empty string, the\n        // spacing character would remain as part of the string. Then we\n        // should remove it.\n        .trim();\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as a percentage according to locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitsInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted percentage value.\n *\n * @see `formatNumber()`\n * @see `DecimalPipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n * @publicApi\n *\n */\nfunction formatPercent(value, locale, digitsInfo) {\n    const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);\n    const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n    const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true);\n    return res.replace(new RegExp(PERCENT_CHAR, 'g'), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign));\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as text, with group sizing, separator, and other\n * parameters based on the locale.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitsInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted text string.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction formatNumber(value, locale, digitsInfo) {\n    const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);\n    const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n    return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo);\n}\nfunction parseNumberFormat(format, minusSign = '-') {\n    const p = {\n        minInt: 1,\n        minFrac: 0,\n        maxFrac: 0,\n        posPre: '',\n        posSuf: '',\n        negPre: '',\n        negSuf: '',\n        gSize: 0,\n        lgSize: 0\n    };\n    const patternParts = format.split(PATTERN_SEP);\n    const positive = patternParts[0];\n    const negative = patternParts[1];\n    const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ?\n        positive.split(DECIMAL_SEP) :\n        [\n            positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1),\n            positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)\n        ], integer = positiveParts[0], fraction = positiveParts[1] || '';\n    p.posPre = integer.substr(0, integer.indexOf(DIGIT_CHAR));\n    for (let i = 0; i < fraction.length; i++) {\n        const ch = fraction.charAt(i);\n        if (ch === ZERO_CHAR) {\n            p.minFrac = p.maxFrac = i + 1;\n        }\n        else if (ch === DIGIT_CHAR) {\n            p.maxFrac = i + 1;\n        }\n        else {\n            p.posSuf += ch;\n        }\n    }\n    const groups = integer.split(GROUP_SEP);\n    p.gSize = groups[1] ? groups[1].length : 0;\n    p.lgSize = (groups[2] || groups[1]) ? (groups[2] || groups[1]).length : 0;\n    if (negative) {\n        const trunkLen = positive.length - p.posPre.length - p.posSuf.length, pos = negative.indexOf(DIGIT_CHAR);\n        p.negPre = negative.substr(0, pos).replace(/'/g, '');\n        p.negSuf = negative.substr(pos + trunkLen).replace(/'/g, '');\n    }\n    else {\n        p.negPre = minusSign + p.posPre;\n        p.negSuf = p.posSuf;\n    }\n    return p;\n}\n// Transforms a parsed number into a percentage by multiplying it by 100\nfunction toPercent(parsedNumber) {\n    // if the number is 0, don't do anything\n    if (parsedNumber.digits[0] === 0) {\n        return parsedNumber;\n    }\n    // Getting the current number of decimals\n    const fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;\n    if (parsedNumber.exponent) {\n        parsedNumber.exponent += 2;\n    }\n    else {\n        if (fractionLen === 0) {\n            parsedNumber.digits.push(0, 0);\n        }\n        else if (fractionLen === 1) {\n            parsedNumber.digits.push(0);\n        }\n        parsedNumber.integerLen += 2;\n    }\n    return parsedNumber;\n}\n/**\n * Parses a number.\n * Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/\n */\nfunction parseNumber(num) {\n    let numStr = Math.abs(num) + '';\n    let exponent = 0, digits, integerLen;\n    let i, j, zeros;\n    // Decimal point?\n    if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) {\n        numStr = numStr.replace(DECIMAL_SEP, '');\n    }\n    // Exponential form?\n    if ((i = numStr.search(/e/i)) > 0) {\n        // Work out the exponent.\n        if (integerLen < 0)\n            integerLen = i;\n        integerLen += +numStr.slice(i + 1);\n        numStr = numStr.substring(0, i);\n    }\n    else if (integerLen < 0) {\n        // There was no decimal point or exponent so it is an integer.\n        integerLen = numStr.length;\n    }\n    // Count the number of leading zeros.\n    for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { /* empty */\n    }\n    if (i === (zeros = numStr.length)) {\n        // The digits are all zero.\n        digits = [0];\n        integerLen = 1;\n    }\n    else {\n        // Count the number of trailing zeros\n        zeros--;\n        while (numStr.charAt(zeros) === ZERO_CHAR)\n            zeros--;\n        // Trailing zeros are insignificant so ignore them\n        integerLen -= i;\n        digits = [];\n        // Convert string to array of digits without leading/trailing zeros.\n        for (j = 0; i <= zeros; i++, j++) {\n            digits[j] = Number(numStr.charAt(i));\n        }\n    }\n    // If the number overflows the maximum allowed digits then use an exponent.\n    if (integerLen > MAX_DIGITS) {\n        digits = digits.splice(0, MAX_DIGITS - 1);\n        exponent = integerLen - 1;\n        integerLen = 1;\n    }\n    return { digits, exponent, integerLen };\n}\n/**\n * Round the parsed number to the specified number of decimal places\n * This function changes the parsedNumber in-place\n */\nfunction roundNumber(parsedNumber, minFrac, maxFrac) {\n    if (minFrac > maxFrac) {\n        throw new Error(`The minimum number of digits after fraction (${minFrac}) is higher than the maximum (${maxFrac}).`);\n    }\n    let digits = parsedNumber.digits;\n    let fractionLen = digits.length - parsedNumber.integerLen;\n    const fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac);\n    // The index of the digit to where rounding is to occur\n    let roundAt = fractionSize + parsedNumber.integerLen;\n    let digit = digits[roundAt];\n    if (roundAt > 0) {\n        // Drop fractional digits beyond `roundAt`\n        digits.splice(Math.max(parsedNumber.integerLen, roundAt));\n        // Set non-fractional digits beyond `roundAt` to 0\n        for (let j = roundAt; j < digits.length; j++) {\n            digits[j] = 0;\n        }\n    }\n    else {\n        // We rounded to zero so reset the parsedNumber\n        fractionLen = Math.max(0, fractionLen);\n        parsedNumber.integerLen = 1;\n        digits.length = Math.max(1, roundAt = fractionSize + 1);\n        digits[0] = 0;\n        for (let i = 1; i < roundAt; i++)\n            digits[i] = 0;\n    }\n    if (digit >= 5) {\n        if (roundAt - 1 < 0) {\n            for (let k = 0; k > roundAt; k--) {\n                digits.unshift(0);\n                parsedNumber.integerLen++;\n            }\n            digits.unshift(1);\n            parsedNumber.integerLen++;\n        }\n        else {\n            digits[roundAt - 1]++;\n        }\n    }\n    // Pad out with zeros to get the required fraction length\n    for (; fractionLen < Math.max(0, fractionSize); fractionLen++)\n        digits.push(0);\n    let dropTrailingZeros = fractionSize !== 0;\n    // Minimal length = nb of decimals required + current nb of integers\n    // Any number besides that is optional and can be removed if it's a trailing 0\n    const minLen = minFrac + parsedNumber.integerLen;\n    // Do any carrying, e.g. a digit was rounded up to 10\n    const carry = digits.reduceRight(function (carry, d, i, digits) {\n        d = d + carry;\n        digits[i] = d < 10 ? d : d - 10; // d % 10\n        if (dropTrailingZeros) {\n            // Do not keep meaningless fractional trailing zeros (e.g. 15.52000 --> 15.52)\n            if (digits[i] === 0 && i >= minLen) {\n                digits.pop();\n            }\n            else {\n                dropTrailingZeros = false;\n            }\n        }\n        return d >= 10 ? 1 : 0; // Math.floor(d / 10);\n    }, 0);\n    if (carry) {\n        digits.unshift(carry);\n        parsedNumber.integerLen++;\n    }\n}\nfunction parseIntAutoRadix(text) {\n    const result = parseInt(text);\n    if (isNaN(result)) {\n        throw new Error('Invalid integer literal when parsing ' + text);\n    }\n    return result;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nclass NgLocalization {\n}\n/**\n * Returns the plural category for a given value.\n * - \"=value\" when the case exists,\n * - the plural category otherwise\n */\nfunction getPluralCategory(value, cases, ngLocalization, locale) {\n    let key = `=${value}`;\n    if (cases.indexOf(key) > -1) {\n        return key;\n    }\n    key = ngLocalization.getPluralCategory(value, locale);\n    if (cases.indexOf(key) > -1) {\n        return key;\n    }\n    if (cases.indexOf('other') > -1) {\n        return 'other';\n    }\n    throw new Error(`No plural message found for value \"${value}\"`);\n}\n/**\n * Returns the plural case based on the locale\n *\n * @publicApi\n */\nclass NgLocaleLocalization extends NgLocalization {\n    constructor(locale) {\n        super();\n        this.locale = locale;\n    }\n    getPluralCategory(value, locale) {\n        const plural = getLocalePluralCase(locale || this.locale)(value);\n        switch (plural) {\n            case Plural.Zero:\n                return 'zero';\n            case Plural.One:\n                return 'one';\n            case Plural.Two:\n                return 'two';\n            case Plural.Few:\n                return 'few';\n            case Plural.Many:\n                return 'many';\n            default:\n                return 'other';\n        }\n    }\n}\nNgLocaleLocalization.ɵfac = function NgLocaleLocalization_Factory(t) { return new (t || NgLocaleLocalization)(ɵngcc0.ɵɵinject(LOCALE_ID)); };\nNgLocaleLocalization.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgLocaleLocalization, factory: NgLocaleLocalization.ɵfac });\nNgLocaleLocalization.ctorParameters = () => [\n    { type: String, decorators: [{ type: Inject, args: [LOCALE_ID,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgLocaleLocalization, [{\n        type: Injectable\n    }], function () { return [{ type: String, decorators: [{\n                type: Inject,\n                args: [LOCALE_ID]\n            }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Register global data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n#i18n-pipes) to know how to import additional locale data.\n *\n * The signature registerLocaleData(data: any, extraData?: any) is deprecated since v5.1\n *\n * @publicApi\n */\nfunction registerLocaleData(data, localeId, extraData) {\n    return ɵregisterLocaleData(data, localeId, extraData);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction parseCookieValue(cookieStr, name) {\n    name = encodeURIComponent(name);\n    for (const cookie of cookieStr.split(';')) {\n        const eqIndex = cookie.indexOf('=');\n        const [cookieName, cookieValue] = eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)];\n        if (cookieName.trim() === name) {\n            return decodeURIComponent(cookieValue);\n        }\n    }\n    return null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n *     <some-element [ngClass]=\"'first second'\">...</some-element>\n *\n *     <some-element [ngClass]=\"['first', 'second']\">...</some-element>\n *\n *     <some-element [ngClass]=\"{'first': true, 'second': true, 'third': false}\">...</some-element>\n *\n *     <some-element [ngClass]=\"stringExp|arrayExp|objExp\">...</some-element>\n *\n *     <some-element [ngClass]=\"{'class1 class2 class3' : true}\">...</some-element>\n * ```\n *\n * @description\n *\n * Adds and removes CSS classes on an HTML element.\n *\n * The CSS classes are updated as follows, depending on the type of the expression evaluation:\n * - `string` - the CSS classes listed in the string (space delimited) are added,\n * - `Array` - the CSS classes declared as Array elements are added,\n * - `Object` - keys are CSS classes that get added when the expression given in the value\n *              evaluates to a truthy value, otherwise they are removed.\n *\n * @publicApi\n */\nclass NgClass {\n    constructor(_iterableDiffers, _keyValueDiffers, _ngEl, _renderer) {\n        this._iterableDiffers = _iterableDiffers;\n        this._keyValueDiffers = _keyValueDiffers;\n        this._ngEl = _ngEl;\n        this._renderer = _renderer;\n        this._iterableDiffer = null;\n        this._keyValueDiffer = null;\n        this._initialClasses = [];\n        this._rawClass = null;\n    }\n    set klass(value) {\n        this._removeClasses(this._initialClasses);\n        this._initialClasses = typeof value === 'string' ? value.split(/\\s+/) : [];\n        this._applyClasses(this._initialClasses);\n        this._applyClasses(this._rawClass);\n    }\n    set ngClass(value) {\n        this._removeClasses(this._rawClass);\n        this._applyClasses(this._initialClasses);\n        this._iterableDiffer = null;\n        this._keyValueDiffer = null;\n        this._rawClass = typeof value === 'string' ? value.split(/\\s+/) : value;\n        if (this._rawClass) {\n            if (ɵisListLikeIterable(this._rawClass)) {\n                this._iterableDiffer = this._iterableDiffers.find(this._rawClass).create();\n            }\n            else {\n                this._keyValueDiffer = this._keyValueDiffers.find(this._rawClass).create();\n            }\n        }\n    }\n    ngDoCheck() {\n        if (this._iterableDiffer) {\n            const iterableChanges = this._iterableDiffer.diff(this._rawClass);\n            if (iterableChanges) {\n                this._applyIterableChanges(iterableChanges);\n            }\n        }\n        else if (this._keyValueDiffer) {\n            const keyValueChanges = this._keyValueDiffer.diff(this._rawClass);\n            if (keyValueChanges) {\n                this._applyKeyValueChanges(keyValueChanges);\n            }\n        }\n    }\n    _applyKeyValueChanges(changes) {\n        changes.forEachAddedItem((record) => this._toggleClass(record.key, record.currentValue));\n        changes.forEachChangedItem((record) => this._toggleClass(record.key, record.currentValue));\n        changes.forEachRemovedItem((record) => {\n            if (record.previousValue) {\n                this._toggleClass(record.key, false);\n            }\n        });\n    }\n    _applyIterableChanges(changes) {\n        changes.forEachAddedItem((record) => {\n            if (typeof record.item === 'string') {\n                this._toggleClass(record.item, true);\n            }\n            else {\n                throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${ɵstringify(record.item)}`);\n            }\n        });\n        changes.forEachRemovedItem((record) => this._toggleClass(record.item, false));\n    }\n    /**\n     * Applies a collection of CSS classes to the DOM element.\n     *\n     * For argument of type Set and Array CSS class names contained in those collections are always\n     * added.\n     * For argument of type Map CSS class name in the map's key is toggled based on the value (added\n     * for truthy and removed for falsy).\n     */\n    _applyClasses(rawClassVal) {\n        if (rawClassVal) {\n            if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n                rawClassVal.forEach((klass) => this._toggleClass(klass, true));\n            }\n            else {\n                Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, !!rawClassVal[klass]));\n            }\n        }\n    }\n    /**\n     * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup\n     * purposes.\n     */\n    _removeClasses(rawClassVal) {\n        if (rawClassVal) {\n            if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n                rawClassVal.forEach((klass) => this._toggleClass(klass, false));\n            }\n            else {\n                Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, false));\n            }\n        }\n    }\n    _toggleClass(klass, enabled) {\n        klass = klass.trim();\n        if (klass) {\n            klass.split(/\\s+/g).forEach(klass => {\n                if (enabled) {\n                    this._renderer.addClass(this._ngEl.nativeElement, klass);\n                }\n                else {\n                    this._renderer.removeClass(this._ngEl.nativeElement, klass);\n                }\n            });\n        }\n    }\n}\nNgClass.ɵfac = function NgClass_Factory(t) { return new (t || NgClass)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.IterableDiffers), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.KeyValueDiffers), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2)); };\nNgClass.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgClass, selectors: [[\"\", \"ngClass\", \"\"]], inputs: { klass: [\"class\", \"klass\"], ngClass: \"ngClass\" } });\nNgClass.ctorParameters = () => [\n    { type: IterableDiffers },\n    { type: KeyValueDiffers },\n    { type: ElementRef },\n    { type: Renderer2 }\n];\nNgClass.propDecorators = {\n    klass: [{ type: Input, args: ['class',] }],\n    ngClass: [{ type: Input, args: ['ngClass',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgClass, [{\n        type: Directive,\n        args: [{ selector: '[ngClass]' }]\n    }], function () { return [{ type: ɵngcc0.IterableDiffers }, { type: ɵngcc0.KeyValueDiffers }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }]; }, { klass: [{\n            type: Input,\n            args: ['class']\n        }], ngClass: [{\n            type: Input,\n            args: ['ngClass']\n        }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Instantiates a {@link Component} type and inserts its Host View into the current View.\n * `NgComponentOutlet` provides a declarative approach for dynamic component creation.\n *\n * `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and\n * any existing component will be destroyed.\n *\n * @usageNotes\n *\n * ### Fine tune control\n *\n * You can control the component creation process by using the following optional attributes:\n *\n * * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for\n * the Component. Defaults to the injector of the current view container.\n *\n * * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content\n * section of the component, if it exists.\n *\n * * `ngComponentOutletNgModuleFactory`: Optional module factory to allow loading another\n * module dynamically, then loading a component from that module.\n *\n * ### Syntax\n *\n * Simple\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression\"></ng-container>\n * ```\n *\n * Customized injector/content\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n *                                   injector: injectorExpression;\n *                                   content: contentNodesExpression;\">\n * </ng-container>\n * ```\n *\n * Customized ngModuleFactory\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n *                                   ngModuleFactory: moduleFactory;\">\n * </ng-container>\n * ```\n *\n * ### A simple example\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'}\n *\n * A more complete example with additional options:\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'}\n *\n * @publicApi\n * @ngModule CommonModule\n */\nclass NgComponentOutlet {\n    constructor(_viewContainerRef) {\n        this._viewContainerRef = _viewContainerRef;\n        this._componentRef = null;\n        this._moduleRef = null;\n    }\n    ngOnChanges(changes) {\n        this._viewContainerRef.clear();\n        this._componentRef = null;\n        if (this.ngComponentOutlet) {\n            const elInjector = this.ngComponentOutletInjector || this._viewContainerRef.parentInjector;\n            if (changes['ngComponentOutletNgModuleFactory']) {\n                if (this._moduleRef)\n                    this._moduleRef.destroy();\n                if (this.ngComponentOutletNgModuleFactory) {\n                    const parentModule = elInjector.get(NgModuleRef);\n                    this._moduleRef = this.ngComponentOutletNgModuleFactory.create(parentModule.injector);\n                }\n                else {\n                    this._moduleRef = null;\n                }\n            }\n            const componentFactoryResolver = this._moduleRef ? this._moduleRef.componentFactoryResolver :\n                elInjector.get(ComponentFactoryResolver);\n            const componentFactory = componentFactoryResolver.resolveComponentFactory(this.ngComponentOutlet);\n            this._componentRef = this._viewContainerRef.createComponent(componentFactory, this._viewContainerRef.length, elInjector, this.ngComponentOutletContent);\n        }\n    }\n    ngOnDestroy() {\n        if (this._moduleRef)\n            this._moduleRef.destroy();\n    }\n}\nNgComponentOutlet.ɵfac = function NgComponentOutlet_Factory(t) { return new (t || NgComponentOutlet)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef)); };\nNgComponentOutlet.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgComponentOutlet, selectors: [[\"\", \"ngComponentOutlet\", \"\"]], inputs: { ngComponentOutlet: \"ngComponentOutlet\", ngComponentOutletInjector: \"ngComponentOutletInjector\", ngComponentOutletContent: \"ngComponentOutletContent\", ngComponentOutletNgModuleFactory: \"ngComponentOutletNgModuleFactory\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature] });\nNgComponentOutlet.ctorParameters = () => [\n    { type: ViewContainerRef }\n];\nNgComponentOutlet.propDecorators = {\n    ngComponentOutlet: [{ type: Input }],\n    ngComponentOutletInjector: [{ type: Input }],\n    ngComponentOutletContent: [{ type: Input }],\n    ngComponentOutletNgModuleFactory: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgComponentOutlet, [{\n        type: Directive,\n        args: [{ selector: '[ngComponentOutlet]' }]\n    }], function () { return [{ type: ɵngcc0.ViewContainerRef }]; }, { ngComponentOutlet: [{\n            type: Input\n        }], ngComponentOutletInjector: [{\n            type: Input\n        }], ngComponentOutletContent: [{\n            type: Input\n        }], ngComponentOutletNgModuleFactory: [{\n            type: Input\n        }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nclass NgForOfContext {\n    constructor($implicit, ngForOf, index, count) {\n        this.$implicit = $implicit;\n        this.ngForOf = ngForOf;\n        this.index = index;\n        this.count = count;\n    }\n    get first() {\n        return this.index === 0;\n    }\n    get last() {\n        return this.index === this.count - 1;\n    }\n    get even() {\n        return this.index % 2 === 0;\n    }\n    get odd() {\n        return !this.even;\n    }\n}\n/**\n * A [structural directive](guide/structural-directives) that renders\n * a template for each item in a collection.\n * The directive is placed on an element, which becomes the parent\n * of the cloned templates.\n *\n * The `ngForOf` directive is generally used in the\n * [shorthand form](guide/structural-directives#asterisk) `*ngFor`.\n * In this form, the template to be rendered for each iteration is the content\n * of an anchor element containing the directive.\n *\n * The following example shows the shorthand syntax with some options,\n * contained in an `<li>` element.\n *\n * ```\n * <li *ngFor=\"let item of items; index as i; trackBy: trackByFn\">...</li>\n * ```\n *\n * The shorthand form expands into a long form that uses the `ngForOf` selector\n * on an `<ng-template>` element.\n * The content of the `<ng-template>` element is the `<li>` element that held the\n * short-form directive.\n *\n * Here is the expanded version of the short-form example.\n *\n * ```\n * <ng-template ngFor let-item [ngForOf]=\"items\" let-i=\"index\" [ngForTrackBy]=\"trackByFn\">\n *   <li>...</li>\n * </ng-template>\n * ```\n *\n * Angular automatically expands the shorthand syntax as it compiles the template.\n * The context for each embedded view is logically merged to the current component\n * context according to its lexical position.\n *\n * When using the shorthand syntax, Angular allows only [one structural directive\n * on an element](guide/built-in-directives#one-per-element).\n * If you want to iterate conditionally, for example,\n * put the `*ngIf` on a container element that wraps the `*ngFor` element.\n * For futher discussion, see\n * [Structural Directives](guide/built-in-directives#one-per-element).\n *\n * @usageNotes\n *\n * ### Local variables\n *\n * `NgForOf` provides exported values that can be aliased to local variables.\n * For example:\n *\n *  ```\n * <li *ngFor=\"let user of users; index as i; first as isFirst\">\n *    {{i}}/{{users.length}}. {{user}} <span *ngIf=\"isFirst\">default</span>\n * </li>\n * ```\n *\n * The following exported values can be aliased to local variables:\n *\n * - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`).\n * - `ngForOf: NgIterable<T>`: The value of the iterable expression. Useful when the expression is\n * more complex then a property access, for example when using the async pipe (`userStreams |\n * async`).\n * - `index: number`: The index of the current item in the iterable.\n * - `count: number`: The length of the iterable.\n * - `first: boolean`: True when the item is the first item in the iterable.\n * - `last: boolean`: True when the item is the last item in the iterable.\n * - `even: boolean`: True when the item has an even index in the iterable.\n * - `odd: boolean`: True when the item has an odd index in the iterable.\n *\n * ### Change propagation\n *\n * When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM:\n *\n * * When an item is added, a new instance of the template is added to the DOM.\n * * When an item is removed, its template instance is removed from the DOM.\n * * When items are reordered, their respective templates are reordered in the DOM.\n *\n * Angular uses object identity to track insertions and deletions within the iterator and reproduce\n * those changes in the DOM. This has important implications for animations and any stateful\n * controls that are present, such as `<input>` elements that accept user input. Inserted rows can\n * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state\n * such as user input.\n * For more on animations, see [Transitions and Triggers](guide/transition-and-triggers).\n *\n * The identities of elements in the iterator can change while the data does not.\n * This can happen, for example, if the iterator is produced from an RPC to the server, and that\n * RPC is re-run. Even if the data hasn't changed, the second response produces objects with\n * different identities, and Angular must tear down the entire DOM and rebuild it (as if all old\n * elements were deleted and all new elements inserted).\n *\n * To avoid this expensive operation, you can customize the default tracking algorithm.\n * by supplying the `trackBy` option to `NgForOf`.\n * `trackBy` takes a function that has two arguments: `index` and `item`.\n * If `trackBy` is given, Angular tracks changes by the return value of the function.\n *\n * @see [Structural Directives](guide/structural-directives)\n * @ngModule CommonModule\n * @publicApi\n */\nclass NgForOf {\n    constructor(_viewContainer, _template, _differs) {\n        this._viewContainer = _viewContainer;\n        this._template = _template;\n        this._differs = _differs;\n        this._ngForOf = null;\n        this._ngForOfDirty = true;\n        this._differ = null;\n    }\n    /**\n     * The value of the iterable expression, which can be used as a\n     * [template input variable](guide/structural-directives#shorthand).\n     */\n    set ngForOf(ngForOf) {\n        this._ngForOf = ngForOf;\n        this._ngForOfDirty = true;\n    }\n    /**\n     * Specifies a custom `TrackByFunction` to compute the identity of items in an iterable.\n     *\n     * If a custom `TrackByFunction` is not provided, `NgForOf` will use the item's [object\n     * identity](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is)\n     * as the key.\n     *\n     * `NgForOf` uses the computed key to associate items in an iterable with DOM elements\n     * it produces for these items.\n     *\n     * A custom `TrackByFunction` is useful to provide good user experience in cases when items in an\n     * iterable rendered using `NgForOf` have a natural identifier (for example, custom ID or a\n     * primary key), and this iterable could be updated with new object instances that still\n     * represent the same underlying entity (for example, when data is re-fetched from the server,\n     * and the iterable is recreated and re-rendered, but most of the data is still the same).\n     *\n     * @see `TrackByFunction`\n     */\n    set ngForTrackBy(fn) {\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && fn != null && typeof fn !== 'function') {\n            // TODO(vicb): use a log service once there is a public one available\n            if (console && console.warn) {\n                console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}. ` +\n                    `See https://angular.io/api/common/NgForOf#change-propagation for more information.`);\n            }\n        }\n        this._trackByFn = fn;\n    }\n    get ngForTrackBy() {\n        return this._trackByFn;\n    }\n    /**\n     * A reference to the template that is stamped out for each item in the iterable.\n     * @see [template reference variable](guide/template-reference-variables)\n     */\n    set ngForTemplate(value) {\n        // TODO(TS2.1): make TemplateRef<Partial<NgForRowOf<T>>> once we move to TS v2.1\n        // The current type is too restrictive; a template that just uses index, for example,\n        // should be acceptable.\n        if (value) {\n            this._template = value;\n        }\n    }\n    /**\n     * Applies the changes when needed.\n     */\n    ngDoCheck() {\n        if (this._ngForOfDirty) {\n            this._ngForOfDirty = false;\n            // React on ngForOf changes only once all inputs have been initialized\n            const value = this._ngForOf;\n            if (!this._differ && value) {\n                try {\n                    this._differ = this._differs.find(value).create(this.ngForTrackBy);\n                }\n                catch (_a) {\n                    throw new Error(`Cannot find a differ supporting object '${value}' of type '${getTypeName(value)}'. NgFor only supports binding to Iterables such as Arrays.`);\n                }\n            }\n        }\n        if (this._differ) {\n            const changes = this._differ.diff(this._ngForOf);\n            if (changes)\n                this._applyChanges(changes);\n        }\n    }\n    _applyChanges(changes) {\n        const insertTuples = [];\n        changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => {\n            if (item.previousIndex == null) {\n                // NgForOf is never \"null\" or \"undefined\" here because the differ detected\n                // that a new item needs to be inserted from the iterable. This implies that\n                // there is an iterable value for \"_ngForOf\".\n                const view = this._viewContainer.createEmbeddedView(this._template, new NgForOfContext(null, this._ngForOf, -1, -1), currentIndex === null ? undefined : currentIndex);\n                const tuple = new RecordViewTuple(item, view);\n                insertTuples.push(tuple);\n            }\n            else if (currentIndex == null) {\n                this._viewContainer.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);\n            }\n            else if (adjustedPreviousIndex !== null) {\n                const view = this._viewContainer.get(adjustedPreviousIndex);\n                this._viewContainer.move(view, currentIndex);\n                const tuple = new RecordViewTuple(item, view);\n                insertTuples.push(tuple);\n            }\n        });\n        for (let i = 0; i < insertTuples.length; i++) {\n            this._perViewChange(insertTuples[i].view, insertTuples[i].record);\n        }\n        for (let i = 0, ilen = this._viewContainer.length; i < ilen; i++) {\n            const viewRef = this._viewContainer.get(i);\n            viewRef.context.index = i;\n            viewRef.context.count = ilen;\n            viewRef.context.ngForOf = this._ngForOf;\n        }\n        changes.forEachIdentityChange((record) => {\n            const viewRef = this._viewContainer.get(record.currentIndex);\n            viewRef.context.$implicit = record.item;\n        });\n    }\n    _perViewChange(view, record) {\n        view.context.$implicit = record.item;\n    }\n    /**\n     * Asserts the correct type of the context for the template that `NgForOf` will render.\n     *\n     * The presence of this method is a signal to the Ivy template type-check compiler that the\n     * `NgForOf` structural directive renders its template with a specific context type.\n     */\n    static ngTemplateContextGuard(dir, ctx) {\n        return true;\n    }\n}\nNgForOf.ɵfac = function NgForOf_Factory(t) { return new (t || NgForOf)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.IterableDiffers)); };\nNgForOf.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgForOf, selectors: [[\"\", \"ngFor\", \"\", \"ngForOf\", \"\"]], inputs: { ngForOf: \"ngForOf\", ngForTrackBy: \"ngForTrackBy\", ngForTemplate: \"ngForTemplate\" } });\nNgForOf.ctorParameters = () => [\n    { type: ViewContainerRef },\n    { type: TemplateRef },\n    { type: IterableDiffers }\n];\nNgForOf.propDecorators = {\n    ngForOf: [{ type: Input }],\n    ngForTrackBy: [{ type: Input }],\n    ngForTemplate: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgForOf, [{\n        type: Directive,\n        args: [{ selector: '[ngFor][ngForOf]' }]\n    }], function () { return [{ type: ɵngcc0.ViewContainerRef }, { type: ɵngcc0.TemplateRef }, { type: ɵngcc0.IterableDiffers }]; }, { ngForOf: [{\n            type: Input\n        }], ngForTrackBy: [{\n            type: Input\n        }], ngForTemplate: [{\n            type: Input\n        }] }); })();\nclass RecordViewTuple {\n    constructor(record, view) {\n        this.record = record;\n        this.view = view;\n    }\n}\nfunction getTypeName(type) {\n    return type['name'] || typeof type;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A structural directive that conditionally includes a template based on the value of\n * an expression coerced to Boolean.\n * When the expression evaluates to true, Angular renders the template\n * provided in a `then` clause, and when  false or null,\n * Angular renders the template provided in an optional `else` clause. The default\n * template for the `else` clause is blank.\n *\n * A [shorthand form](guide/structural-directives#asterisk) of the directive,\n * `*ngIf=\"condition\"`, is generally used, provided\n * as an attribute of the anchor element for the inserted template.\n * Angular expands this into a more explicit version, in which the anchor element\n * is contained in an `<ng-template>` element.\n *\n * Simple form with shorthand syntax:\n *\n * ```\n * <div *ngIf=\"condition\">Content to render when condition is true.</div>\n * ```\n *\n * Simple form with expanded syntax:\n *\n * ```\n * <ng-template [ngIf]=\"condition\"><div>Content to render when condition is\n * true.</div></ng-template>\n * ```\n *\n * Form with an \"else\" block:\n *\n * ```\n * <div *ngIf=\"condition; else elseBlock\">Content to render when condition is true.</div>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * ```\n *\n * Shorthand form with \"then\" and \"else\" blocks:\n *\n * ```\n * <div *ngIf=\"condition; then thenBlock else elseBlock\"></div>\n * <ng-template #thenBlock>Content to render when condition is true.</ng-template>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * ```\n *\n * Form with storing the value locally:\n *\n * ```\n * <div *ngIf=\"condition as value; else elseBlock\">{{value}}</div>\n * <ng-template #elseBlock>Content to render when value is null.</ng-template>\n * ```\n *\n * @usageNotes\n *\n * The `*ngIf` directive is most commonly used to conditionally show an inline template,\n * as seen in the following  example.\n * The default `else` template is blank.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfSimple'}\n *\n * ### Showing an alternative template using `else`\n *\n * To display a template when `expression` evaluates to false, use an `else` template\n * binding as shown in the following example.\n * The `else` binding points to an `<ng-template>`  element labeled `#elseBlock`.\n * The template can be defined anywhere in the component view, but is typically placed right after\n * `ngIf` for readability.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfElse'}\n *\n * ### Using an external `then` template\n *\n * In the previous example, the then-clause template is specified inline, as the content of the\n * tag that contains the `ngIf` directive. You can also specify a template that is defined\n * externally, by referencing a labeled `<ng-template>` element. When you do this, you can\n * change which template to use at runtime, as shown in the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfThenElse'}\n *\n * ### Storing a conditional result in a variable\n *\n * You might want to show a set of properties from the same object. If you are waiting\n * for asynchronous data, the object can be undefined.\n * In this case, you can use `ngIf` and store the result of the condition in a local\n * variable as shown in the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfAs'}\n *\n * This code uses only one `AsyncPipe`, so only one subscription is created.\n * The conditional statement stores the result of `userStream|async` in the local variable `user`.\n * You can then bind the local `user` repeatedly.\n *\n * The conditional displays the data only if `userStream` returns a value,\n * so you don't need to use the\n * safe-navigation-operator (`?.`)\n * to guard against null values when accessing properties.\n * You can display an alternative template while waiting for the data.\n *\n * ### Shorthand syntax\n *\n * The shorthand syntax `*ngIf` expands into two separate template specifications\n * for the \"then\" and \"else\" clauses. For example, consider the following shorthand statement,\n * that is meant to show a loading page while waiting for data to be loaded.\n *\n * ```\n * <div class=\"hero-list\" *ngIf=\"heroes else loading\">\n *  ...\n * </div>\n *\n * <ng-template #loading>\n *  <div>Loading...</div>\n * </ng-template>\n * ```\n *\n * You can see that the \"else\" clause references the `<ng-template>`\n * with the `#loading` label, and the template for the \"then\" clause\n * is provided as the content of the anchor element.\n *\n * However, when Angular expands the shorthand syntax, it creates\n * another `<ng-template>` tag, with `ngIf` and `ngIfElse` directives.\n * The anchor element containing the template for the \"then\" clause becomes\n * the content of this unlabeled `<ng-template>` tag.\n *\n * ```\n * <ng-template [ngIf]=\"heroes\" [ngIfElse]=\"loading\">\n *  <div class=\"hero-list\">\n *   ...\n *  </div>\n * </ng-template>\n *\n * <ng-template #loading>\n *  <div>Loading...</div>\n * </ng-template>\n * ```\n *\n * The presence of the implicit template object has implications for the nesting of\n * structural directives. For more on this subject, see\n * [Structural Directives](https://angular.io/guide/built-in-directives#one-per-element).\n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass NgIf {\n    constructor(_viewContainer, templateRef) {\n        this._viewContainer = _viewContainer;\n        this._context = new NgIfContext();\n        this._thenTemplateRef = null;\n        this._elseTemplateRef = null;\n        this._thenViewRef = null;\n        this._elseViewRef = null;\n        this._thenTemplateRef = templateRef;\n    }\n    /**\n     * The Boolean expression to evaluate as the condition for showing a template.\n     */\n    set ngIf(condition) {\n        this._context.$implicit = this._context.ngIf = condition;\n        this._updateView();\n    }\n    /**\n     * A template to show if the condition expression evaluates to true.\n     */\n    set ngIfThen(templateRef) {\n        assertTemplate('ngIfThen', templateRef);\n        this._thenTemplateRef = templateRef;\n        this._thenViewRef = null; // clear previous view if any.\n        this._updateView();\n    }\n    /**\n     * A template to show if the condition expression evaluates to false.\n     */\n    set ngIfElse(templateRef) {\n        assertTemplate('ngIfElse', templateRef);\n        this._elseTemplateRef = templateRef;\n        this._elseViewRef = null; // clear previous view if any.\n        this._updateView();\n    }\n    _updateView() {\n        if (this._context.$implicit) {\n            if (!this._thenViewRef) {\n                this._viewContainer.clear();\n                this._elseViewRef = null;\n                if (this._thenTemplateRef) {\n                    this._thenViewRef =\n                        this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);\n                }\n            }\n        }\n        else {\n            if (!this._elseViewRef) {\n                this._viewContainer.clear();\n                this._thenViewRef = null;\n                if (this._elseTemplateRef) {\n                    this._elseViewRef =\n                        this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);\n                }\n            }\n        }\n    }\n    /**\n     * Asserts the correct type of the context for the template that `NgIf` will render.\n     *\n     * The presence of this method is a signal to the Ivy template type-check compiler that the\n     * `NgIf` structural directive renders its template with a specific context type.\n     */\n    static ngTemplateContextGuard(dir, ctx) {\n        return true;\n    }\n}\nNgIf.ɵfac = function NgIf_Factory(t) { return new (t || NgIf)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgIf.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgIf, selectors: [[\"\", \"ngIf\", \"\"]], inputs: { ngIf: \"ngIf\", ngIfThen: \"ngIfThen\", ngIfElse: \"ngIfElse\" } });\nNgIf.ctorParameters = () => [\n    { type: ViewContainerRef },\n    { type: TemplateRef }\n];\nNgIf.propDecorators = {\n    ngIf: [{ type: Input }],\n    ngIfThen: [{ type: Input }],\n    ngIfElse: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgIf, [{\n        type: Directive,\n        args: [{ selector: '[ngIf]' }]\n    }], function () { return [{ type: ɵngcc0.ViewContainerRef }, { type: ɵngcc0.TemplateRef }]; }, { ngIf: [{\n            type: Input\n        }], ngIfThen: [{\n            type: Input\n        }], ngIfElse: [{\n            type: Input\n        }] }); })();\n/**\n * @publicApi\n */\nclass NgIfContext {\n    constructor() {\n        this.$implicit = null;\n        this.ngIf = null;\n    }\n}\nfunction assertTemplate(property, templateRef) {\n    const isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);\n    if (!isTemplateRefOrNull) {\n        throw new Error(`${property} must be a TemplateRef, but received '${ɵstringify(templateRef)}'.`);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass SwitchView {\n    constructor(_viewContainerRef, _templateRef) {\n        this._viewContainerRef = _viewContainerRef;\n        this._templateRef = _templateRef;\n        this._created = false;\n    }\n    create() {\n        this._created = true;\n        this._viewContainerRef.createEmbeddedView(this._templateRef);\n    }\n    destroy() {\n        this._created = false;\n        this._viewContainerRef.clear();\n    }\n    enforceState(created) {\n        if (created && !this._created) {\n            this.create();\n        }\n        else if (!created && this._created) {\n            this.destroy();\n        }\n    }\n}\n/**\n * @ngModule CommonModule\n *\n * @description\n * The `[ngSwitch]` directive on a container specifies an expression to match against.\n * The expressions to match are provided by `ngSwitchCase` directives on views within the container.\n * - Every view that matches is rendered.\n * - If there are no matches, a view with the `ngSwitchDefault` directive is rendered.\n * - Elements within the `[NgSwitch]` statement but outside of any `NgSwitchCase`\n * or `ngSwitchDefault` directive are preserved at the location.\n *\n * @usageNotes\n * Define a container element for the directive, and specify the switch expression\n * to match against as an attribute:\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * ```\n *\n * Within the container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *    <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n * ...\n *    <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * ### Usage Examples\n *\n * The following example shows how to use more than one case to display the same view:\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *   <!-- the same view can be shown in more than one case -->\n *   <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n *   <some-element *ngSwitchCase=\"match_expression_2\">...</some-element>\n *   <some-other-element *ngSwitchCase=\"match_expression_3\">...</some-other-element>\n *   <!--default case when there are no matches -->\n *   <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * The following example shows how cases can be nested:\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *       <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n *       <some-element *ngSwitchCase=\"match_expression_2\">...</some-element>\n *       <some-other-element *ngSwitchCase=\"match_expression_3\">...</some-other-element>\n *       <ng-container *ngSwitchCase=\"match_expression_3\">\n *         <!-- use a ng-container to group multiple root nodes -->\n *         <inner-element></inner-element>\n *         <inner-other-element></inner-other-element>\n *       </ng-container>\n *       <some-element *ngSwitchDefault>...</some-element>\n *     </container-element>\n * ```\n *\n * @publicApi\n * @see `NgSwitchCase`\n * @see `NgSwitchDefault`\n * @see [Structural Directives](guide/structural-directives)\n *\n */\nclass NgSwitch {\n    constructor() {\n        this._defaultUsed = false;\n        this._caseCount = 0;\n        this._lastCaseCheckIndex = 0;\n        this._lastCasesMatched = false;\n    }\n    set ngSwitch(newValue) {\n        this._ngSwitch = newValue;\n        if (this._caseCount === 0) {\n            this._updateDefaultCases(true);\n        }\n    }\n    /** @internal */\n    _addCase() {\n        return this._caseCount++;\n    }\n    /** @internal */\n    _addDefault(view) {\n        if (!this._defaultViews) {\n            this._defaultViews = [];\n        }\n        this._defaultViews.push(view);\n    }\n    /** @internal */\n    _matchCase(value) {\n        const matched = value == this._ngSwitch;\n        this._lastCasesMatched = this._lastCasesMatched || matched;\n        this._lastCaseCheckIndex++;\n        if (this._lastCaseCheckIndex === this._caseCount) {\n            this._updateDefaultCases(!this._lastCasesMatched);\n            this._lastCaseCheckIndex = 0;\n            this._lastCasesMatched = false;\n        }\n        return matched;\n    }\n    _updateDefaultCases(useDefault) {\n        if (this._defaultViews && useDefault !== this._defaultUsed) {\n            this._defaultUsed = useDefault;\n            for (let i = 0; i < this._defaultViews.length; i++) {\n                const defaultView = this._defaultViews[i];\n                defaultView.enforceState(useDefault);\n            }\n        }\n    }\n}\nNgSwitch.ɵfac = function NgSwitch_Factory(t) { return new (t || NgSwitch)(); };\nNgSwitch.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgSwitch, selectors: [[\"\", \"ngSwitch\", \"\"]], inputs: { ngSwitch: \"ngSwitch\" } });\nNgSwitch.propDecorators = {\n    ngSwitch: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgSwitch, [{\n        type: Directive,\n        args: [{ selector: '[ngSwitch]' }]\n    }], function () { return []; }, { ngSwitch: [{\n            type: Input\n        }] }); })();\n/**\n * @ngModule CommonModule\n *\n * @description\n * Provides a switch case expression to match against an enclosing `ngSwitch` expression.\n * When the expressions match, the given `NgSwitchCase` template is rendered.\n * If multiple match expressions match the switch expression value, all of them are displayed.\n *\n * @usageNotes\n *\n * Within a switch container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *   <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n *   ...\n *   <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * Each switch-case statement contains an in-line HTML template or template reference\n * that defines the subtree to be selected if the value of the match expression\n * matches the value of the switch expression.\n *\n * Unlike JavaScript, which uses strict equality, Angular uses loose equality.\n * This means that the empty string, `\"\"` matches 0.\n *\n * @publicApi\n * @see `NgSwitch`\n * @see `NgSwitchDefault`\n *\n */\nclass NgSwitchCase {\n    constructor(viewContainer, templateRef, ngSwitch) {\n        this.ngSwitch = ngSwitch;\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {\n            throwNgSwitchProviderNotFoundError('ngSwitchCase', 'NgSwitchCase');\n        }\n        ngSwitch._addCase();\n        this._view = new SwitchView(viewContainer, templateRef);\n    }\n    /**\n     * Performs case matching. For internal use only.\n     */\n    ngDoCheck() {\n        this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));\n    }\n}\nNgSwitchCase.ɵfac = function NgSwitchCase_Factory(t) { return new (t || NgSwitchCase)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef), ɵngcc0.ɵɵdirectiveInject(NgSwitch, 9)); };\nNgSwitchCase.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgSwitchCase, selectors: [[\"\", \"ngSwitchCase\", \"\"]], inputs: { ngSwitchCase: \"ngSwitchCase\" } });\nNgSwitchCase.ctorParameters = () => [\n    { type: ViewContainerRef },\n    { type: TemplateRef },\n    { type: NgSwitch, decorators: [{ type: Optional }, { type: Host }] }\n];\nNgSwitchCase.propDecorators = {\n    ngSwitchCase: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgSwitchCase, [{\n        type: Directive,\n        args: [{ selector: '[ngSwitchCase]' }]\n    }], function () { return [{ type: ɵngcc0.ViewContainerRef }, { type: ɵngcc0.TemplateRef }, { type: NgSwitch, decorators: [{\n                type: Optional\n            }, {\n                type: Host\n            }] }]; }, { ngSwitchCase: [{\n            type: Input\n        }] }); })();\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Creates a view that is rendered when no `NgSwitchCase` expressions\n * match the `NgSwitch` expression.\n * This statement should be the final case in an `NgSwitch`.\n *\n * @publicApi\n * @see `NgSwitch`\n * @see `NgSwitchCase`\n *\n */\nclass NgSwitchDefault {\n    constructor(viewContainer, templateRef, ngSwitch) {\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {\n            throwNgSwitchProviderNotFoundError('ngSwitchDefault', 'NgSwitchDefault');\n        }\n        ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));\n    }\n}\nNgSwitchDefault.ɵfac = function NgSwitchDefault_Factory(t) { return new (t || NgSwitchDefault)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef), ɵngcc0.ɵɵdirectiveInject(NgSwitch, 9)); };\nNgSwitchDefault.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgSwitchDefault, selectors: [[\"\", \"ngSwitchDefault\", \"\"]] });\nNgSwitchDefault.ctorParameters = () => [\n    { type: ViewContainerRef },\n    { type: TemplateRef },\n    { type: NgSwitch, decorators: [{ type: Optional }, { type: Host }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgSwitchDefault, [{\n        type: Directive,\n        args: [{ selector: '[ngSwitchDefault]' }]\n    }], function () { return [{ type: ɵngcc0.ViewContainerRef }, { type: ɵngcc0.TemplateRef }, { type: NgSwitch, decorators: [{\n                type: Optional\n            }, {\n                type: Host\n            }] }]; }, null); })();\nfunction throwNgSwitchProviderNotFoundError(attrName, directiveName) {\n    throw new ɵRuntimeError(\"305\" /* TEMPLATE_STRUCTURE_ERROR */, `An element with the \"${attrName}\" attribute ` +\n        `(matching the \"${directiveName}\" directive) must be located inside an element with the \"ngSwitch\" attribute ` +\n        `(matching \"NgSwitch\" directive)`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n * <some-element [ngPlural]=\"value\">\n *   <ng-template ngPluralCase=\"=0\">there is nothing</ng-template>\n *   <ng-template ngPluralCase=\"=1\">there is one</ng-template>\n *   <ng-template ngPluralCase=\"few\">there are a few</ng-template>\n * </some-element>\n * ```\n *\n * @description\n *\n * Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization.\n *\n * Displays DOM sub-trees that match the switch expression value, or failing that, DOM sub-trees\n * that match the switch expression's pluralization category.\n *\n * To use this directive you must provide a container element that sets the `[ngPlural]` attribute\n * to a switch expression. Inner elements with a `[ngPluralCase]` will display based on their\n * expression:\n * - if `[ngPluralCase]` is set to a value starting with `=`, it will only display if the value\n *   matches the switch expression exactly,\n * - otherwise, the view will be treated as a \"category match\", and will only display if exact\n *   value matches aren't found and the value maps to its category for the defined locale.\n *\n * See http://cldr.unicode.org/index/cldr-spec/plural-rules\n *\n * @publicApi\n */\nclass NgPlural {\n    constructor(_localization) {\n        this._localization = _localization;\n        this._caseViews = {};\n    }\n    set ngPlural(value) {\n        this._switchValue = value;\n        this._updateView();\n    }\n    addCase(value, switchView) {\n        this._caseViews[value] = switchView;\n    }\n    _updateView() {\n        this._clearViews();\n        const cases = Object.keys(this._caseViews);\n        const key = getPluralCategory(this._switchValue, cases, this._localization);\n        this._activateView(this._caseViews[key]);\n    }\n    _clearViews() {\n        if (this._activeView)\n            this._activeView.destroy();\n    }\n    _activateView(view) {\n        if (view) {\n            this._activeView = view;\n            this._activeView.create();\n        }\n    }\n}\nNgPlural.ɵfac = function NgPlural_Factory(t) { return new (t || NgPlural)(ɵngcc0.ɵɵdirectiveInject(NgLocalization)); };\nNgPlural.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgPlural, selectors: [[\"\", \"ngPlural\", \"\"]], inputs: { ngPlural: \"ngPlural\" } });\nNgPlural.ctorParameters = () => [\n    { type: NgLocalization }\n];\nNgPlural.propDecorators = {\n    ngPlural: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgPlural, [{\n        type: Directive,\n        args: [{ selector: '[ngPlural]' }]\n    }], function () { return [{ type: NgLocalization }]; }, { ngPlural: [{\n            type: Input\n        }] }); })();\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Creates a view that will be added/removed from the parent {@link NgPlural} when the\n * given expression matches the plural expression according to CLDR rules.\n *\n * @usageNotes\n * ```\n * <some-element [ngPlural]=\"value\">\n *   <ng-template ngPluralCase=\"=0\">...</ng-template>\n *   <ng-template ngPluralCase=\"other\">...</ng-template>\n * </some-element>\n *```\n *\n * See {@link NgPlural} for more details and example.\n *\n * @publicApi\n */\nclass NgPluralCase {\n    constructor(value, template, viewContainer, ngPlural) {\n        this.value = value;\n        const isANumber = !isNaN(Number(value));\n        ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));\n    }\n}\nNgPluralCase.ɵfac = function NgPluralCase_Factory(t) { return new (t || NgPluralCase)(ɵngcc0.ɵɵinjectAttribute('ngPluralCase'), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(NgPlural, 1)); };\nNgPluralCase.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgPluralCase, selectors: [[\"\", \"ngPluralCase\", \"\"]] });\nNgPluralCase.ctorParameters = () => [\n    { type: String, decorators: [{ type: Attribute, args: ['ngPluralCase',] }] },\n    { type: TemplateRef },\n    { type: ViewContainerRef },\n    { type: NgPlural, decorators: [{ type: Host }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgPluralCase, [{\n        type: Directive,\n        args: [{ selector: '[ngPluralCase]' }]\n    }], function () { return [{ type: String, decorators: [{\n                type: Attribute,\n                args: ['ngPluralCase']\n            }] }, { type: ɵngcc0.TemplateRef }, { type: ɵngcc0.ViewContainerRef }, { type: NgPlural, decorators: [{\n                type: Host\n            }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n *\n * Set the font of the containing element to the result of an expression.\n *\n * ```\n * <some-element [ngStyle]=\"{'font-style': styleExp}\">...</some-element>\n * ```\n *\n * Set the width of the containing element to a pixel value returned by an expression.\n *\n * ```\n * <some-element [ngStyle]=\"{'max-width.px': widthExp}\">...</some-element>\n * ```\n *\n * Set a collection of style values using an expression that returns key-value pairs.\n *\n * ```\n * <some-element [ngStyle]=\"objExp\">...</some-element>\n * ```\n *\n * @description\n *\n * An attribute directive that updates styles for the containing HTML element.\n * Sets one or more style properties, specified as colon-separated key-value pairs.\n * The key is a style name, with an optional `.<unit>` suffix\n * (such as 'top.px', 'font-style.em').\n * The value is an expression to be evaluated.\n * The resulting non-null value, expressed in the given unit,\n * is assigned to the given style property.\n * If the result of evaluation is null, the corresponding style is removed.\n *\n * @publicApi\n */\nclass NgStyle {\n    constructor(_ngEl, _differs, _renderer) {\n        this._ngEl = _ngEl;\n        this._differs = _differs;\n        this._renderer = _renderer;\n        this._ngStyle = null;\n        this._differ = null;\n    }\n    set ngStyle(values) {\n        this._ngStyle = values;\n        if (!this._differ && values) {\n            this._differ = this._differs.find(values).create();\n        }\n    }\n    ngDoCheck() {\n        if (this._differ) {\n            const changes = this._differ.diff(this._ngStyle);\n            if (changes) {\n                this._applyChanges(changes);\n            }\n        }\n    }\n    _setStyle(nameAndUnit, value) {\n        const [name, unit] = nameAndUnit.split('.');\n        value = value != null && unit ? `${value}${unit}` : value;\n        if (value != null) {\n            this._renderer.setStyle(this._ngEl.nativeElement, name, value);\n        }\n        else {\n            this._renderer.removeStyle(this._ngEl.nativeElement, name);\n        }\n    }\n    _applyChanges(changes) {\n        changes.forEachRemovedItem((record) => this._setStyle(record.key, null));\n        changes.forEachAddedItem((record) => this._setStyle(record.key, record.currentValue));\n        changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));\n    }\n}\nNgStyle.ɵfac = function NgStyle_Factory(t) { return new (t || NgStyle)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.KeyValueDiffers), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2)); };\nNgStyle.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgStyle, selectors: [[\"\", \"ngStyle\", \"\"]], inputs: { ngStyle: \"ngStyle\" } });\nNgStyle.ctorParameters = () => [\n    { type: ElementRef },\n    { type: KeyValueDiffers },\n    { type: Renderer2 }\n];\nNgStyle.propDecorators = {\n    ngStyle: [{ type: Input, args: ['ngStyle',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgStyle, [{\n        type: Directive,\n        args: [{ selector: '[ngStyle]' }]\n    }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.KeyValueDiffers }, { type: ɵngcc0.Renderer2 }]; }, { ngStyle: [{\n            type: Input,\n            args: ['ngStyle']\n        }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Inserts an embedded view from a prepared `TemplateRef`.\n *\n * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`.\n * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding\n * by the local template `let` declarations.\n *\n * @usageNotes\n * ```\n * <ng-container *ngTemplateOutlet=\"templateRefExp; context: contextExp\"></ng-container>\n * ```\n *\n * Using the key `$implicit` in the context object will set its value as default.\n *\n * ### Example\n *\n * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}\n *\n * @publicApi\n */\nclass NgTemplateOutlet {\n    constructor(_viewContainerRef) {\n        this._viewContainerRef = _viewContainerRef;\n        this._viewRef = null;\n        /**\n         * A context object to attach to the {@link EmbeddedViewRef}. This should be an\n         * object, the object's keys will be available for binding by the local template `let`\n         * declarations.\n         * Using the key `$implicit` in the context object will set its value as default.\n         */\n        this.ngTemplateOutletContext = null;\n        /**\n         * A string defining the template reference and optionally the context object for the template.\n         */\n        this.ngTemplateOutlet = null;\n    }\n    ngOnChanges(changes) {\n        if (changes['ngTemplateOutlet']) {\n            const viewContainerRef = this._viewContainerRef;\n            if (this._viewRef) {\n                viewContainerRef.remove(viewContainerRef.indexOf(this._viewRef));\n            }\n            this._viewRef = this.ngTemplateOutlet ?\n                viewContainerRef.createEmbeddedView(this.ngTemplateOutlet, this.ngTemplateOutletContext) :\n                null;\n        }\n        else if (this._viewRef && changes['ngTemplateOutletContext'] && this.ngTemplateOutletContext) {\n            this._viewRef.context = this.ngTemplateOutletContext;\n        }\n    }\n}\nNgTemplateOutlet.ɵfac = function NgTemplateOutlet_Factory(t) { return new (t || NgTemplateOutlet)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef)); };\nNgTemplateOutlet.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgTemplateOutlet, selectors: [[\"\", \"ngTemplateOutlet\", \"\"]], inputs: { ngTemplateOutletContext: \"ngTemplateOutletContext\", ngTemplateOutlet: \"ngTemplateOutlet\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature] });\nNgTemplateOutlet.ctorParameters = () => [\n    { type: ViewContainerRef }\n];\nNgTemplateOutlet.propDecorators = {\n    ngTemplateOutletContext: [{ type: Input }],\n    ngTemplateOutlet: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgTemplateOutlet, [{\n        type: Directive,\n        args: [{ selector: '[ngTemplateOutlet]' }]\n    }], function () { return [{ type: ɵngcc0.ViewContainerRef }]; }, { ngTemplateOutletContext: [{\n            type: Input\n        }], ngTemplateOutlet: [{\n            type: Input\n        }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A collection of Angular directives that are likely to be used in each and every Angular\n * application.\n */\nconst COMMON_DIRECTIVES = [\n    NgClass,\n    NgComponentOutlet,\n    NgForOf,\n    NgIf,\n    NgTemplateOutlet,\n    NgStyle,\n    NgSwitch,\n    NgSwitchCase,\n    NgSwitchDefault,\n    NgPlural,\n    NgPluralCase,\n];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction invalidPipeArgumentError(type, value) {\n    return Error(`InvalidPipeArgument: '${value}' for pipe '${ɵstringify(type)}'`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass SubscribableStrategy {\n    createSubscription(async, updateLatestValue) {\n        return async.subscribe({\n            next: updateLatestValue,\n            error: (e) => {\n                throw e;\n            }\n        });\n    }\n    dispose(subscription) {\n        subscription.unsubscribe();\n    }\n    onDestroy(subscription) {\n        subscription.unsubscribe();\n    }\n}\nclass PromiseStrategy {\n    createSubscription(async, updateLatestValue) {\n        return async.then(updateLatestValue, e => {\n            throw e;\n        });\n    }\n    dispose(subscription) { }\n    onDestroy(subscription) { }\n}\nconst _promiseStrategy = new PromiseStrategy();\nconst _subscribableStrategy = new SubscribableStrategy();\n/**\n * @ngModule CommonModule\n * @description\n *\n * Unwraps a value from an asynchronous primitive.\n *\n * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has\n * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for\n * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid\n * potential memory leaks.\n *\n * @usageNotes\n *\n * ### Examples\n *\n * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the\n * promise.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'}\n *\n * It's also possible to use `async` with Observables. The example below binds the `time` Observable\n * to the view. The Observable continuously updates the view with the current time.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}\n *\n * @publicApi\n */\nclass AsyncPipe {\n    constructor(_ref) {\n        this._ref = _ref;\n        this._latestValue = null;\n        this._subscription = null;\n        this._obj = null;\n        this._strategy = null;\n    }\n    ngOnDestroy() {\n        if (this._subscription) {\n            this._dispose();\n        }\n    }\n    transform(obj) {\n        if (!this._obj) {\n            if (obj) {\n                this._subscribe(obj);\n            }\n            return this._latestValue;\n        }\n        if (obj !== this._obj) {\n            this._dispose();\n            return this.transform(obj);\n        }\n        return this._latestValue;\n    }\n    _subscribe(obj) {\n        this._obj = obj;\n        this._strategy = this._selectStrategy(obj);\n        this._subscription = this._strategy.createSubscription(obj, (value) => this._updateLatestValue(obj, value));\n    }\n    _selectStrategy(obj) {\n        if (ɵisPromise(obj)) {\n            return _promiseStrategy;\n        }\n        if (ɵisSubscribable(obj)) {\n            return _subscribableStrategy;\n        }\n        throw invalidPipeArgumentError(AsyncPipe, obj);\n    }\n    _dispose() {\n        this._strategy.dispose(this._subscription);\n        this._latestValue = null;\n        this._subscription = null;\n        this._obj = null;\n    }\n    _updateLatestValue(async, value) {\n        if (async === this._obj) {\n            this._latestValue = value;\n            this._ref.markForCheck();\n        }\n    }\n}\nAsyncPipe.ɵfac = function AsyncPipe_Factory(t) { return new (t || AsyncPipe)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef, 16)); };\nAsyncPipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"async\", type: AsyncPipe, pure: false });\nAsyncPipe.ctorParameters = () => [\n    { type: ChangeDetectorRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(AsyncPipe, [{\n        type: Pipe,\n        args: [{ name: 'async', pure: false }]\n    }], function () { return [{ type: ɵngcc0.ChangeDetectorRef }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Transforms text to all lower case.\n *\n * @see `UpperCasePipe`\n * @see `TitleCasePipe`\n * @usageNotes\n *\n * The following example defines a view that allows the user to enter\n * text, and then uses the pipe to convert the input text to all lower case.\n *\n * <code-example path=\"common/pipes/ts/lowerupper_pipe.ts\" region='LowerUpperPipe'></code-example>\n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass LowerCasePipe {\n    transform(value) {\n        if (value == null)\n            return null;\n        if (typeof value !== 'string') {\n            throw invalidPipeArgumentError(LowerCasePipe, value);\n        }\n        return value.toLowerCase();\n    }\n}\nLowerCasePipe.ɵfac = function LowerCasePipe_Factory(t) { return new (t || LowerCasePipe)(); };\nLowerCasePipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"lowercase\", type: LowerCasePipe, pure: true });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(LowerCasePipe, [{\n        type: Pipe,\n        args: [{ name: 'lowercase' }]\n    }], null, null); })();\n//\n// Regex below matches any Unicode word and compatible with ES5. In ES2018 the same result\n// can be achieved by using /\\p{L}\\S*/gu and also known as Unicode Property Escapes\n// (https://2ality.com/2017/07/regexp-unicode-property-escapes.html). Since there is no\n// transpilation of this functionality down to ES5 without external tool, the only solution is\n// to use already transpiled form. Example can be found here -\n// https://mothereff.in/regexpu#input=var+regex+%3D+/%5Cp%7BL%7D/u%3B&unicodePropertyEscape=1\n//\nconst unicodeWordMatch = /(?:[A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312E\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEA\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70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DE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF19]|\\uD806[\\uDCA0-\\uDCDF\\uDCFF\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE83\\uDE86-\\uDE89\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00-\\uDD1E\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D])\\S*/g;\n/**\n * Transforms text to title case.\n * Capitalizes the first letter of each word and transforms the\n * rest of the word to lower case.\n * Words are delimited by any whitespace character, such as a space, tab, or line-feed character.\n *\n * @see `LowerCasePipe`\n * @see `UpperCasePipe`\n *\n * @usageNotes\n * The following example shows the result of transforming various strings into title case.\n *\n * <code-example path=\"common/pipes/ts/titlecase_pipe.ts\" region='TitleCasePipe'></code-example>\n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass TitleCasePipe {\n    transform(value) {\n        if (value == null)\n            return null;\n        if (typeof value !== 'string') {\n            throw invalidPipeArgumentError(TitleCasePipe, value);\n        }\n        return value.replace(unicodeWordMatch, (txt => txt[0].toUpperCase() + txt.substr(1).toLowerCase()));\n    }\n}\nTitleCasePipe.ɵfac = function TitleCasePipe_Factory(t) { return new (t || TitleCasePipe)(); };\nTitleCasePipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"titlecase\", type: TitleCasePipe, pure: true });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TitleCasePipe, [{\n        type: Pipe,\n        args: [{ name: 'titlecase' }]\n    }], null, null); })();\n/**\n * Transforms text to all upper case.\n * @see `LowerCasePipe`\n * @see `TitleCasePipe`\n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass UpperCasePipe {\n    transform(value) {\n        if (value == null)\n            return null;\n        if (typeof value !== 'string') {\n            throw invalidPipeArgumentError(UpperCasePipe, value);\n        }\n        return value.toUpperCase();\n    }\n}\nUpperCasePipe.ɵfac = function UpperCasePipe_Factory(t) { return new (t || UpperCasePipe)(); };\nUpperCasePipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"uppercase\", type: UpperCasePipe, pure: true });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(UpperCasePipe, [{\n        type: Pipe,\n        args: [{ name: 'uppercase' }]\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// clang-format off\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date value according to locale rules.\n *\n * `DatePipe` is executed only when it detects a pure change to the input value.\n * A pure change is either a change to a primitive input value\n * (such as `String`, `Number`, `Boolean`, or `Symbol`),\n * or a changed object reference (such as `Date`, `Array`, `Function`, or `Object`).\n *\n * Note that mutating a `Date` object does not cause the pipe to be rendered again.\n * To ensure that the pipe is executed, you must create a new `Date` object.\n *\n * Only the `en-US` locale data comes with Angular. To localize dates\n * in another language, you must import the corresponding locale data.\n * See the [I18n guide](guide/i18n#i18n-pipes) for more information.\n *\n * @see `formatDate()`\n *\n *\n * @usageNotes\n *\n * The result of this pipe is not reevaluated when the input is mutated. To avoid the need to\n * reformat the date on every change-detection cycle, treat the date as an immutable object\n * and change the reference when the pipe needs to run again.\n *\n * ### Pre-defined format options\n *\n * | Option        | Equivalent to                       | Examples (given in `en-US` locale)              |\n * |---------------|-------------------------------------|-------------------------------------------------|\n * | `'short'`     | `'M/d/yy, h:mm a'`                  | `6/15/15, 9:03 AM`                              |\n * | `'medium'`    | `'MMM d, y, h:mm:ss a'`             | `Jun 15, 2015, 9:03:01 AM`                      |\n * | `'long'`      | `'MMMM d, y, h:mm:ss a z'`          | `June 15, 2015 at 9:03:01 AM GMT+1`             |\n * | `'full'`      | `'EEEE, MMMM d, y, h:mm:ss a zzzz'` | `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00` |\n * | `'shortDate'` | `'M/d/yy'`                          | `6/15/15`                                       |\n * | `'mediumDate'`| `'MMM d, y'`                        | `Jun 15, 2015`                                  |\n * | `'longDate'`  | `'MMMM d, y'`                       | `June 15, 2015`                                 |\n * | `'fullDate'`  | `'EEEE, MMMM d, y'`                 | `Monday, June 15, 2015`                         |\n * | `'shortTime'` | `'h:mm a'`                          | `9:03 AM`                                       |\n * | `'mediumTime'`| `'h:mm:ss a'`                       | `9:03:01 AM`                                    |\n * | `'longTime'`  | `'h:mm:ss a z'`                     | `9:03:01 AM GMT+1`                              |\n * | `'fullTime'`  | `'h:mm:ss a zzzz'`                  | `9:03:01 AM GMT+01:00`                          |\n *\n * ### Custom format options\n *\n * You can construct a format string using symbols to specify the components\n * of a date-time value, as described in the following table.\n * Format details depend on the locale.\n * Fields marked with (*) are only available in the extra data set for the given locale.\n *\n *  | Field type          | Format      | Description                                                   | Example Value                                              |\n *  |-------------------- |-------------|---------------------------------------------------------------|------------------------------------------------------------|\n *  | Era                 | G, GG & GGG | Abbreviated                                                   | AD                                                         |\n *  |                     | GGGG        | Wide                                                          | Anno Domini                                                |\n *  |                     | GGGGG       | Narrow                                                        | A                                                          |\n *  | Year                | y           | Numeric: minimum digits                                       | 2, 20, 201, 2017, 20173                                    |\n *  |                     | yy          | Numeric: 2 digits + zero padded                               | 02, 20, 01, 17, 73                                         |\n *  |                     | yyy         | Numeric: 3 digits + zero padded                               | 002, 020, 201, 2017, 20173                                 |\n *  |                     | yyyy        | Numeric: 4 digits or more + zero padded                       | 0002, 0020, 0201, 2017, 20173                              |\n *  | Week-numbering year | Y           | Numeric: minimum digits                                       | 2, 20, 201, 2017, 20173                                    |\n *  |                     | YY          | Numeric: 2 digits + zero padded                               | 02, 20, 01, 17, 73                                         |\n *  |                     | YYY         | Numeric: 3 digits + zero padded                               | 002, 020, 201, 2017, 20173                                 |\n *  |                     | YYYY        | Numeric: 4 digits or more + zero padded                       | 0002, 0020, 0201, 2017, 20173                              |\n *  | Month               | M           | Numeric: 1 digit                                              | 9, 12                                                      |\n *  |                     | MM          | Numeric: 2 digits + zero padded                               | 09, 12                                                     |\n *  |                     | MMM         | Abbreviated                                                   | Sep                                                        |\n *  |                     | MMMM        | Wide                                                          | September                                                  |\n *  |                     | MMMMM       | Narrow                                                        | S                                                          |\n *  | Month standalone    | L           | Numeric: 1 digit                                              | 9, 12                                                      |\n *  |                     | LL          | Numeric: 2 digits + zero padded                               | 09, 12                                                     |\n *  |                     | LLL         | Abbreviated                                                   | Sep                                                        |\n *  |                     | LLLL        | Wide                                                          | September                                                  |\n *  |                     | LLLLL       | Narrow                                                        | S                                                          |\n *  | Week of year        | w           | Numeric: minimum digits                                       | 1... 53                                                    |\n *  |                     | ww          | Numeric: 2 digits + zero padded                               | 01... 53                                                   |\n *  | Week of month       | W           | Numeric: 1 digit                                              | 1... 5                                                     |\n *  | Day of month        | d           | Numeric: minimum digits                                       | 1                                                          |\n *  |                     | dd          | Numeric: 2 digits + zero padded                               | 01                                                         |\n *  | Week day            | E, EE & EEE | Abbreviated                                                   | Tue                                                        |\n *  |                     | EEEE        | Wide                                                          | Tuesday                                                    |\n *  |                     | EEEEE       | Narrow                                                        | T                                                          |\n *  |                     | EEEEEE      | Short                                                         | Tu                                                         |\n *  | Week day standalone | c, cc       | Numeric: 1 digit                                              | 2                                                          |\n *  |                     | ccc         | Abbreviated                                                   | Tue                                                        |\n *  |                     | cccc        | Wide                                                          | Tuesday                                                    |\n *  |                     | ccccc       | Narrow                                                        | T                                                          |\n *  |                     | cccccc      | Short                                                         | Tu                                                         |\n *  | Period              | a, aa & aaa | Abbreviated                                                   | am/pm or AM/PM                                             |\n *  |                     | aaaa        | Wide (fallback to `a` when missing)                           | ante meridiem/post meridiem                                |\n *  |                     | aaaaa       | Narrow                                                        | a/p                                                        |\n *  | Period*             | B, BB & BBB | Abbreviated                                                   | mid.                                                       |\n *  |                     | BBBB        | Wide                                                          | am, pm, midnight, noon, morning, afternoon, evening, night |\n *  |                     | BBBBB       | Narrow                                                        | md                                                         |\n *  | Period standalone*  | b, bb & bbb | Abbreviated                                                   | mid.                                                       |\n *  |                     | bbbb        | Wide                                                          | am, pm, midnight, noon, morning, afternoon, evening, night |\n *  |                     | bbbbb       | Narrow                                                        | md                                                         |\n *  | Hour 1-12           | h           | Numeric: minimum digits                                       | 1, 12                                                      |\n *  |                     | hh          | Numeric: 2 digits + zero padded                               | 01, 12                                                     |\n *  | Hour 0-23           | H           | Numeric: minimum digits                                       | 0, 23                                                      |\n *  |                     | HH          | Numeric: 2 digits + zero padded                               | 00, 23                                                     |\n *  | Minute              | m           | Numeric: minimum digits                                       | 8, 59                                                      |\n *  |                     | mm          | Numeric: 2 digits + zero padded                               | 08, 59                                                     |\n *  | Second              | s           | Numeric: minimum digits                                       | 0... 59                                                    |\n *  |                     | ss          | Numeric: 2 digits + zero padded                               | 00... 59                                                   |\n *  | Fractional seconds  | S           | Numeric: 1 digit                                              | 0... 9                                                     |\n *  |                     | SS          | Numeric: 2 digits + zero padded                               | 00... 99                                                   |\n *  |                     | SSS         | Numeric: 3 digits + zero padded (= milliseconds)              | 000... 999                                                 |\n *  | Zone                | z, zz & zzz | Short specific non location format (fallback to O)            | GMT-8                                                      |\n *  |                     | zzzz        | Long specific non location format (fallback to OOOO)          | GMT-08:00                                                  |\n *  |                     | Z, ZZ & ZZZ | ISO8601 basic format                                          | -0800                                                      |\n *  |                     | ZZZZ        | Long localized GMT format                                     | GMT-8:00                                                   |\n *  |                     | ZZZZZ       | ISO8601 extended format + Z indicator for offset 0 (= XXXXX)  | -08:00                                                     |\n *  |                     | O, OO & OOO | Short localized GMT format                                    | GMT-8                                                      |\n *  |                     | OOOO        | Long localized GMT format                                     | GMT-08:00                                                  |\n *\n *\n * ### Format examples\n *\n * These examples transform a date into various formats,\n * assuming that `dateObj` is a JavaScript `Date` object for\n * year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11,\n * given in the local time for the `en-US` locale.\n *\n * ```\n * {{ dateObj | date }}               // output is 'Jun 15, 2015'\n * {{ dateObj | date:'medium' }}      // output is 'Jun 15, 2015, 9:43:11 PM'\n * {{ dateObj | date:'shortTime' }}   // output is '9:43 PM'\n * {{ dateObj | date:'mm:ss' }}       // output is '43:11'\n * ```\n *\n * ### Usage example\n *\n * The following component uses a date pipe to display the current date in different formats.\n *\n * ```\n * @Component({\n *  selector: 'date-pipe',\n *  template: `<div>\n *    <p>Today is {{today | date}}</p>\n *    <p>Or if you prefer, {{today | date:'fullDate'}}</p>\n *    <p>The time is {{today | date:'h:mm a z'}}</p>\n *  </div>`\n * })\n * // Get the current date and time as a date-time value.\n * export class DatePipeComponent {\n *   today: number = Date.now();\n * }\n * ```\n *\n * @publicApi\n */\n// clang-format on\nclass DatePipe {\n    constructor(locale) {\n        this.locale = locale;\n    }\n    transform(value, format = 'mediumDate', timezone, locale) {\n        if (value == null || value === '' || value !== value)\n            return null;\n        try {\n            return formatDate(value, format, locale || this.locale, timezone);\n        }\n        catch (error) {\n            throw invalidPipeArgumentError(DatePipe, error.message);\n        }\n    }\n}\nDatePipe.ɵfac = function DatePipe_Factory(t) { return new (t || DatePipe)(ɵngcc0.ɵɵdirectiveInject(LOCALE_ID, 16)); };\nDatePipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"date\", type: DatePipe, pure: true });\nDatePipe.ctorParameters = () => [\n    { type: String, decorators: [{ type: Inject, args: [LOCALE_ID,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DatePipe, [{\n        type: Pipe,\n        args: [{ name: 'date', pure: true }]\n    }], function () { return [{ type: String, decorators: [{\n                type: Inject,\n                args: [LOCALE_ID]\n            }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _INTERPOLATION_REGEXP = /#/g;\n/**\n * @ngModule CommonModule\n * @description\n *\n * Maps a value to a string that pluralizes the value according to locale rules.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'}\n *\n * @publicApi\n */\nclass I18nPluralPipe {\n    constructor(_localization) {\n        this._localization = _localization;\n    }\n    /**\n     * @param value the number to be formatted\n     * @param pluralMap an object that mimics the ICU format, see\n     * http://userguide.icu-project.org/formatparse/messages.\n     * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n     * default).\n     */\n    transform(value, pluralMap, locale) {\n        if (value == null)\n            return '';\n        if (typeof pluralMap !== 'object' || pluralMap === null) {\n            throw invalidPipeArgumentError(I18nPluralPipe, pluralMap);\n        }\n        const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);\n        return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());\n    }\n}\nI18nPluralPipe.ɵfac = function I18nPluralPipe_Factory(t) { return new (t || I18nPluralPipe)(ɵngcc0.ɵɵdirectiveInject(NgLocalization, 16)); };\nI18nPluralPipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"i18nPlural\", type: I18nPluralPipe, pure: true });\nI18nPluralPipe.ctorParameters = () => [\n    { type: NgLocalization }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(I18nPluralPipe, [{\n        type: Pipe,\n        args: [{ name: 'i18nPlural', pure: true }]\n    }], function () { return [{ type: NgLocalization }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n * @description\n *\n * Generic selector that displays the string that matches the current value.\n *\n * If none of the keys of the `mapping` match the `value`, then the content\n * of the `other` key is returned when present, otherwise an empty string is returned.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'}\n *\n * @publicApi\n */\nclass I18nSelectPipe {\n    /**\n     * @param value a string to be internationalized.\n     * @param mapping an object that indicates the text that should be displayed\n     * for different values of the provided `value`.\n     */\n    transform(value, mapping) {\n        if (value == null)\n            return '';\n        if (typeof mapping !== 'object' || typeof value !== 'string') {\n            throw invalidPipeArgumentError(I18nSelectPipe, mapping);\n        }\n        if (mapping.hasOwnProperty(value)) {\n            return mapping[value];\n        }\n        if (mapping.hasOwnProperty('other')) {\n            return mapping['other'];\n        }\n        return '';\n    }\n}\nI18nSelectPipe.ɵfac = function I18nSelectPipe_Factory(t) { return new (t || I18nSelectPipe)(); };\nI18nSelectPipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"i18nSelect\", type: I18nSelectPipe, pure: true });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(I18nSelectPipe, [{\n        type: Pipe,\n        args: [{ name: 'i18nSelect', pure: true }]\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n * @description\n *\n * Converts a value into its JSON-format representation.  Useful for debugging.\n *\n * @usageNotes\n *\n * The following component uses a JSON pipe to convert an object\n * to JSON format, and displays the string in both formats for comparison.\n *\n * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}\n *\n * @publicApi\n */\nclass JsonPipe {\n    /**\n     * @param value A value of any type to convert into a JSON-format string.\n     */\n    transform(value) {\n        return JSON.stringify(value, null, 2);\n    }\n}\nJsonPipe.ɵfac = function JsonPipe_Factory(t) { return new (t || JsonPipe)(); };\nJsonPipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"json\", type: JsonPipe, pure: false });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(JsonPipe, [{\n        type: Pipe,\n        args: [{ name: 'json', pure: false }]\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction makeKeyValuePair(key, value) {\n    return { key: key, value: value };\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms Object or Map into an array of key value pairs.\n *\n * The output array will be ordered by keys.\n * By default the comparator will be by Unicode point value.\n * You can optionally pass a compareFn if your keys are complex types.\n *\n * @usageNotes\n * ### Examples\n *\n * This examples show how an Object or a Map can be iterated by ngFor with the use of this\n * keyvalue pipe.\n *\n * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}\n *\n * @publicApi\n */\nclass KeyValuePipe {\n    constructor(differs) {\n        this.differs = differs;\n        this.keyValues = [];\n        this.compareFn = defaultComparator;\n    }\n    transform(input, compareFn = defaultComparator) {\n        if (!input || (!(input instanceof Map) && typeof input !== 'object')) {\n            return null;\n        }\n        if (!this.differ) {\n            // make a differ for whatever type we've been passed in\n            this.differ = this.differs.find(input).create();\n        }\n        const differChanges = this.differ.diff(input);\n        const compareFnChanged = compareFn !== this.compareFn;\n        if (differChanges) {\n            this.keyValues = [];\n            differChanges.forEachItem((r) => {\n                this.keyValues.push(makeKeyValuePair(r.key, r.currentValue));\n            });\n        }\n        if (differChanges || compareFnChanged) {\n            this.keyValues.sort(compareFn);\n            this.compareFn = compareFn;\n        }\n        return this.keyValues;\n    }\n}\nKeyValuePipe.ɵfac = function KeyValuePipe_Factory(t) { return new (t || KeyValuePipe)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.KeyValueDiffers, 16)); };\nKeyValuePipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"keyvalue\", type: KeyValuePipe, pure: false });\nKeyValuePipe.ctorParameters = () => [\n    { type: KeyValueDiffers }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(KeyValuePipe, [{\n        type: Pipe,\n        args: [{ name: 'keyvalue', pure: false }]\n    }], function () { return [{ type: ɵngcc0.KeyValueDiffers }]; }, null); })();\nfunction defaultComparator(keyValueA, keyValueB) {\n    const a = keyValueA.key;\n    const b = keyValueB.key;\n    // if same exit with 0;\n    if (a === b)\n        return 0;\n    // make sure that undefined are at the end of the sort.\n    if (a === undefined)\n        return 1;\n    if (b === undefined)\n        return -1;\n    // make sure that nulls are at the end of the sort.\n    if (a === null)\n        return 1;\n    if (b === null)\n        return -1;\n    if (typeof a == 'string' && typeof b == 'string') {\n        return a < b ? -1 : 1;\n    }\n    if (typeof a == 'number' && typeof b == 'number') {\n        return a - b;\n    }\n    if (typeof a == 'boolean' && typeof b == 'boolean') {\n        return a < b ? -1 : 1;\n    }\n    // `a` and `b` are of different types. Compare their string values.\n    const aString = String(a);\n    const bString = String(b);\n    return aString == bString ? 0 : aString < bString ? -1 : 1;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a value according to digit options and locale rules.\n * Locale determines group sizing and separator,\n * decimal point character, and other locale-specific configurations.\n *\n * @see `formatNumber()`\n *\n * @usageNotes\n *\n * ### digitsInfo\n *\n * The value's decimal representation is specified by the `digitsInfo`\n * parameter, written in the following format:<br>\n *\n * ```\n * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}\n * ```\n *\n *  - `minIntegerDigits`:\n * The minimum number of integer digits before the decimal point.\n * Default is 1.\n *\n * - `minFractionDigits`:\n * The minimum number of digits after the decimal point.\n * Default is 0.\n *\n *  - `maxFractionDigits`:\n * The maximum number of digits after the decimal point.\n * Default is 3.\n *\n * If the formatted value is truncated it will be rounded using the \"to-nearest\" method:\n *\n * ```\n * {{3.6 | number: '1.0-0'}}\n * <!--will output '4'-->\n *\n * {{-3.6 | number:'1.0-0'}}\n * <!--will output '-4'-->\n * ```\n *\n * ### locale\n *\n * `locale` will format a value according to locale rules.\n * Locale determines group sizing and separator,\n * decimal point character, and other locale-specific configurations.\n *\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n *\n * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n *\n * ### Example\n *\n * The following code shows how the pipe transforms values\n * according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/number_pipe.ts\" region='NumberPipe'></code-example>\n *\n * @publicApi\n */\nclass DecimalPipe {\n    constructor(_locale) {\n        this._locale = _locale;\n    }\n    /**\n     * @param value The value to be formatted.\n     * @param digitsInfo Sets digit and decimal representation.\n     * [See more](#digitsinfo).\n     * @param locale Specifies what locale format rules to use.\n     * [See more](#locale).\n     */\n    transform(value, digitsInfo, locale) {\n        if (!isValue(value))\n            return null;\n        locale = locale || this._locale;\n        try {\n            const num = strToNumber(value);\n            return formatNumber(num, locale, digitsInfo);\n        }\n        catch (error) {\n            throw invalidPipeArgumentError(DecimalPipe, error.message);\n        }\n    }\n}\nDecimalPipe.ɵfac = function DecimalPipe_Factory(t) { return new (t || DecimalPipe)(ɵngcc0.ɵɵdirectiveInject(LOCALE_ID, 16)); };\nDecimalPipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"number\", type: DecimalPipe, pure: true });\nDecimalPipe.ctorParameters = () => [\n    { type: String, decorators: [{ type: Inject, args: [LOCALE_ID,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DecimalPipe, [{\n        type: Pipe,\n        args: [{ name: 'number' }]\n    }], function () { return [{ type: String, decorators: [{\n                type: Inject,\n                args: [LOCALE_ID]\n            }] }]; }, null); })();\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a percentage\n * string, formatted according to locale rules that determine group sizing and\n * separator, decimal-point character, and other locale-specific\n * configurations.\n *\n * @see `formatPercent()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/percent_pipe.ts\" region='PercentPipe'></code-example>\n *\n * @publicApi\n */\nclass PercentPipe {\n    constructor(_locale) {\n        this._locale = _locale;\n    }\n    /**\n     *\n     * @param value The number to be formatted as a percentage.\n     * @param digitsInfo Decimal representation options, specified by a string\n     * in the following format:<br>\n     * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n     *   - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n     * Default is `1`.\n     *   - `minFractionDigits`: The minimum number of digits after the decimal point.\n     * Default is `0`.\n     *   - `maxFractionDigits`: The maximum number of digits after the decimal point.\n     * Default is `0`.\n     * @param locale A locale code for the locale format rules to use.\n     * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n     * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n     */\n    transform(value, digitsInfo, locale) {\n        if (!isValue(value))\n            return null;\n        locale = locale || this._locale;\n        try {\n            const num = strToNumber(value);\n            return formatPercent(num, locale, digitsInfo);\n        }\n        catch (error) {\n            throw invalidPipeArgumentError(PercentPipe, error.message);\n        }\n    }\n}\nPercentPipe.ɵfac = function PercentPipe_Factory(t) { return new (t || PercentPipe)(ɵngcc0.ɵɵdirectiveInject(LOCALE_ID, 16)); };\nPercentPipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"percent\", type: PercentPipe, pure: true });\nPercentPipe.ctorParameters = () => [\n    { type: String, decorators: [{ type: Inject, args: [LOCALE_ID,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(PercentPipe, [{\n        type: Pipe,\n        args: [{ name: 'percent' }]\n    }], function () { return [{ type: String, decorators: [{\n                type: Inject,\n                args: [LOCALE_ID]\n            }] }]; }, null); })();\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a currency string, formatted according to locale rules\n * that determine group sizing and separator, decimal-point character,\n * and other locale-specific configurations.\n *\n * {@a currency-code-deprecation}\n * <div class=\"alert is-helpful\">\n *\n * **Deprecation notice:**\n *\n * The default currency code is currently always `USD` but this is deprecated from v9.\n *\n * **In v11 the default currency code will be taken from the current locale identified by\n * the `LOCALE_ID` token. See the [i18n guide](guide/i18n#setting-up-the-locale-of-your-app) for\n * more information.**\n *\n * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in\n * your application `NgModule`:\n *\n * ```ts\n * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}\n * ```\n *\n * </div>\n *\n * @see `getCurrencySymbol()`\n * @see `formatCurrency()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/currency_pipe.ts\" region='CurrencyPipe'></code-example>\n *\n * @publicApi\n */\nclass CurrencyPipe {\n    constructor(_locale, _defaultCurrencyCode = 'USD') {\n        this._locale = _locale;\n        this._defaultCurrencyCode = _defaultCurrencyCode;\n    }\n    /**\n     *\n     * @param value The number to be formatted as currency.\n     * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,\n     * such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be\n     * configured using the `DEFAULT_CURRENCY_CODE` injection token.\n     * @param display The format for the currency indicator. One of the following:\n     *   - `code`: Show the code (such as `USD`).\n     *   - `symbol`(default): Show the symbol (such as `$`).\n     *   - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their\n     * currency.\n     * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the\n     * locale has no narrow symbol, uses the standard symbol for the locale.\n     *   - String: Use the given string value instead of a code or a symbol.\n     * For example, an empty string will suppress the currency & symbol.\n     *   - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.\n     *\n     * @param digitsInfo Decimal representation options, specified by a string\n     * in the following format:<br>\n     * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n     *   - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n     * Default is `1`.\n     *   - `minFractionDigits`: The minimum number of digits after the decimal point.\n     * Default is `2`.\n     *   - `maxFractionDigits`: The maximum number of digits after the decimal point.\n     * Default is `2`.\n     * If not provided, the number will be formatted with the proper amount of digits,\n     * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.\n     * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.\n     * @param locale A locale code for the locale format rules to use.\n     * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n     * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n     */\n    transform(value, currencyCode = this._defaultCurrencyCode, display = 'symbol', digitsInfo, locale) {\n        if (!isValue(value))\n            return null;\n        locale = locale || this._locale;\n        if (typeof display === 'boolean') {\n            if ((typeof ngDevMode === 'undefined' || ngDevMode) && console && console.warn) {\n                console.warn(`Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are \"code\", \"symbol\" or \"symbol-narrow\".`);\n            }\n            display = display ? 'symbol' : 'code';\n        }\n        let currency = currencyCode || this._defaultCurrencyCode;\n        if (display !== 'code') {\n            if (display === 'symbol' || display === 'symbol-narrow') {\n                currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);\n            }\n            else {\n                currency = display;\n            }\n        }\n        try {\n            const num = strToNumber(value);\n            return formatCurrency(num, locale, currency, currencyCode, digitsInfo);\n        }\n        catch (error) {\n            throw invalidPipeArgumentError(CurrencyPipe, error.message);\n        }\n    }\n}\nCurrencyPipe.ɵfac = function CurrencyPipe_Factory(t) { return new (t || CurrencyPipe)(ɵngcc0.ɵɵdirectiveInject(LOCALE_ID, 16), ɵngcc0.ɵɵdirectiveInject(DEFAULT_CURRENCY_CODE, 16)); };\nCurrencyPipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"currency\", type: CurrencyPipe, pure: true });\nCurrencyPipe.ctorParameters = () => [\n    { type: String, decorators: [{ type: Inject, args: [LOCALE_ID,] }] },\n    { type: String, decorators: [{ type: Inject, args: [DEFAULT_CURRENCY_CODE,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(CurrencyPipe, [{\n        type: Pipe,\n        args: [{ name: 'currency' }]\n    }], function () { return [{ type: String, decorators: [{\n                type: Inject,\n                args: [LOCALE_ID]\n            }] }, { type: String, decorators: [{\n                type: Inject,\n                args: [DEFAULT_CURRENCY_CODE]\n            }] }]; }, null); })();\nfunction isValue(value) {\n    return !(value == null || value === '' || value !== value);\n}\n/**\n * Transforms a string into a number (if needed).\n */\nfunction strToNumber(value) {\n    // Convert strings to numbers\n    if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {\n        return Number(value);\n    }\n    if (typeof value !== 'number') {\n        throw new Error(`${value} is not a number`);\n    }\n    return value;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @ngModule CommonModule\n * @description\n *\n * Creates a new `Array` or `String` containing a subset (slice) of the elements.\n *\n * @usageNotes\n *\n * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`\n * and `String.prototype.slice()`.\n *\n * When operating on an `Array`, the returned `Array` is always a copy even when all\n * the elements are being returned.\n *\n * When operating on a blank value, the pipe returns the blank value.\n *\n * ### List Example\n *\n * This `ngFor` example:\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}\n *\n * produces the following:\n *\n * ```html\n * <li>b</li>\n * <li>c</li>\n * ```\n *\n * ### String Examples\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}\n *\n * @publicApi\n */\nclass SlicePipe {\n    transform(value, start, end) {\n        if (value == null)\n            return null;\n        if (!this.supports(value)) {\n            throw invalidPipeArgumentError(SlicePipe, value);\n        }\n        return value.slice(start, end);\n    }\n    supports(obj) {\n        return typeof obj === 'string' || Array.isArray(obj);\n    }\n}\nSlicePipe.ɵfac = function SlicePipe_Factory(t) { return new (t || SlicePipe)(); };\nSlicePipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"slice\", type: SlicePipe, pure: false });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(SlicePipe, [{\n        type: Pipe,\n        args: [{ name: 'slice', pure: false }]\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A collection of Angular pipes that are likely to be used in each and every application.\n */\nconst COMMON_PIPES = [\n    AsyncPipe,\n    UpperCasePipe,\n    LowerCasePipe,\n    JsonPipe,\n    SlicePipe,\n    DecimalPipe,\n    PercentPipe,\n    TitleCasePipe,\n    CurrencyPipe,\n    DatePipe,\n    I18nPluralPipe,\n    I18nSelectPipe,\n    KeyValuePipe,\n];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This does not contain the location providers,\n// as they need some platform specific implementations to work.\n/**\n * Exports all the basic Angular directives and pipes,\n * such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on.\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * * The `providers` options configure the NgModule's injector to provide\n * localization dependencies to members.\n * * The `exports` options make the declared directives and pipes available for import\n * by other NgModules.\n *\n * @publicApi\n */\nclass CommonModule {\n}\nCommonModule.ɵfac = function CommonModule_Factory(t) { return new (t || CommonModule)(); };\nCommonModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: CommonModule });\nCommonModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [\n        { provide: NgLocalization, useClass: NgLocaleLocalization },\n    ] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(CommonModule, [{\n        type: NgModule,\n        args: [{\n                declarations: [COMMON_DIRECTIVES, COMMON_PIPES],\n                exports: [COMMON_DIRECTIVES, COMMON_PIPES],\n                providers: [\n                    { provide: NgLocalization, useClass: NgLocaleLocalization },\n                ]\n            }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(CommonModule, { declarations: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe], exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst PLATFORM_BROWSER_ID = 'browser';\nconst PLATFORM_SERVER_ID = 'server';\nconst PLATFORM_WORKER_APP_ID = 'browserWorkerApp';\nconst PLATFORM_WORKER_UI_ID = 'browserWorkerUi';\n/**\n * Returns whether a platform id represents a browser platform.\n * @publicApi\n */\nfunction isPlatformBrowser(platformId) {\n    return platformId === PLATFORM_BROWSER_ID;\n}\n/**\n * Returns whether a platform id represents a server platform.\n * @publicApi\n */\nfunction isPlatformServer(platformId) {\n    return platformId === PLATFORM_SERVER_ID;\n}\n/**\n * Returns whether a platform id represents a web worker app platform.\n * @publicApi\n */\nfunction isPlatformWorkerApp(platformId) {\n    return platformId === PLATFORM_WORKER_APP_ID;\n}\n/**\n * Returns whether a platform id represents a web worker UI platform.\n * @publicApi\n */\nfunction isPlatformWorkerUi(platformId) {\n    return platformId === PLATFORM_WORKER_UI_ID;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('12.2.5');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.\n *\n * @publicApi\n */\nclass ViewportScroller {\n}\n// De-sugared tree-shakable injection\n// See #23917\n/** @nocollapse */\nViewportScroller.ɵprov = ɵɵdefineInjectable({\n    token: ViewportScroller,\n    providedIn: 'root',\n    factory: () => new BrowserViewportScroller(ɵɵinject(DOCUMENT), window)\n});\n/**\n * Manages the scroll position for a browser window.\n */\nclass BrowserViewportScroller {\n    constructor(document, window) {\n        this.document = document;\n        this.window = window;\n        this.offset = () => [0, 0];\n    }\n    /**\n     * Configures the top offset used when scrolling to an anchor.\n     * @param offset A position in screen coordinates (a tuple with x and y values)\n     * or a function that returns the top offset position.\n     *\n     */\n    setOffset(offset) {\n        if (Array.isArray(offset)) {\n            this.offset = () => offset;\n        }\n        else {\n            this.offset = offset;\n        }\n    }\n    /**\n     * Retrieves the current scroll position.\n     * @returns The position in screen coordinates.\n     */\n    getScrollPosition() {\n        if (this.supportsScrolling()) {\n            return [this.window.pageXOffset, this.window.pageYOffset];\n        }\n        else {\n            return [0, 0];\n        }\n    }\n    /**\n     * Sets the scroll position.\n     * @param position The new position in screen coordinates.\n     */\n    scrollToPosition(position) {\n        if (this.supportsScrolling()) {\n            this.window.scrollTo(position[0], position[1]);\n        }\n    }\n    /**\n     * Scrolls to an element and attempts to focus the element.\n     *\n     * Note that the function name here is misleading in that the target string may be an ID for a\n     * non-anchor element.\n     *\n     * @param target The ID of an element or name of the anchor.\n     *\n     * @see https://html.spec.whatwg.org/#the-indicated-part-of-the-document\n     * @see https://html.spec.whatwg.org/#scroll-to-fragid\n     */\n    scrollToAnchor(target) {\n        if (!this.supportsScrolling()) {\n            return;\n        }\n        const elSelected = findAnchorFromDocument(this.document, target);\n        if (elSelected) {\n            this.scrollToElement(elSelected);\n            // After scrolling to the element, the spec dictates that we follow the focus steps for the\n            // target. Rather than following the robust steps, simply attempt focus.\n            this.attemptFocus(elSelected);\n        }\n    }\n    /**\n     * Disables automatic scroll restoration provided by the browser.\n     */\n    setHistoryScrollRestoration(scrollRestoration) {\n        if (this.supportScrollRestoration()) {\n            const history = this.window.history;\n            if (history && history.scrollRestoration) {\n                history.scrollRestoration = scrollRestoration;\n            }\n        }\n    }\n    /**\n     * Scrolls to an element using the native offset and the specified offset set on this scroller.\n     *\n     * The offset can be used when we know that there is a floating header and scrolling naively to an\n     * element (ex: `scrollIntoView`) leaves the element hidden behind the floating header.\n     */\n    scrollToElement(el) {\n        const rect = el.getBoundingClientRect();\n        const left = rect.left + this.window.pageXOffset;\n        const top = rect.top + this.window.pageYOffset;\n        const offset = this.offset();\n        this.window.scrollTo(left - offset[0], top - offset[1]);\n    }\n    /**\n     * Calls `focus` on the `focusTarget` and returns `true` if the element was focused successfully.\n     *\n     * If `false`, further steps may be necessary to determine a valid substitute to be focused\n     * instead.\n     *\n     * @see https://html.spec.whatwg.org/#get-the-focusable-area\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus\n     * @see https://html.spec.whatwg.org/#focusable-area\n     */\n    attemptFocus(focusTarget) {\n        focusTarget.focus();\n        return this.document.activeElement === focusTarget;\n    }\n    /**\n     * We only support scroll restoration when we can get a hold of window.\n     * This means that we do not support this behavior when running in a web worker.\n     *\n     * Lifting this restriction right now would require more changes in the dom adapter.\n     * Since webworkers aren't widely used, we will lift it once RouterScroller is\n     * battle-tested.\n     */\n    supportScrollRestoration() {\n        try {\n            if (!this.supportsScrolling()) {\n                return false;\n            }\n            // The `scrollRestoration` property could be on the `history` instance or its prototype.\n            const scrollRestorationDescriptor = getScrollRestorationProperty(this.window.history) ||\n                getScrollRestorationProperty(Object.getPrototypeOf(this.window.history));\n            // We can write to the `scrollRestoration` property if it is a writable data field or it has a\n            // setter function.\n            return !!scrollRestorationDescriptor &&\n                !!(scrollRestorationDescriptor.writable || scrollRestorationDescriptor.set);\n        }\n        catch (_a) {\n            return false;\n        }\n    }\n    supportsScrolling() {\n        try {\n            return !!this.window && !!this.window.scrollTo && 'pageXOffset' in this.window;\n        }\n        catch (_a) {\n            return false;\n        }\n    }\n}\nfunction getScrollRestorationProperty(obj) {\n    return Object.getOwnPropertyDescriptor(obj, 'scrollRestoration');\n}\nfunction findAnchorFromDocument(document, target) {\n    const documentResult = document.getElementById(target) || document.getElementsByName(target)[0];\n    if (documentResult) {\n        return documentResult;\n    }\n    // `getElementById` and `getElementsByName` won't pierce through the shadow DOM so we\n    // have to traverse the DOM manually and do the lookup through the shadow roots.\n    if (typeof document.createTreeWalker === 'function' && document.body &&\n        (document.body.createShadowRoot || document.body.attachShadow)) {\n        const treeWalker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);\n        let currentNode = treeWalker.currentNode;\n        while (currentNode) {\n            const shadowRoot = currentNode.shadowRoot;\n            if (shadowRoot) {\n                // Note that `ShadowRoot` doesn't support `getElementsByName`\n                // so we have to fall back to `querySelector`.\n                const result = shadowRoot.getElementById(target) || shadowRoot.querySelector(`[name=\"${target}\"]`);\n                if (result) {\n                    return result;\n                }\n            }\n            currentNode = treeWalker.nextNode();\n        }\n    }\n    return null;\n}\n/**\n * Provides an empty implementation of the viewport scroller.\n */\nclass NullViewportScroller {\n    /**\n     * Empty implementation\n     */\n    setOffset(offset) { }\n    /**\n     * Empty implementation\n     */\n    getScrollPosition() {\n        return [0, 0];\n    }\n    /**\n     * Empty implementation\n     */\n    scrollToPosition(position) { }\n    /**\n     * Empty implementation\n     */\n    scrollToAnchor(anchor) { }\n    /**\n     * Empty implementation\n     */\n    setHistoryScrollRestoration(scrollRestoration) { }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A wrapper around the `XMLHttpRequest` constructor.\n *\n * @publicApi\n */\nclass XhrFactory {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { APP_BASE_HREF, AsyncPipe, CommonModule, CurrencyPipe, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PathLocationStrategy, PercentPipe, PlatformLocation, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, VERSION, ViewportScroller, WeekDay, XhrFactory, formatCurrency, formatDate, formatNumber, formatPercent, getCurrencySymbol, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleDirection, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleFirstDayOfWeek, getLocaleId, getLocaleMonthNames, getLocaleNumberFormat, getLocaleNumberSymbol, getLocalePluralCase, getLocaleTimeFormat, getLocaleWeekEndRange, getNumberOfCurrencyDigits, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi, registerLocaleData, BrowserPlatformLocation as ɵBrowserPlatformLocation, DomAdapter as ɵDomAdapter, NullViewportScroller as ɵNullViewportScroller, PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, useBrowserPlatformLocation as ɵangular_packages_common_common_a, createBrowserPlatformLocation as ɵangular_packages_common_common_b, createLocation as ɵangular_packages_common_common_c, provideLocationStrategy as ɵangular_packages_common_common_d, COMMON_DIRECTIVES as ɵangular_packages_common_common_e, COMMON_PIPES as ɵangular_packages_common_common_f, getDOM as ɵgetDOM, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };\n\n","/**\n * @license Angular v12.2.5\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { Subject, Subscription, Observable, merge as merge$1 } from 'rxjs';\nimport { share } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getClosureSafeProperty(objWithPropertyToExtract) {\n    for (let key in objWithPropertyToExtract) {\n        if (objWithPropertyToExtract[key] === getClosureSafeProperty) {\n            return key;\n        }\n    }\n    throw Error('Could not find renamed property on target object.');\n}\n/**\n * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\nfunction fillProperties(target, source) {\n    for (const key in source) {\n        if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n            target[key] = source[key];\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction stringify(token) {\n    if (typeof token === 'string') {\n        return token;\n    }\n    if (Array.isArray(token)) {\n        return '[' + token.map(stringify).join(', ') + ']';\n    }\n    if (token == null) {\n        return '' + token;\n    }\n    if (token.overriddenName) {\n        return `${token.overriddenName}`;\n    }\n    if (token.name) {\n        return `${token.name}`;\n    }\n    const res = token.toString();\n    if (res == null) {\n        return '' + res;\n    }\n    const newLineIndex = res.indexOf('\\n');\n    return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n/**\n * Concatenates two strings with separator, allocating new strings only when necessary.\n *\n * @param before before string.\n * @param separator separator string.\n * @param after after string.\n * @returns concatenated string.\n */\nfunction concatStringsWithSpace(before, after) {\n    return (before == null || before === '') ?\n        (after === null ? '' : after) :\n        ((after == null || after === '') ? before : before + ' ' + after);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst __forward_ref__ = getClosureSafeProperty({ __forward_ref__: getClosureSafeProperty });\n/**\n * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * @usageNotes\n * ### Example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n * @publicApi\n */\nfunction forwardRef(forwardRefFn) {\n    forwardRefFn.__forward_ref__ = forwardRef;\n    forwardRefFn.toString = function () {\n        return stringify(this());\n    };\n    return forwardRefFn;\n}\n/**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see `forwardRef`\n * @publicApi\n */\nfunction resolveForwardRef(type) {\n    return isForwardRef(type) ? type() : type;\n}\n/** Checks whether a function is wrapped by a `forwardRef`. */\nfunction isForwardRef(fn) {\n    return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&\n        fn.__forward_ref__ === forwardRef;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Base URL for the error details page.\n// Keep this value in sync with a similar const in\n// `packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.ts`.\nconst ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';\nclass RuntimeError extends Error {\n    constructor(code, message) {\n        super(formatRuntimeError(code, message));\n        this.code = code;\n    }\n}\n// Contains a set of error messages that have details guides at angular.io.\n// Full list of available error guides can be found at https://angular.io/errors\n/* tslint:disable:no-toplevel-property-access */\nconst RUNTIME_ERRORS_WITH_GUIDES = new Set([\n    \"100\" /* EXPRESSION_CHANGED_AFTER_CHECKED */,\n    \"200\" /* CYCLIC_DI_DEPENDENCY */,\n    \"201\" /* PROVIDER_NOT_FOUND */,\n    \"300\" /* MULTIPLE_COMPONENTS_MATCH */,\n    \"301\" /* EXPORT_NOT_FOUND */,\n    \"302\" /* PIPE_NOT_FOUND */,\n]);\n/* tslint:enable:no-toplevel-property-access */\n/** Called to format a runtime error */\nfunction formatRuntimeError(code, message) {\n    const fullCode = code ? `NG0${code}: ` : '';\n    let errorMessage = `${fullCode}${message}`;\n    // Some runtime errors are still thrown without `ngDevMode` (for example\n    // `throwProviderNotFoundError`), so we add `ngDevMode` check here to avoid pulling\n    // `RUNTIME_ERRORS_WITH_GUIDES` symbol into prod bundles.\n    // TODO: revisit all instances where `RuntimeError` is thrown and see if `ngDevMode` can be added\n    // there instead to tree-shake more devmode-only code (and eventually remove `ngDevMode` check\n    // from this code).\n    if (ngDevMode && RUNTIME_ERRORS_WITH_GUIDES.has(code)) {\n        errorMessage = `${errorMessage}. Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/NG0${code}`;\n    }\n    return errorMessage;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.\n */\nfunction renderStringify(value) {\n    if (typeof value === 'string')\n        return value;\n    if (value == null)\n        return '';\n    // Use `String` so that it invokes the `toString` method of the value. Note that this\n    // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).\n    return String(value);\n}\n/**\n * Used to stringify a value so that it can be displayed in an error message.\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\nfunction stringifyForError(value) {\n    if (typeof value === 'function')\n        return value.name || value.toString();\n    if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n        return value.type.name || value.type.toString();\n    }\n    return renderStringify(value);\n}\n\n/** Called when directives inject each other (creating a circular dependency) */\nfunction throwCyclicDependencyError(token, path) {\n    const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';\n    throw new RuntimeError(\"200\" /* CYCLIC_DI_DEPENDENCY */, `Circular dependency in DI detected for ${token}${depPath}`);\n}\nfunction throwMixedMultiProviderError() {\n    throw new Error(`Cannot mix multi providers and regular providers`);\n}\nfunction throwInvalidProviderError(ngModuleType, providers, provider) {\n    let ngModuleDetail = '';\n    if (ngModuleType && providers) {\n        const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n        ngModuleDetail =\n            ` - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`;\n    }\n    throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}'` + ngModuleDetail);\n}\n/** Throws an error when a token is not found in DI. */\nfunction throwProviderNotFoundError(token, injectorName) {\n    const injectorDetails = injectorName ? ` in ${injectorName}` : '';\n    throw new RuntimeError(\"201\" /* PROVIDER_NOT_FOUND */, `No provider for ${stringifyForError(token)} found${injectorDetails}`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction assertNumber(actual, msg) {\n    if (!(typeof actual === 'number')) {\n        throwError(msg, typeof actual, 'number', '===');\n    }\n}\nfunction assertNumberInRange(actual, minInclusive, maxInclusive) {\n    assertNumber(actual, 'Expected a number');\n    assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');\n    assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');\n}\nfunction assertString(actual, msg) {\n    if (!(typeof actual === 'string')) {\n        throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n    }\n}\nfunction assertFunction(actual, msg) {\n    if (!(typeof actual === 'function')) {\n        throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\n    }\n}\nfunction assertEqual(actual, expected, msg) {\n    if (!(actual == expected)) {\n        throwError(msg, actual, expected, '==');\n    }\n}\nfunction assertNotEqual(actual, expected, msg) {\n    if (!(actual != expected)) {\n        throwError(msg, actual, expected, '!=');\n    }\n}\nfunction assertSame(actual, expected, msg) {\n    if (!(actual === expected)) {\n        throwError(msg, actual, expected, '===');\n    }\n}\nfunction assertNotSame(actual, expected, msg) {\n    if (!(actual !== expected)) {\n        throwError(msg, actual, expected, '!==');\n    }\n}\nfunction assertLessThan(actual, expected, msg) {\n    if (!(actual < expected)) {\n        throwError(msg, actual, expected, '<');\n    }\n}\nfunction assertLessThanOrEqual(actual, expected, msg) {\n    if (!(actual <= expected)) {\n        throwError(msg, actual, expected, '<=');\n    }\n}\nfunction assertGreaterThan(actual, expected, msg) {\n    if (!(actual > expected)) {\n        throwError(msg, actual, expected, '>');\n    }\n}\nfunction assertGreaterThanOrEqual(actual, expected, msg) {\n    if (!(actual >= expected)) {\n        throwError(msg, actual, expected, '>=');\n    }\n}\nfunction assertNotDefined(actual, msg) {\n    if (actual != null) {\n        throwError(msg, actual, null, '==');\n    }\n}\nfunction assertDefined(actual, msg) {\n    if (actual == null) {\n        throwError(msg, actual, null, '!=');\n    }\n}\nfunction throwError(msg, actual, expected, comparison) {\n    throw new Error(`ASSERTION ERROR: ${msg}` +\n        (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`));\n}\nfunction assertDomNode(node) {\n    // If we're in a worker, `Node` will not be defined.\n    if (!(typeof Node !== 'undefined' && node instanceof Node) &&\n        !(typeof node === 'object' && node != null &&\n            node.constructor.name === 'WebWorkerRenderNode')) {\n        throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n    }\n}\nfunction assertIndexInRange(arr, index) {\n    assertDefined(arr, 'Array must be defined.');\n    const maxLen = arr.length;\n    if (index < 0 || index >= maxLen) {\n        throwError(`Index expected to be less than ${maxLen} but got ${index}`);\n    }\n}\nfunction assertOneOf(value, ...validValues) {\n    if (validValues.indexOf(value) !== -1)\n        return true;\n    throwError(`Expected value to be one of ${JSON.stringify(validValues)} but was ${JSON.stringify(value)}.`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Construct an injectable definition which defines how a token will be constructed by the DI\n * system, and in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ɵprov` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n *   with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n *   provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n *   The factory can call `inject` to access the `Injector` and request injection of dependencies.\n *\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nfunction ɵɵdefineInjectable(opts) {\n    return {\n        token: opts.token,\n        providedIn: opts.providedIn || null,\n        factory: opts.factory,\n        value: undefined,\n    };\n}\n/**\n * @deprecated in v8, delete after v10. This API should be used only by generated code, and that\n * code should now use ɵɵdefineInjectable instead.\n * @publicApi\n */\nconst defineInjectable = ɵɵdefineInjectable;\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n *   either have a factory or point to a type which has a `ɵprov` static property (the\n *   type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n *   whose providers will also be added to the injector. Locally provided types will override\n *   providers from imports.\n *\n * @codeGenApi\n */\nfunction ɵɵdefineInjector(options) {\n    return { providers: options.providers || [], imports: options.imports || [] };\n}\n/**\n * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading\n * inherited value.\n *\n * @param type A type which may have its own (non-inherited) `ɵprov`.\n */\nfunction getInjectableDef(type) {\n    return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);\n}\n/**\n * Return definition only if it is defined directly on `type` and is not inherited from a base\n * class of `type`.\n */\nfunction getOwnDefinition(type, field) {\n    return type.hasOwnProperty(field) ? type[field] : null;\n}\n/**\n * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.\n *\n * @param type A type which may have `ɵprov`, via inheritance.\n *\n * @deprecated Will be removed in a future version of Angular, where an error will occur in the\n *     scenario if we find the `ɵprov` on an ancestor only.\n */\nfunction getInheritedInjectableDef(type) {\n    const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);\n    if (def) {\n        const typeName = getTypeName(type);\n        // TODO(FW-1307): Re-add ngDevMode when closure can handle it\n        // ngDevMode &&\n        console.warn(`DEPRECATED: DI is instantiating a token \"${typeName}\" that inherits its @Injectable decorator but does not provide one itself.\\n` +\n            `This will become an error in a future version of Angular. Please add @Injectable() to the \"${typeName}\" class.`);\n        return def;\n    }\n    else {\n        return null;\n    }\n}\n/** Gets the name of a type, accounting for some cross-browser differences. */\nfunction getTypeName(type) {\n    // `Function.prototype.name` behaves differently between IE and other browsers. In most browsers\n    // it'll always return the name of the function itself, no matter how many other functions it\n    // inherits from. On IE the function doesn't have its own `name` property, but it takes it from\n    // the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most\n    // browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around\n    // the issue by converting the function to a string and parsing its name out that way via a regex.\n    if (type.hasOwnProperty('name')) {\n        return type.name;\n    }\n    const match = ('' + type).match(/^function\\s*([^\\s(]+)/);\n    return match === null ? '' : match[1];\n}\n/**\n * Read the injector def type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have an injector def (`ɵinj`)\n */\nfunction getInjectorDef(type) {\n    return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ?\n        type[NG_INJ_DEF] :\n        null;\n}\nconst NG_PROV_DEF = getClosureSafeProperty({ ɵprov: getClosureSafeProperty });\nconst NG_INJ_DEF = getClosureSafeProperty({ ɵinj: getClosureSafeProperty });\n// We need to keep these around so we can read off old defs if new defs are unavailable\nconst NG_INJECTABLE_DEF = getClosureSafeProperty({ ngInjectableDef: getClosureSafeProperty });\nconst NG_INJECTOR_DEF = getClosureSafeProperty({ ngInjectorDef: getClosureSafeProperty });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injection flags for DI.\n *\n * @publicApi\n */\nvar InjectFlags;\n(function (InjectFlags) {\n    // TODO(alxhub): make this 'const' (and remove `InternalInjectFlags` enum) when ngc no longer\n    // writes exports of it into ngfactory files.\n    /** Check self and check parent injector if needed */\n    InjectFlags[InjectFlags[\"Default\"] = 0] = \"Default\";\n    /**\n     * Specifies that an injector should retrieve a dependency from any injector until reaching the\n     * host element of the current component. (Only used with Element Injector)\n     */\n    InjectFlags[InjectFlags[\"Host\"] = 1] = \"Host\";\n    /** Don't ascend to ancestors of the node requesting injection. */\n    InjectFlags[InjectFlags[\"Self\"] = 2] = \"Self\";\n    /** Skip the node that is requesting injection. */\n    InjectFlags[InjectFlags[\"SkipSelf\"] = 4] = \"SkipSelf\";\n    /** Inject `defaultValue` instead if token not found. */\n    InjectFlags[InjectFlags[\"Optional\"] = 8] = \"Optional\";\n})(InjectFlags || (InjectFlags = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n *  1. `Injector` should not depend on ivy logic.\n *  2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\nlet _injectImplementation;\nfunction getInjectImplementation() {\n    return _injectImplementation;\n}\n/**\n * Sets the current inject implementation.\n */\nfunction setInjectImplementation(impl) {\n    const previous = _injectImplementation;\n    _injectImplementation = impl;\n    return previous;\n}\n/**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * injectable definition.\n */\nfunction injectRootLimpMode(token, notFoundValue, flags) {\n    const injectableDef = getInjectableDef(token);\n    if (injectableDef && injectableDef.providedIn == 'root') {\n        return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :\n            injectableDef.value;\n    }\n    if (flags & InjectFlags.Optional)\n        return null;\n    if (notFoundValue !== undefined)\n        return notFoundValue;\n    throwProviderNotFoundError(stringify(token), 'Injector');\n}\n/**\n * Assert that `_injectImplementation` is not `fn`.\n *\n * This is useful, to prevent infinite recursion.\n *\n * @param fn Function which it should not equal to\n */\nfunction assertInjectImplementationNotEqual(fn) {\n    ngDevMode &&\n        assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\nfunction noSideEffects(fn) {\n    return { toString: fn }.toString();\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nvar ChangeDetectionStrategy;\n(function (ChangeDetectionStrategy) {\n    /**\n     * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n     * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n     * Change detection can still be explicitly invoked.\n     * This strategy applies to all child directives and cannot be overridden.\n     */\n    ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n    /**\n     * Use the default `CheckAlways` strategy, in which change detection is automatic until\n     * explicitly deactivated.\n     */\n    ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));\n/**\n * Defines the possible states of the default change detector.\n * @see `ChangeDetectorRef`\n */\nvar ChangeDetectorStatus;\n(function (ChangeDetectorStatus) {\n    /**\n     * A state in which, after calling `detectChanges()`, the change detector\n     * state becomes `Checked`, and must be explicitly invoked or reactivated.\n     */\n    ChangeDetectorStatus[ChangeDetectorStatus[\"CheckOnce\"] = 0] = \"CheckOnce\";\n    /**\n     * A state in which change detection is skipped until the change detector mode\n     * becomes `CheckOnce`.\n     */\n    ChangeDetectorStatus[ChangeDetectorStatus[\"Checked\"] = 1] = \"Checked\";\n    /**\n     * A state in which change detection continues automatically until explicitly\n     * deactivated.\n     */\n    ChangeDetectorStatus[ChangeDetectorStatus[\"CheckAlways\"] = 2] = \"CheckAlways\";\n    /**\n     * A state in which a change detector sub tree is not a part of the main tree and\n     * should be skipped.\n     */\n    ChangeDetectorStatus[ChangeDetectorStatus[\"Detached\"] = 3] = \"Detached\";\n    /**\n     * Indicates that the change detector encountered an error checking a binding\n     * or calling a directive lifecycle method and is now in an inconsistent state. Change\n     * detectors in this state do not detect changes.\n     */\n    ChangeDetectorStatus[ChangeDetectorStatus[\"Errored\"] = 4] = \"Errored\";\n    /**\n     * Indicates that the change detector has been destroyed.\n     */\n    ChangeDetectorStatus[ChangeDetectorStatus[\"Destroyed\"] = 5] = \"Destroyed\";\n})(ChangeDetectorStatus || (ChangeDetectorStatus = {}));\n/**\n * Reports whether a given strategy is currently the default for change detection.\n * @param changeDetectionStrategy The strategy to check.\n * @returns True if the given strategy is the current default, false otherwise.\n * @see `ChangeDetectorStatus`\n * @see `ChangeDetectorRef`\n */\nfunction isDefaultChangeDetectionStrategy(changeDetectionStrategy) {\n    return changeDetectionStrategy == null ||\n        changeDetectionStrategy === ChangeDetectionStrategy.Default;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n *\n * @publicApi\n */\nvar ViewEncapsulation;\n(function (ViewEncapsulation) {\n    /**\n     * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host\n     * Element and pre-processing the style rules provided via {@link Component#styles styles} or\n     * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all\n     * selectors.\n     *\n     * This is the default option.\n     */\n    ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n    // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n    /**\n     * Don't provide any template or style encapsulation.\n     */\n    ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n    /**\n     * Use Shadow DOM to encapsulate styles.\n     *\n     * For the DOM this means using modern [Shadow\n     * DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) and\n     * creating a ShadowRoot for Component's Host Element.\n     */\n    ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation || (ViewEncapsulation = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst __globalThis = typeof globalThis !== 'undefined' && globalThis;\nconst __window = typeof window !== 'undefined' && window;\nconst __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n    self instanceof WorkerGlobalScope && self;\nconst __global = typeof global !== 'undefined' && global;\n// Always use __globalThis if available, which is the spec-defined global variable across all\n// environments, then fallback to __global first, because in Node tests both __global and\n// __window may be defined and _global should be __global in that case.\nconst _global = __globalThis || __global || __window || __self;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction ngDevModeResetPerfCounters() {\n    const locationString = typeof location !== 'undefined' ? location.toString() : '';\n    const newCounters = {\n        namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,\n        firstCreatePass: 0,\n        tNode: 0,\n        tView: 0,\n        rendererCreateTextNode: 0,\n        rendererSetText: 0,\n        rendererCreateElement: 0,\n        rendererAddEventListener: 0,\n        rendererSetAttribute: 0,\n        rendererRemoveAttribute: 0,\n        rendererSetProperty: 0,\n        rendererSetClassName: 0,\n        rendererAddClass: 0,\n        rendererRemoveClass: 0,\n        rendererSetStyle: 0,\n        rendererRemoveStyle: 0,\n        rendererDestroy: 0,\n        rendererDestroyNode: 0,\n        rendererMoveNode: 0,\n        rendererRemoveNode: 0,\n        rendererAppendChild: 0,\n        rendererInsertBefore: 0,\n        rendererCreateComment: 0,\n    };\n    // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n    const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n    _global['ngDevMode'] = allowNgDevModeTrue && newCounters;\n    return newCounters;\n}\n/**\n * This function checks to see if the `ngDevMode` has been set. If yes,\n * then we honor it, otherwise we default to dev mode with additional checks.\n *\n * The idea is that unless we are doing production build where we explicitly\n * set `ngDevMode == false` we should be helping the developer by providing\n * as much early warning and errors as possible.\n *\n * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions\n * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode\n * is defined for the entire instruction set.\n *\n * When checking `ngDevMode` on toplevel, always init it before referencing it\n * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can\n *  get a `ReferenceError` like in https://github.com/angular/angular/issues/31595.\n *\n * Details on possible values for `ngDevMode` can be found on its docstring.\n *\n * NOTE:\n * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nfunction initNgDevMode() {\n    // The below checks are to ensure that calling `initNgDevMode` multiple times does not\n    // reset the counters.\n    // If the `ngDevMode` is not an object, then it means we have not created the perf counters\n    // yet.\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        if (typeof ngDevMode !== 'object') {\n            ngDevModeResetPerfCounters();\n        }\n        return typeof ngDevMode !== 'undefined' && !!ngDevMode;\n    }\n    return false;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\nconst EMPTY_OBJ = {};\nconst EMPTY_ARRAY = [];\n// freezing the values prevents any code from accidentally inserting new values in\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) {\n    // These property accesses can be ignored because ngDevMode will be set to false\n    // when optimizing code and the whole if statement will be dropped.\n    // tslint:disable-next-line:no-toplevel-property-access\n    Object.freeze(EMPTY_OBJ);\n    // tslint:disable-next-line:no-toplevel-property-access\n    Object.freeze(EMPTY_ARRAY);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_COMP_DEF = getClosureSafeProperty({ ɵcmp: getClosureSafeProperty });\nconst NG_DIR_DEF = getClosureSafeProperty({ ɵdir: getClosureSafeProperty });\nconst NG_PIPE_DEF = getClosureSafeProperty({ ɵpipe: getClosureSafeProperty });\nconst NG_MOD_DEF = getClosureSafeProperty({ ɵmod: getClosureSafeProperty });\nconst NG_LOC_ID_DEF = getClosureSafeProperty({ ɵloc: getClosureSafeProperty });\nconst NG_FACTORY_DEF = getClosureSafeProperty({ ɵfac: getClosureSafeProperty });\n/**\n * If a directive is diPublic, bloomAdd sets a property on the type with this constant as\n * the key and the directive's unique ID as the value. This allows us to map directives to their\n * bloom filter bit for DI.\n */\n// TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.\nconst NG_ELEMENT_ID = getClosureSafeProperty({ __NG_ELEMENT_ID__: getClosureSafeProperty });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet _renderCompCount = 0;\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyDirective {\n *   // Generated by Angular Template Compiler\n *   // [Symbol] syntax will not be supported by TypeScript until v2.7\n *   static ɵcmp = defineComponent({\n *     ...\n *   });\n * }\n * ```\n * @codeGenApi\n */\nfunction ɵɵdefineComponent(componentDefinition) {\n    return noSideEffects(() => {\n        // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.\n        // See the `initNgDevMode` docstring for more information.\n        (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n        const type = componentDefinition.type;\n        const declaredInputs = {};\n        const def = {\n            type: type,\n            providersResolver: null,\n            decls: componentDefinition.decls,\n            vars: componentDefinition.vars,\n            factory: null,\n            template: componentDefinition.template || null,\n            consts: componentDefinition.consts || null,\n            ngContentSelectors: componentDefinition.ngContentSelectors,\n            hostBindings: componentDefinition.hostBindings || null,\n            hostVars: componentDefinition.hostVars || 0,\n            hostAttrs: componentDefinition.hostAttrs || null,\n            contentQueries: componentDefinition.contentQueries || null,\n            declaredInputs: declaredInputs,\n            inputs: null,\n            outputs: null,\n            exportAs: componentDefinition.exportAs || null,\n            onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n            directiveDefs: null,\n            pipeDefs: null,\n            selectors: componentDefinition.selectors || EMPTY_ARRAY,\n            viewQuery: componentDefinition.viewQuery || null,\n            features: componentDefinition.features || null,\n            data: componentDefinition.data || {},\n            // TODO(misko): convert ViewEncapsulation into const enum so that it can be used\n            // directly in the next line. Also `None` should be 0 not 2.\n            encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,\n            id: 'c',\n            styles: componentDefinition.styles || EMPTY_ARRAY,\n            _: null,\n            setInput: null,\n            schemas: componentDefinition.schemas || null,\n            tView: null,\n        };\n        const directiveTypes = componentDefinition.directives;\n        const feature = componentDefinition.features;\n        const pipeTypes = componentDefinition.pipes;\n        def.id += _renderCompCount++;\n        def.inputs = invertObject(componentDefinition.inputs, declaredInputs),\n            def.outputs = invertObject(componentDefinition.outputs),\n            feature && feature.forEach((fn) => fn(def));\n        def.directiveDefs = directiveTypes ?\n            () => (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)\n                .map(extractDirectiveDef) :\n            null;\n        def.pipeDefs = pipeTypes ?\n            () => (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef) :\n            null;\n        return def;\n    });\n}\n/**\n * Generated next to NgModules to monkey-patch directive and pipe references onto a component's\n * definition, when generating a direct reference in the component file would otherwise create an\n * import cycle.\n *\n * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.\n *\n * @codeGenApi\n */\nfunction ɵɵsetComponentScope(type, directives, pipes) {\n    const def = type.ɵcmp;\n    def.directiveDefs = () => directives.map(extractDirectiveDef);\n    def.pipeDefs = () => pipes.map(extractPipeDef);\n}\nfunction extractDirectiveDef(type) {\n    const def = getComponentDef(type) || getDirectiveDef(type);\n    if (ngDevMode && !def) {\n        throw new Error(`'${type.name}' is neither 'ComponentType' or 'DirectiveType'.`);\n    }\n    return def;\n}\nfunction extractPipeDef(type) {\n    const def = getPipeDef(type);\n    if (ngDevMode && !def) {\n        throw new Error(`'${type.name}' is not a 'PipeType'.`);\n    }\n    return def;\n}\nconst autoRegisterModuleById = {};\n/**\n * @codeGenApi\n */\nfunction ɵɵdefineNgModule(def) {\n    return noSideEffects(() => {\n        const res = {\n            type: def.type,\n            bootstrap: def.bootstrap || EMPTY_ARRAY,\n            declarations: def.declarations || EMPTY_ARRAY,\n            imports: def.imports || EMPTY_ARRAY,\n            exports: def.exports || EMPTY_ARRAY,\n            transitiveCompileScopes: null,\n            schemas: def.schemas || null,\n            id: def.id || null,\n        };\n        if (def.id != null) {\n            autoRegisterModuleById[def.id] = def.type;\n        }\n        return res;\n    });\n}\n/**\n * Adds the module metadata that is necessary to compute the module's transitive scope to an\n * existing module definition.\n *\n * Scope metadata of modules is not used in production builds, so calls to this function can be\n * marked pure to tree-shake it from the bundle, allowing for all referenced declarations\n * to become eligible for tree-shaking as well.\n *\n * @codeGenApi\n */\nfunction ɵɵsetNgModuleScope(type, scope) {\n    return noSideEffects(() => {\n        const ngModuleDef = getNgModuleDef(type, true);\n        ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY;\n        ngModuleDef.imports = scope.imports || EMPTY_ARRAY;\n        ngModuleDef.exports = scope.exports || EMPTY_ARRAY;\n    });\n}\n/**\n * Inverts an inputs or outputs lookup such that the keys, which were the\n * minified keys, are part of the values, and the values are parsed so that\n * the publicName of the property is the new key\n *\n * e.g. for\n *\n * ```\n * class Comp {\n *   @Input()\n *   propName1: string;\n *\n *   @Input('publicName2')\n *   declaredPropName2: number;\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n *   propName1: 'propName1',\n *   declaredPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```\n * {\n *   minifiedPropName1: 'propName1',\n *   minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName)\n *\n * ```\n * {\n *  'propName1': 'minifiedPropName1',\n *  'publicName2': 'minifiedPropName2',\n * }\n * ```\n *\n * Optionally the function can take `secondary` which will result in: (public name => declared name)\n *\n * ```\n * {\n *  'propName1': 'propName1',\n *  'publicName2': 'declaredPropName2',\n * }\n * ```\n *\n\n */\nfunction invertObject(obj, secondary) {\n    if (obj == null)\n        return EMPTY_OBJ;\n    const newLookup = {};\n    for (const minifiedKey in obj) {\n        if (obj.hasOwnProperty(minifiedKey)) {\n            let publicName = obj[minifiedKey];\n            let declaredName = publicName;\n            if (Array.isArray(publicName)) {\n                declaredName = publicName[1];\n                publicName = publicName[0];\n            }\n            newLookup[publicName] = minifiedKey;\n            if (secondary) {\n                (secondary[publicName] = declaredName);\n            }\n        }\n    }\n    return newLookup;\n}\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n *   // Generated by Angular Template Compiler\n *   // [Symbol] syntax will not be supported by TypeScript until v2.7\n *   static ɵdir = ɵɵdefineDirective({\n *     ...\n *   });\n * }\n * ```\n *\n * @codeGenApi\n */\nconst ɵɵdefineDirective = ɵɵdefineComponent;\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n *   // Generated by Angular Template Compiler\n *   static ɵpipe = definePipe({\n *     ...\n *   });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\nfunction ɵɵdefinePipe(pipeDef) {\n    return {\n        type: pipeDef.type,\n        name: pipeDef.name,\n        factory: null,\n        pure: pipeDef.pure !== false,\n        onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n    };\n}\n/**\n * The following getter methods retrieve the definition from the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\nfunction getComponentDef(type) {\n    return type[NG_COMP_DEF] || null;\n}\nfunction getDirectiveDef(type) {\n    return type[NG_DIR_DEF] || null;\n}\nfunction getPipeDef(type) {\n    return type[NG_PIPE_DEF] || null;\n}\nfunction getNgModuleDef(type, throwNotFound) {\n    const ngModuleDef = type[NG_MOD_DEF] || null;\n    if (!ngModuleDef && throwNotFound === true) {\n        throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`);\n    }\n    return ngModuleDef;\n}\nfunction getNgLocaleIdDef(type) {\n    return type[NG_LOC_ID_DEF] || null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Below are constants for LView indices to help us look up LView members\n// without having to remember the specific indices.\n// Uglify will inline these when minifying so there shouldn't be a cost.\nconst HOST = 0;\nconst TVIEW = 1;\nconst FLAGS = 2;\nconst PARENT = 3;\nconst NEXT = 4;\nconst TRANSPLANTED_VIEWS_TO_REFRESH = 5;\nconst T_HOST = 6;\nconst CLEANUP = 7;\nconst CONTEXT = 8;\nconst INJECTOR = 9;\nconst RENDERER_FACTORY = 10;\nconst RENDERER = 11;\nconst SANITIZER = 12;\nconst CHILD_HEAD = 13;\nconst CHILD_TAIL = 14;\n// FIXME(misko): Investigate if the three declarations aren't all same thing.\nconst DECLARATION_VIEW = 15;\nconst DECLARATION_COMPONENT_VIEW = 16;\nconst DECLARATION_LCONTAINER = 17;\nconst PREORDER_HOOK_FLAGS = 18;\nconst QUERIES = 19;\n/**\n * Size of LView's header. Necessary to adjust for it when setting slots.\n *\n * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate\n * instruction index into `LView` index. All other indexes should be in the `LView` index space and\n * there should be no need to refer to `HEADER_OFFSET` anywhere else.\n */\nconst HEADER_OFFSET = 20;\n/**\n * Converts `TViewType` into human readable text.\n * Make sure this matches with `TViewType`\n */\nconst TViewTypeAsString = [\n    'Root',\n    'Component',\n    'Embedded', // 2\n];\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Special location which allows easy identification of type. If we have an array which was\n * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is\n * `LContainer`.\n */\nconst TYPE = 1;\n/**\n * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\n/**\n * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip\n * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify\n * that the `MOVED_VIEWS` are transplanted and on-push.\n */\nconst HAS_TRANSPLANTED_VIEWS = 2;\n// PARENT, NEXT, TRANSPLANTED_VIEWS_TO_REFRESH are indices 3, 4, and 5\n// As we already have these constants in LView, we don't need to re-create them.\n// T_HOST is index 6\n// We already have this constants in LView, we don't need to re-create it.\nconst NATIVE = 7;\nconst VIEW_REFS = 8;\nconst MOVED_VIEWS = 9;\n/**\n * Size of LContainer's header. Represents the index after which all views in the\n * container will be inserted. We need to keep a record of current views so we know\n * which views are already in the DOM (and don't need to be re-added) and so we can\n * remove views from the DOM when they are no longer required.\n */\nconst CONTAINER_HEADER_OFFSET = 10;\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$1 = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction isLView(value) {\n    return Array.isArray(value) && typeof value[TYPE] === 'object';\n}\n/**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction isLContainer(value) {\n    return Array.isArray(value) && value[TYPE] === true;\n}\nfunction isContentQueryHost(tNode) {\n    return (tNode.flags & 8 /* hasContentQuery */) !== 0;\n}\nfunction isComponentHost(tNode) {\n    return (tNode.flags & 2 /* isComponentHost */) === 2 /* isComponentHost */;\n}\nfunction isDirectiveHost(tNode) {\n    return (tNode.flags & 1 /* isDirectiveHost */) === 1 /* isDirectiveHost */;\n}\nfunction isComponentDef(def) {\n    return def.template !== null;\n}\nfunction isRootView(target) {\n    return (target[FLAGS] & 512 /* IsRoot */) !== 0;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// [Assert functions do not constraint type when they are guarded by a truthy\n// expression.](https://github.com/microsoft/TypeScript/issues/37295)\nfunction assertTNodeForLView(tNode, lView) {\n    assertTNodeForTView(tNode, lView[TVIEW]);\n}\nfunction assertTNodeForTView(tNode, tView) {\n    assertTNode(tNode);\n    tNode.hasOwnProperty('tView_') &&\n        assertEqual(tNode.tView_, tView, 'This TNode does not belong to this TView.');\n}\nfunction assertTNode(tNode) {\n    assertDefined(tNode, 'TNode must be defined');\n    if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) {\n        throwError('Not of type TNode, got: ' + tNode);\n    }\n}\nfunction assertTIcu(tIcu) {\n    assertDefined(tIcu, 'Expected TIcu to be defined');\n    if (!(typeof tIcu.currentCaseLViewIndex === 'number')) {\n        throwError('Object is not of TIcu type.');\n    }\n}\nfunction assertComponentType(actual, msg = 'Type passed in is not ComponentType, it does not have \\'ɵcmp\\' property.') {\n    if (!getComponentDef(actual)) {\n        throwError(msg);\n    }\n}\nfunction assertNgModuleType(actual, msg = 'Type passed in is not NgModuleType, it does not have \\'ɵmod\\' property.') {\n    if (!getNgModuleDef(actual)) {\n        throwError(msg);\n    }\n}\nfunction assertCurrentTNodeIsParent(isParent) {\n    assertEqual(isParent, true, 'currentTNode should be a parent');\n}\nfunction assertHasParent(tNode) {\n    assertDefined(tNode, 'currentTNode should exist!');\n    assertDefined(tNode.parent, 'currentTNode should have a parent');\n}\nfunction assertDataNext(lView, index, arr) {\n    if (arr == null)\n        arr = lView;\n    assertEqual(arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`);\n}\nfunction assertLContainer(value) {\n    assertDefined(value, 'LContainer must be defined');\n    assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\nfunction assertLViewOrUndefined(value) {\n    value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\nfunction assertLView(value) {\n    assertDefined(value, 'LView must be defined');\n    assertEqual(isLView(value), true, 'Expecting LView');\n}\nfunction assertFirstCreatePass(tView, errMessage) {\n    assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');\n}\nfunction assertFirstUpdatePass(tView, errMessage) {\n    assertEqual(tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.');\n}\n/**\n * This is a basic sanity check that an object is probably a directive def. DirectiveDef is\n * an interface, so we can't do a direct instanceof check.\n */\nfunction assertDirectiveDef(obj) {\n    if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {\n        throwError(`Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`);\n    }\n}\nfunction assertIndexInDeclRange(lView, index) {\n    const tView = lView[1];\n    assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);\n}\nfunction assertIndexInVarsRange(lView, index) {\n    const tView = lView[1];\n    assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index);\n}\nfunction assertIndexInExpandoRange(lView, index) {\n    const tView = lView[1];\n    assertBetween(tView.expandoStartIndex, lView.length, index);\n}\nfunction assertBetween(lower, upper, index) {\n    if (!(lower <= index && index < upper)) {\n        throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`);\n    }\n}\nfunction assertProjectionSlots(lView, errMessage) {\n    assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.');\n    assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, errMessage ||\n        'Components with projection nodes (<ng-content>) must have projection slots defined.');\n}\nfunction assertParentView(lView, errMessage) {\n    assertDefined(lView, errMessage || 'Component views should always have a parent view (component\\'s host view)');\n}\n/**\n * This is a basic sanity check that the `injectorIndex` seems to point to what looks like a\n * NodeInjector data structure.\n *\n * @param lView `LView` which should be checked.\n * @param injectorIndex index into the `LView` where the `NodeInjector` is expected.\n */\nfunction assertNodeInjector(lView, injectorIndex) {\n    assertIndexInExpandoRange(lView, injectorIndex);\n    assertIndexInExpandoRange(lView, injectorIndex + 8 /* PARENT */);\n    assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 8 /* PARENT */], 'injectorIndex should point to parent injector');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getFactoryDef(type, throwNotFound) {\n    const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n    if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n        throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`);\n    }\n    return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents a basic change from a previous to a new value for a single\n * property on a directive instance. Passed as a value in a\n * {@link SimpleChanges} object to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\nclass SimpleChange {\n    constructor(previousValue, currentValue, firstChange) {\n        this.previousValue = previousValue;\n        this.currentValue = currentValue;\n        this.firstChange = firstChange;\n    }\n    /**\n     * Check whether the new value is the first value assigned.\n     */\n    isFirstChange() {\n        return this.firstChange;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```\n * static ɵcmp = defineComponent({\n *   ...\n *   inputs: {name: 'publicName'},\n *   features: [NgOnChangesFeature]\n * });\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵNgOnChangesFeature() {\n    return NgOnChangesFeatureImpl;\n}\nfunction NgOnChangesFeatureImpl(definition) {\n    if (definition.type.prototype.ngOnChanges) {\n        definition.setInput = ngOnChangesSetInput;\n    }\n    return rememberChangeHistoryAndInvokeOnChangesHook;\n}\n// This option ensures that the ngOnChanges lifecycle hook will be inherited\n// from superclasses (in InheritDefinitionFeature).\n/** @nocollapse */\n// tslint:disable-next-line:no-toplevel-property-access\nɵɵNgOnChangesFeature.ngInherit = true;\n/**\n * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate\n * `ngOnChanges`.\n *\n * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are\n * found it invokes `ngOnChanges` on the component instance.\n *\n * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`,\n *     it is guaranteed to be called with component instance.\n */\nfunction rememberChangeHistoryAndInvokeOnChangesHook() {\n    const simpleChangesStore = getSimpleChangesStore(this);\n    const current = simpleChangesStore === null || simpleChangesStore === void 0 ? void 0 : simpleChangesStore.current;\n    if (current) {\n        const previous = simpleChangesStore.previous;\n        if (previous === EMPTY_OBJ) {\n            simpleChangesStore.previous = current;\n        }\n        else {\n            // New changes are copied to the previous store, so that we don't lose history for inputs\n            // which were not changed this time\n            for (let key in current) {\n                previous[key] = current[key];\n            }\n        }\n        simpleChangesStore.current = null;\n        this.ngOnChanges(current);\n    }\n}\nfunction ngOnChangesSetInput(instance, value, publicName, privateName) {\n    const simpleChangesStore = getSimpleChangesStore(instance) ||\n        setSimpleChangesStore(instance, { previous: EMPTY_OBJ, current: null });\n    const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n    const previous = simpleChangesStore.previous;\n    const declaredName = this.declaredInputs[publicName];\n    const previousChange = previous[declaredName];\n    current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n    instance[privateName] = value;\n}\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\nfunction getSimpleChangesStore(instance) {\n    return instance[SIMPLE_CHANGES_STORE] || null;\n}\nfunction setSimpleChangesStore(instance, store) {\n    return instance[SIMPLE_CHANGES_STORE] = store;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet profilerCallback = null;\n/**\n * Sets the callback function which will be invoked before and after performing certain actions at\n * runtime (for example, before and after running change detection).\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\nconst setProfiler = (profiler) => {\n    profilerCallback = profiler;\n};\n/**\n * Profiler function which wraps user code executed by the runtime.\n *\n * @param event ProfilerEvent corresponding to the execution context\n * @param instance component instance\n * @param hookOrListener lifecycle hook function or output listener. The value depends on the\n *  execution context\n * @returns\n */\nconst profiler = function (event, instance, hookOrListener) {\n    if (profilerCallback != null /* both `null` and `undefined` */) {\n        profilerCallback(event, instance, hookOrListener);\n    }\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nconst MATH_ML_NAMESPACE = 'http://www.w3.org/1998/MathML/';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Most of the use of `document` in Angular is from within the DI system so it is possible to simply\n * inject the `DOCUMENT` token and are done.\n *\n * Ivy is special because it does not rely upon the DI and must get hold of the document some other\n * way.\n *\n * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy.\n * Wherever ivy needs the global document, it calls `getDocument()` instead.\n *\n * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to\n * tell ivy what the global `document` is.\n *\n * Angular does this for us in each of the standard platforms (`Browser`, `Server`, and `WebWorker`)\n * by calling `setDocument()` when providing the `DOCUMENT` token.\n */\nlet DOCUMENT = undefined;\n/**\n * Tell ivy what the `document` is for this platform.\n *\n * It is only necessary to call this if the current platform is not a browser.\n *\n * @param document The object representing the global `document` in this environment.\n */\nfunction setDocument(document) {\n    DOCUMENT = document;\n}\n/**\n * Access the object that represents the `document` for this platform.\n *\n * Ivy calls this whenever it needs to access the `document` object.\n * For example to create the renderer or to do sanitization.\n */\nfunction getDocument() {\n    if (DOCUMENT !== undefined) {\n        return DOCUMENT;\n    }\n    else if (typeof document !== 'undefined') {\n        return document;\n    }\n    // No \"document\" can be found. This should only happen if we are running ivy outside Angular and\n    // the current platform is not a browser. Since this is not a supported scenario at the moment\n    // this should not happen in Angular apps.\n    // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a\n    // public API. Meanwhile we just return `undefined` and let the application fail.\n    return undefined;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// TODO: cleanup once the code is merged in angular/angular\nvar RendererStyleFlags3;\n(function (RendererStyleFlags3) {\n    RendererStyleFlags3[RendererStyleFlags3[\"Important\"] = 1] = \"Important\";\n    RendererStyleFlags3[RendererStyleFlags3[\"DashCase\"] = 2] = \"DashCase\";\n})(RendererStyleFlags3 || (RendererStyleFlags3 = {}));\n/** Returns whether the `renderer` is a `ProceduralRenderer3` */\nfunction isProceduralRenderer(renderer) {\n    return !!(renderer.listen);\n}\nconst ɵ0 = (hostElement, rendererType) => {\n    return getDocument();\n};\nconst domRendererFactory3 = {\n    createRenderer: ɵ0\n};\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$2 = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`)\n * in same location in `LView`. This is because we don't want to pre-allocate space for it\n * because the storage is sparse. This file contains utilities for dealing with such data types.\n *\n * How do we know what is stored at a given location in `LView`.\n * - `Array.isArray(value) === false` => `RNode` (The normal storage value)\n * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.\n *   - `typeof value[TYPE] === 'object'` => `LView`\n *      - This happens when we have a component at a given location\n *   - `typeof value[TYPE] === true` => `LContainer`\n *      - This happens when we have `LContainer` binding at a given location.\n *\n *\n * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.\n */\n/**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapRNode(value) {\n    while (Array.isArray(value)) {\n        value = value[HOST];\n    }\n    return value;\n}\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapLView(value) {\n    while (Array.isArray(value)) {\n        // This check is same as `isLView()` but we don't call at as we don't want to call\n        // `Array.isArray()` twice and give JITer more work for inlining.\n        if (typeof value[TYPE] === 'object')\n            return value;\n        value = value[HOST];\n    }\n    return null;\n}\n/**\n * Returns `LContainer` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapLContainer(value) {\n    while (Array.isArray(value)) {\n        // This check is same as `isLContainer()` but we don't call at as we don't want to call\n        // `Array.isArray()` twice and give JITer more work for inlining.\n        if (value[TYPE] === true)\n            return value;\n        value = value[HOST];\n    }\n    return null;\n}\n/**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\nfunction getNativeByIndex(index, lView) {\n    ngDevMode && assertIndexInRange(lView, index);\n    ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET');\n    return unwrapRNode(lView[index]);\n}\n/**\n * Retrieve an `RNode` for a given `TNode` and `LView`.\n *\n * This function guarantees in dev mode to retrieve a non-null `RNode`.\n *\n * @param tNode\n * @param lView\n */\nfunction getNativeByTNode(tNode, lView) {\n    ngDevMode && assertTNodeForLView(tNode, lView);\n    ngDevMode && assertIndexInRange(lView, tNode.index);\n    const node = unwrapRNode(lView[tNode.index]);\n    ngDevMode && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\n    return node;\n}\n/**\n * Retrieve an `RNode` or `null` for a given `TNode` and `LView`.\n *\n * Some `TNode`s don't have associated `RNode`s. For example `Projection`\n *\n * @param tNode\n * @param lView\n */\nfunction getNativeByTNodeOrNull(tNode, lView) {\n    const index = tNode === null ? -1 : tNode.index;\n    if (index !== -1) {\n        ngDevMode && assertTNodeForLView(tNode, lView);\n        const node = unwrapRNode(lView[index]);\n        ngDevMode && node !== null && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\n        return node;\n    }\n    return null;\n}\n// fixme(misko): The return Type should be `TNode|null`\nfunction getTNode(tView, index) {\n    ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n    ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n    const tNode = tView.data[index];\n    ngDevMode && tNode !== null && assertTNode(tNode);\n    return tNode;\n}\n/** Retrieves a value from any `LView` or `TData`. */\nfunction load(view, index) {\n    ngDevMode && assertIndexInRange(view, index);\n    return view[index];\n}\nfunction getComponentLViewByIndex(nodeIndex, hostView) {\n    // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n    ngDevMode && assertIndexInRange(hostView, nodeIndex);\n    const slotValue = hostView[nodeIndex];\n    const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n    return lView;\n}\n/** Checks whether a given view is in creation mode */\nfunction isCreationMode(view) {\n    return (view[FLAGS] & 4 /* CreationMode */) === 4 /* CreationMode */;\n}\n/**\n * Returns a boolean for whether the view is attached to the change detection tree.\n *\n * Note: This determines whether a view should be checked, not whether it's inserted\n * into a container. For that, you'll want `viewAttachedToContainer` below.\n */\nfunction viewAttachedToChangeDetector(view) {\n    return (view[FLAGS] & 128 /* Attached */) === 128 /* Attached */;\n}\n/** Returns a boolean for whether the view is attached to a container. */\nfunction viewAttachedToContainer(view) {\n    return isLContainer(view[PARENT]);\n}\nfunction getConstant(consts, index) {\n    if (index === null || index === undefined)\n        return null;\n    ngDevMode && assertIndexInRange(consts, index);\n    return consts[index];\n}\n/**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\nfunction resetPreOrderHookFlags(lView) {\n    lView[PREORDER_HOOK_FLAGS] = 0;\n}\n/**\n * Updates the `TRANSPLANTED_VIEWS_TO_REFRESH` counter on the `LContainer` as well as the parents\n * whose\n *  1. counter goes from 0 to 1, indicating that there is a new child that has a view to refresh\n *  or\n *  2. counter goes from 1 to 0, indicating there are no more descendant views to refresh\n */\nfunction updateTransplantedViewCount(lContainer, amount) {\n    lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n    let viewOrContainer = lContainer;\n    let parent = lContainer[PARENT];\n    while (parent !== null &&\n        ((amount === 1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 1) ||\n            (amount === -1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 0))) {\n        parent[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n        viewOrContainer = parent;\n        parent = parent[PARENT];\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst instructionState = {\n    lFrame: createLFrame(null),\n    bindingsEnabled: true,\n    isInCheckNoChangesMode: false,\n};\n/**\n * Returns true if the instruction state stack is empty.\n *\n * Intended to be called from tests only (tree shaken otherwise).\n */\nfunction specOnlyIsInstructionStateEmpty() {\n    return instructionState.lFrame.parent === null;\n}\nfunction getElementDepthCount() {\n    return instructionState.lFrame.elementDepthCount;\n}\nfunction increaseElementDepthCount() {\n    instructionState.lFrame.elementDepthCount++;\n}\nfunction decreaseElementDepthCount() {\n    instructionState.lFrame.elementDepthCount--;\n}\nfunction getBindingsEnabled() {\n    return instructionState.bindingsEnabled;\n}\n/**\n * Enables directive matching on elements.\n *\n *  * Example:\n * ```\n * <my-comp my-directive>\n *   Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n *   <!-- ɵɵdisableBindings() -->\n *   <my-comp my-directive>\n *     Should not match component / directive because we are in ngNonBindable.\n *   </my-comp>\n *   <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵenableBindings() {\n    instructionState.bindingsEnabled = true;\n}\n/**\n * Disables directive matching on element.\n *\n *  * Example:\n * ```\n * <my-comp my-directive>\n *   Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n *   <!-- ɵɵdisableBindings() -->\n *   <my-comp my-directive>\n *     Should not match component / directive because we are in ngNonBindable.\n *   </my-comp>\n *   <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵdisableBindings() {\n    instructionState.bindingsEnabled = false;\n}\n/**\n * Return the current `LView`.\n */\nfunction getLView() {\n    return instructionState.lFrame.lView;\n}\n/**\n * Return the current `TView`.\n */\nfunction getTView() {\n    return instructionState.lFrame.tView;\n}\n/**\n * Restores `contextViewData` to the given OpaqueViewState instance.\n *\n * Used in conjunction with the getCurrentView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @param viewToRestore The OpaqueViewState instance to restore.\n * @returns Context of the restored OpaqueViewState instance.\n *\n * @codeGenApi\n */\nfunction ɵɵrestoreView(viewToRestore) {\n    instructionState.lFrame.contextLView = viewToRestore;\n    return viewToRestore[CONTEXT];\n}\nfunction getCurrentTNode() {\n    let currentTNode = getCurrentTNodePlaceholderOk();\n    while (currentTNode !== null && currentTNode.type === 64 /* Placeholder */) {\n        currentTNode = currentTNode.parent;\n    }\n    return currentTNode;\n}\nfunction getCurrentTNodePlaceholderOk() {\n    return instructionState.lFrame.currentTNode;\n}\nfunction getCurrentParentTNode() {\n    const lFrame = instructionState.lFrame;\n    const currentTNode = lFrame.currentTNode;\n    return lFrame.isParent ? currentTNode : currentTNode.parent;\n}\nfunction setCurrentTNode(tNode, isParent) {\n    ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);\n    const lFrame = instructionState.lFrame;\n    lFrame.currentTNode = tNode;\n    lFrame.isParent = isParent;\n}\nfunction isCurrentTNodeParent() {\n    return instructionState.lFrame.isParent;\n}\nfunction setCurrentTNodeAsNotParent() {\n    instructionState.lFrame.isParent = false;\n}\nfunction setCurrentTNodeAsParent() {\n    instructionState.lFrame.isParent = true;\n}\nfunction getContextLView() {\n    return instructionState.lFrame.contextLView;\n}\nfunction isInCheckNoChangesMode() {\n    // TODO(misko): remove this from the LView since it is ngDevMode=true mode only.\n    return instructionState.isInCheckNoChangesMode;\n}\nfunction setIsInCheckNoChangesMode(mode) {\n    instructionState.isInCheckNoChangesMode = mode;\n}\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nfunction getBindingRoot() {\n    const lFrame = instructionState.lFrame;\n    let index = lFrame.bindingRootIndex;\n    if (index === -1) {\n        index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n    }\n    return index;\n}\nfunction getBindingIndex() {\n    return instructionState.lFrame.bindingIndex;\n}\nfunction setBindingIndex(value) {\n    return instructionState.lFrame.bindingIndex = value;\n}\nfunction nextBindingIndex() {\n    return instructionState.lFrame.bindingIndex++;\n}\nfunction incrementBindingIndex(count) {\n    const lFrame = instructionState.lFrame;\n    const index = lFrame.bindingIndex;\n    lFrame.bindingIndex = lFrame.bindingIndex + count;\n    return index;\n}\nfunction isInI18nBlock() {\n    return instructionState.lFrame.inI18n;\n}\nfunction setInI18nBlock(isInI18nBlock) {\n    instructionState.lFrame.inI18n = isInI18nBlock;\n}\n/**\n * Set a new binding root index so that host template functions can execute.\n *\n * Bindings inside the host template are 0 index. But because we don't know ahead of time\n * how many host bindings we have we can't pre-compute them. For this reason they are all\n * 0 index and we just shift the root so that they match next available location in the LView.\n *\n * @param bindingRootIndex Root index for `hostBindings`\n * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive\n *        whose `hostBindings` are being processed.\n */\nfunction setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) {\n    const lFrame = instructionState.lFrame;\n    lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;\n    setCurrentDirectiveIndex(currentDirectiveIndex);\n}\n/**\n * When host binding is executing this points to the directive index.\n * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef`\n * `LView[getCurrentDirectiveIndex()]` is directive instance.\n */\nfunction getCurrentDirectiveIndex() {\n    return instructionState.lFrame.currentDirectiveIndex;\n}\n/**\n * Sets an index of a directive whose `hostBindings` are being processed.\n *\n * @param currentDirectiveIndex `TData` index where current directive instance can be found.\n */\nfunction setCurrentDirectiveIndex(currentDirectiveIndex) {\n    instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;\n}\n/**\n * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being\n * executed.\n *\n * @param tData Current `TData` where the `DirectiveDef` will be looked up at.\n */\nfunction getCurrentDirectiveDef(tData) {\n    const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n    return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex];\n}\nfunction getCurrentQueryIndex() {\n    return instructionState.lFrame.currentQueryIndex;\n}\nfunction setCurrentQueryIndex(value) {\n    instructionState.lFrame.currentQueryIndex = value;\n}\n/**\n * Returns a `TNode` of the location where the current `LView` is declared at.\n *\n * @param lView an `LView` that we want to find parent `TNode` for.\n */\nfunction getDeclarationTNode(lView) {\n    const tView = lView[TVIEW];\n    // Return the declaration parent for embedded views\n    if (tView.type === 2 /* Embedded */) {\n        ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n        return tView.declTNode;\n    }\n    // Components don't have `TView.declTNode` because each instance of component could be\n    // inserted in different location, hence `TView.declTNode` is meaningless.\n    // Falling back to `T_HOST` in case we cross component boundary.\n    if (tView.type === 1 /* Component */) {\n        return lView[T_HOST];\n    }\n    // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode.\n    return null;\n}\n/**\n * This is a light weight version of the `enterView` which is needed by the DI system.\n *\n * @param lView `LView` location of the DI context.\n * @param tNode `TNode` for DI context\n * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration\n *     tree from `tNode`  until we find parent declared `TElementNode`.\n * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared\n *     `TNode` if `flags` has  `SkipSelf`). Failing to enter DI implies that no associated\n *     `NodeInjector` can be found and we should instead use `ModuleInjector`.\n *     - If `true` than this call must be fallowed by `leaveDI`\n *     - If `false` than this call failed and we should NOT call `leaveDI`\n */\nfunction enterDI(lView, tNode, flags) {\n    ngDevMode && assertLViewOrUndefined(lView);\n    if (flags & InjectFlags.SkipSelf) {\n        ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n        let parentTNode = tNode;\n        let parentLView = lView;\n        while (true) {\n            ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n            parentTNode = parentTNode.parent;\n            if (parentTNode === null && !(flags & InjectFlags.Host)) {\n                parentTNode = getDeclarationTNode(parentLView);\n                if (parentTNode === null)\n                    break;\n                // In this case, a parent exists and is definitely an element. So it will definitely\n                // have an existing lView as the declaration view, which is why we can assume it's defined.\n                ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');\n                parentLView = parentLView[DECLARATION_VIEW];\n                // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives\n                // We want to skip those and look only at Elements and ElementContainers to ensure\n                // we're looking at true parent nodes, and not content or other types.\n                if (parentTNode.type & (2 /* Element */ | 8 /* ElementContainer */)) {\n                    break;\n                }\n            }\n            else {\n                break;\n            }\n        }\n        if (parentTNode === null) {\n            // If we failed to find a parent TNode this means that we should use module injector.\n            return false;\n        }\n        else {\n            tNode = parentTNode;\n            lView = parentLView;\n        }\n    }\n    ngDevMode && assertTNodeForLView(tNode, lView);\n    const lFrame = instructionState.lFrame = allocLFrame();\n    lFrame.currentTNode = tNode;\n    lFrame.lView = lView;\n    return true;\n}\n/**\n * Swap the current lView with a new lView.\n *\n * For performance reasons we store the lView in the top level of the module.\n * This way we minimize the number of properties to read. Whenever a new view\n * is entered we have to store the lView for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New lView to become active\n * @returns the previously active lView;\n */\nfunction enterView(newView) {\n    ngDevMode && assertNotEqual(newView[0], newView[1], '????');\n    ngDevMode && assertLViewOrUndefined(newView);\n    const newLFrame = allocLFrame();\n    if (ngDevMode) {\n        assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');\n        assertEqual(newLFrame.lView, null, 'Expected clean LFrame');\n        assertEqual(newLFrame.tView, null, 'Expected clean LFrame');\n        assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame');\n        assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');\n        assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');\n        assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');\n        assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');\n        assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');\n    }\n    const tView = newView[TVIEW];\n    instructionState.lFrame = newLFrame;\n    ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);\n    newLFrame.currentTNode = tView.firstChild;\n    newLFrame.lView = newView;\n    newLFrame.tView = tView;\n    newLFrame.contextLView = newView;\n    newLFrame.bindingIndex = tView.bindingStartIndex;\n    newLFrame.inI18n = false;\n}\n/**\n * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.\n */\nfunction allocLFrame() {\n    const currentLFrame = instructionState.lFrame;\n    const childLFrame = currentLFrame === null ? null : currentLFrame.child;\n    const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n    return newLFrame;\n}\nfunction createLFrame(parent) {\n    const lFrame = {\n        currentTNode: null,\n        isParent: true,\n        lView: null,\n        tView: null,\n        selectedIndex: -1,\n        contextLView: null,\n        elementDepthCount: 0,\n        currentNamespace: null,\n        currentDirectiveIndex: -1,\n        bindingRootIndex: -1,\n        bindingIndex: -1,\n        currentQueryIndex: 0,\n        parent: parent,\n        child: null,\n        inI18n: false,\n    };\n    parent !== null && (parent.child = lFrame); // link the new LFrame for reuse.\n    return lFrame;\n}\n/**\n * A lightweight version of leave which is used with DI.\n *\n * This function only resets `currentTNode` and `LView` as those are the only properties\n * used with DI (`enterDI()`).\n *\n * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where\n * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`.\n */\nfunction leaveViewLight() {\n    const oldLFrame = instructionState.lFrame;\n    instructionState.lFrame = oldLFrame.parent;\n    oldLFrame.currentTNode = null;\n    oldLFrame.lView = null;\n    return oldLFrame;\n}\n/**\n * This is a lightweight version of the `leaveView` which is needed by the DI system.\n *\n * NOTE: this function is an alias so that we can change the type of the function to have `void`\n * return type.\n */\nconst leaveDI = leaveViewLight;\n/**\n * Leave the current `LView`\n *\n * This pops the `LFrame` with the associated `LView` from the stack.\n *\n * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is\n * because for performance reasons we don't release `LFrame` but rather keep it for next use.\n */\nfunction leaveView() {\n    const oldLFrame = leaveViewLight();\n    oldLFrame.isParent = true;\n    oldLFrame.tView = null;\n    oldLFrame.selectedIndex = -1;\n    oldLFrame.contextLView = null;\n    oldLFrame.elementDepthCount = 0;\n    oldLFrame.currentDirectiveIndex = -1;\n    oldLFrame.currentNamespace = null;\n    oldLFrame.bindingRootIndex = -1;\n    oldLFrame.bindingIndex = -1;\n    oldLFrame.currentQueryIndex = 0;\n}\nfunction nextContextImpl(level) {\n    const contextLView = instructionState.lFrame.contextLView =\n        walkUpViews(level, instructionState.lFrame.contextLView);\n    return contextLView[CONTEXT];\n}\nfunction walkUpViews(nestingLevel, currentView) {\n    while (nestingLevel > 0) {\n        ngDevMode &&\n            assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.');\n        currentView = currentView[DECLARATION_VIEW];\n        nestingLevel--;\n    }\n    return currentView;\n}\n/**\n * Gets the currently selected element index.\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nfunction getSelectedIndex() {\n    return instructionState.lFrame.selectedIndex;\n}\n/**\n * Sets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n *\n * (Note that if an \"exit function\" was set earlier (via `setElementExitFn()`) then that will be\n * run if and when the provided `index` value is different from the current selected index value.)\n */\nfunction setSelectedIndex(index) {\n    ngDevMode && index !== -1 &&\n        assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).');\n    ngDevMode &&\n        assertLessThan(index, instructionState.lFrame.lView.length, 'Can\\'t set index passed end of LView');\n    instructionState.lFrame.selectedIndex = index;\n}\n/**\n * Gets the `tNode` that represents currently selected element.\n */\nfunction getSelectedTNode() {\n    const lFrame = instructionState.lFrame;\n    return getTNode(lFrame.tView, lFrame.selectedIndex);\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceSVG() {\n    instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceMathML() {\n    instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;\n}\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceHTML() {\n    namespaceHTMLInternal();\n}\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n */\nfunction namespaceHTMLInternal() {\n    instructionState.lFrame.currentNamespace = null;\n}\nfunction getNamespace() {\n    return instructionState.lFrame.currentNamespace;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.\n *\n * Must be run *only* on the first template pass.\n *\n * Sets up the pre-order hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * @param directiveIndex The index of the directive in LView\n * @param directiveDef The definition containing the hooks to setup in tView\n * @param tView The current TView\n */\nfunction registerPreOrderHooks(directiveIndex, directiveDef, tView) {\n    ngDevMode && assertFirstCreatePass(tView);\n    const { ngOnChanges, ngOnInit, ngDoCheck } = directiveDef.type.prototype;\n    if (ngOnChanges) {\n        const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);\n        (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges);\n        (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = []))\n            .push(directiveIndex, wrappedOnChanges);\n    }\n    if (ngOnInit) {\n        (tView.preOrderHooks || (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit);\n    }\n    if (ngDoCheck) {\n        (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck);\n        (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck);\n    }\n}\n/**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\nfunction registerPostOrderHooks(tView, tNode) {\n    ngDevMode && assertFirstCreatePass(tView);\n    // It's necessary to loop through the directives at elementEnd() (rather than processing in\n    // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n    // hooks for projected components and directives must be called *before* their hosts.\n    for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n        const directiveDef = tView.data[i];\n        ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef');\n        const lifecycleHooks = directiveDef.type.prototype;\n        const { ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy } = lifecycleHooks;\n        if (ngAfterContentInit) {\n            (tView.contentHooks || (tView.contentHooks = [])).push(-i, ngAfterContentInit);\n        }\n        if (ngAfterContentChecked) {\n            (tView.contentHooks || (tView.contentHooks = [])).push(i, ngAfterContentChecked);\n            (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked);\n        }\n        if (ngAfterViewInit) {\n            (tView.viewHooks || (tView.viewHooks = [])).push(-i, ngAfterViewInit);\n        }\n        if (ngAfterViewChecked) {\n            (tView.viewHooks || (tView.viewHooks = [])).push(i, ngAfterViewChecked);\n            (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked);\n        }\n        if (ngOnDestroy != null) {\n            (tView.destroyHooks || (tView.destroyHooks = [])).push(i, ngOnDestroy);\n        }\n    }\n}\n/**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the  array\n * They are are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n/**\n * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were\n * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read\n * / write of the init-hooks related flags.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction executeCheckHooks(lView, hooks, nodeIndex) {\n    callHooks(lView, hooks, 3 /* InitPhaseCompleted */, nodeIndex);\n}\n/**\n * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,\n * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param initPhase A phase for which hooks should be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {\n    ngDevMode &&\n        assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once');\n    if ((lView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) {\n        callHooks(lView, hooks, initPhase, nodeIndex);\n    }\n}\nfunction incrementInitPhaseFlags(lView, initPhase) {\n    ngDevMode &&\n        assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');\n    let flags = lView[FLAGS];\n    if ((flags & 3 /* InitPhaseStateMask */) === initPhase) {\n        flags &= 2047 /* IndexWithinInitPhaseReset */;\n        flags += 1 /* InitPhaseStateIncrementer */;\n        lView[FLAGS] = flags;\n    }\n}\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction callHooks(currentView, arr, initPhase, currentNodeIndex) {\n    ngDevMode &&\n        assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.');\n    const startIndex = currentNodeIndex !== undefined ?\n        (currentView[PREORDER_HOOK_FLAGS] & 65535 /* IndexOfTheNextPreOrderHookMaskMask */) :\n        0;\n    const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n    const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1\n    let lastNodeIndexFound = 0;\n    for (let i = startIndex; i < max; i++) {\n        const hook = arr[i + 1];\n        if (typeof hook === 'number') {\n            lastNodeIndexFound = arr[i];\n            if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n                break;\n            }\n        }\n        else {\n            const isInitHook = arr[i] < 0;\n            if (isInitHook)\n                currentView[PREORDER_HOOK_FLAGS] += 65536 /* NumberOfInitHooksCalledIncrementer */;\n            if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n                callHook(currentView, initPhase, arr, i);\n                currentView[PREORDER_HOOK_FLAGS] =\n                    (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* NumberOfInitHooksCalledMask */) + i +\n                        2;\n            }\n            i++;\n        }\n    }\n}\n/**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\nfunction callHook(currentView, initPhase, arr, i) {\n    const isInitHook = arr[i] < 0;\n    const hook = arr[i + 1];\n    const directiveIndex = isInitHook ? -arr[i] : arr[i];\n    const directive = currentView[directiveIndex];\n    if (isInitHook) {\n        const indexWithintInitPhase = currentView[FLAGS] >> 11 /* IndexWithinInitPhaseShift */;\n        // The init phase state must be always checked here as it may have been recursively updated.\n        if (indexWithintInitPhase <\n            (currentView[PREORDER_HOOK_FLAGS] >> 16 /* NumberOfInitHooksCalledShift */) &&\n            (currentView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) {\n            currentView[FLAGS] += 2048 /* IndexWithinInitPhaseIncrementer */;\n            profiler(4 /* LifecycleHookStart */, directive, hook);\n            try {\n                hook.call(directive);\n            }\n            finally {\n                profiler(5 /* LifecycleHookEnd */, directive, hook);\n            }\n        }\n    }\n    else {\n        profiler(4 /* LifecycleHookStart */, directive, hook);\n        try {\n            hook.call(directive);\n        }\n        finally {\n            profiler(5 /* LifecycleHookEnd */, directive, hook);\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NO_PARENT_INJECTOR = -1;\n/**\n * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in\n * `TView.data`. This allows us to store information about the current node's tokens (which\n * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be\n * shared, so they live in `LView`).\n *\n * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter\n * determines whether a directive is available on the associated node or not. This prevents us\n * from searching the directives array at this level unless it's probable the directive is in it.\n *\n * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.\n *\n * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed\n * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`\n * will differ based on where it is flattened into the main array, so it's not possible to know\n * the indices ahead of time and save their types here. The interfaces are still included here\n * for documentation purposes.\n *\n * export interface LInjector extends Array<any> {\n *\n *    // Cumulative bloom for directive IDs 0-31  (IDs are % BLOOM_SIZE)\n *    [0]: number;\n *\n *    // Cumulative bloom for directive IDs 32-63\n *    [1]: number;\n *\n *    // Cumulative bloom for directive IDs 64-95\n *    [2]: number;\n *\n *    // Cumulative bloom for directive IDs 96-127\n *    [3]: number;\n *\n *    // Cumulative bloom for directive IDs 128-159\n *    [4]: number;\n *\n *    // Cumulative bloom for directive IDs 160 - 191\n *    [5]: number;\n *\n *    // Cumulative bloom for directive IDs 192 - 223\n *    [6]: number;\n *\n *    // Cumulative bloom for directive IDs 224 - 255\n *    [7]: number;\n *\n *    // We need to store a reference to the injector's parent so DI can keep looking up\n *    // the injector tree until it finds the dependency it's looking for.\n *    [PARENT_INJECTOR]: number;\n * }\n *\n * export interface TInjector extends Array<any> {\n *\n *    // Shared node bloom for directive IDs 0-31  (IDs are % BLOOM_SIZE)\n *    [0]: number;\n *\n *    // Shared node bloom for directive IDs 32-63\n *    [1]: number;\n *\n *    // Shared node bloom for directive IDs 64-95\n *    [2]: number;\n *\n *    // Shared node bloom for directive IDs 96-127\n *    [3]: number;\n *\n *    // Shared node bloom for directive IDs 128-159\n *    [4]: number;\n *\n *    // Shared node bloom for directive IDs 160 - 191\n *    [5]: number;\n *\n *    // Shared node bloom for directive IDs 192 - 223\n *    [6]: number;\n *\n *    // Shared node bloom for directive IDs 224 - 255\n *    [7]: number;\n *\n *    // Necessary to find directive indices for a particular node.\n *    [TNODE]: TElementNode|TElementContainerNode|TContainerNode;\n *  }\n */\n/**\n * Factory for creating instances of injectors in the NodeInjector.\n *\n * This factory is complicated by the fact that it can resolve `multi` factories as well.\n *\n * NOTE: Some of the fields are optional which means that this class has two hidden classes.\n * - One without `multi` support (most common)\n * - One with `multi` values, (rare).\n *\n * Since VMs can cache up to 4 inline hidden classes this is OK.\n *\n * - Single factory: Only `resolving` and `factory` is defined.\n * - `providers` factory: `componentProviders` is a number and `index = -1`.\n * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.\n */\nclass NodeInjectorFactory {\n    constructor(\n    /**\n     * Factory to invoke in order to create a new instance.\n     */\n    factory, \n    /**\n     * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n     */\n    isViewProvider, injectImplementation) {\n        this.factory = factory;\n        /**\n         * Marker set to true during factory invocation to see if we get into recursive loop.\n         * Recursive loop causes an error to be displayed.\n         */\n        this.resolving = false;\n        ngDevMode && assertDefined(factory, 'Factory not specified');\n        ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.');\n        this.canSeeViewProviders = isViewProvider;\n        this.injectImpl = injectImplementation;\n    }\n}\nfunction isFactory(obj) {\n    return obj instanceof NodeInjectorFactory;\n}\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$3 = 1;\n\n/**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\nfunction toTNodeTypeAsString(tNodeType) {\n    let text = '';\n    (tNodeType & 1 /* Text */) && (text += '|Text');\n    (tNodeType & 2 /* Element */) && (text += '|Element');\n    (tNodeType & 4 /* Container */) && (text += '|Container');\n    (tNodeType & 8 /* ElementContainer */) && (text += '|ElementContainer');\n    (tNodeType & 16 /* Projection */) && (text += '|Projection');\n    (tNodeType & 32 /* Icu */) && (text += '|IcuContainer');\n    (tNodeType & 64 /* Placeholder */) && (text += '|Placeholder');\n    return text.length > 0 ? text.substring(1) : text;\n}\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$4 = 1;\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```\n * <div my-dir [class]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n *   @Input()\n *   class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nfunction hasClassInput(tNode) {\n    return (tNode.flags & 16 /* hasClassInput */) !== 0;\n}\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```\n * <div my-dir [style]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n *   @Input()\n *   class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nfunction hasStyleInput(tNode) {\n    return (tNode.flags & 32 /* hasStyleInput */) !== 0;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction assertTNodeType(tNode, expectedTypes, message) {\n    assertDefined(tNode, 'should be called with a TNode');\n    if ((tNode.type & expectedTypes) === 0) {\n        throwError(message ||\n            `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${toTNodeTypeAsString(tNode.type)}.`);\n    }\n}\nfunction assertPureTNodeType(type) {\n    if (!(type === 2 /* Element */ || //\n        type === 1 /* Text */ || //\n        type === 4 /* Container */ || //\n        type === 8 /* ElementContainer */ || //\n        type === 32 /* Icu */ || //\n        type === 16 /* Projection */ || //\n        type === 64 /* Placeholder */)) {\n        throwError(`Expected TNodeType to have only a single type selected, but got ${toTNodeTypeAsString(type)}.`);\n    }\n}\n\n/**\n * Assigns all attribute values to the provided element via the inferred renderer.\n *\n * This function accepts two forms of attribute entries:\n *\n * default: (key, value):\n *  attrs = [key1, value1, key2, value2]\n *\n * namespaced: (NAMESPACE_MARKER, uri, name, value)\n *  attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]\n *\n * The `attrs` array can contain a mix of both the default and namespaced entries.\n * The \"default\" values are set without a marker, but if the function comes across\n * a marker value then it will attempt to set a namespaced value. If the marker is\n * not of a namespaced value then the function will quit and return the index value\n * where it stopped during the iteration of the attrs array.\n *\n * See [AttributeMarker] to understand what the namespace marker value is.\n *\n * Note that this instruction does not support assigning style and class values to\n * an element. See `elementStart` and `elementHostAttrs` to learn how styling values\n * are applied to an element.\n * @param renderer The renderer to be used\n * @param native The element that the attributes will be assigned to\n * @param attrs The attribute array of values that will be assigned to the element\n * @returns the index value that was last accessed in the attributes array\n */\nfunction setUpAttributes(renderer, native, attrs) {\n    const isProc = isProceduralRenderer(renderer);\n    let i = 0;\n    while (i < attrs.length) {\n        const value = attrs[i];\n        if (typeof value === 'number') {\n            // only namespaces are supported. Other value types (such as style/class\n            // entries) are not supported in this function.\n            if (value !== 0 /* NamespaceURI */) {\n                break;\n            }\n            // we just landed on the marker value ... therefore\n            // we should skip to the next entry\n            i++;\n            const namespaceURI = attrs[i++];\n            const attrName = attrs[i++];\n            const attrVal = attrs[i++];\n            ngDevMode && ngDevMode.rendererSetAttribute++;\n            isProc ?\n                renderer.setAttribute(native, attrName, attrVal, namespaceURI) :\n                native.setAttributeNS(namespaceURI, attrName, attrVal);\n        }\n        else {\n            // attrName is string;\n            const attrName = value;\n            const attrVal = attrs[++i];\n            // Standard attributes\n            ngDevMode && ngDevMode.rendererSetAttribute++;\n            if (isAnimationProp(attrName)) {\n                if (isProc) {\n                    renderer.setProperty(native, attrName, attrVal);\n                }\n            }\n            else {\n                isProc ?\n                    renderer.setAttribute(native, attrName, attrVal) :\n                    native.setAttribute(attrName, attrVal);\n            }\n            i++;\n        }\n    }\n    // another piece of code may iterate over the same attributes array. Therefore\n    // it may be helpful to return the exact spot where the attributes array exited\n    // whether by running into an unsupported marker or if all the static values were\n    // iterated over.\n    return i;\n}\n/**\n * Test whether the given value is a marker that indicates that the following\n * attribute values in a `TAttributes` array are only the names of attributes,\n * and not name-value pairs.\n * @param marker The attribute marker to test.\n * @returns true if the marker is a \"name-only\" marker (e.g. `Bindings`, `Template` or `I18n`).\n */\nfunction isNameOnlyAttributeMarker(marker) {\n    return marker === 3 /* Bindings */ || marker === 4 /* Template */ ||\n        marker === 6 /* I18n */;\n}\nfunction isAnimationProp(name) {\n    // Perf note: accessing charCodeAt to check for the first character of a string is faster as\n    // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that\n    // charCodeAt doesn't allocate memory to return a substring.\n    return name.charCodeAt(0) === 64 /* AT_SIGN */;\n}\n/**\n * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process.\n *\n * This merge function keeps the order of attrs same.\n *\n * @param dst Location of where the merged `TAttributes` should end up.\n * @param src `TAttributes` which should be appended to `dst`\n */\nfunction mergeHostAttrs(dst, src) {\n    if (src === null || src.length === 0) {\n        // do nothing\n    }\n    else if (dst === null || dst.length === 0) {\n        // We have source, but dst is empty, just make a copy.\n        dst = src.slice();\n    }\n    else {\n        let srcMarker = -1 /* ImplicitAttributes */;\n        for (let i = 0; i < src.length; i++) {\n            const item = src[i];\n            if (typeof item === 'number') {\n                srcMarker = item;\n            }\n            else {\n                if (srcMarker === 0 /* NamespaceURI */) {\n                    // Case where we need to consume `key1`, `key2`, `value` items.\n                }\n                else if (srcMarker === -1 /* ImplicitAttributes */ ||\n                    srcMarker === 2 /* Styles */) {\n                    // Case where we have to consume `key1` and `value` only.\n                    mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n                }\n                else {\n                    // Case where we have to consume `key1` only.\n                    mergeHostAttribute(dst, srcMarker, item, null, null);\n                }\n            }\n        }\n    }\n    return dst;\n}\n/**\n * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account.\n *\n * @param dst `TAttributes` to append to.\n * @param marker Region where the `key`/`value` should be added.\n * @param key1 Key to add to `TAttributes`\n * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`)\n * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class.\n */\nfunction mergeHostAttribute(dst, marker, key1, key2, value) {\n    let i = 0;\n    // Assume that new markers will be inserted at the end.\n    let markerInsertPosition = dst.length;\n    // scan until correct type.\n    if (marker === -1 /* ImplicitAttributes */) {\n        markerInsertPosition = -1;\n    }\n    else {\n        while (i < dst.length) {\n            const dstValue = dst[i++];\n            if (typeof dstValue === 'number') {\n                if (dstValue === marker) {\n                    markerInsertPosition = -1;\n                    break;\n                }\n                else if (dstValue > marker) {\n                    // We need to save this as we want the markers to be inserted in specific order.\n                    markerInsertPosition = i - 1;\n                    break;\n                }\n            }\n        }\n    }\n    // search until you find place of insertion\n    while (i < dst.length) {\n        const item = dst[i];\n        if (typeof item === 'number') {\n            // since `i` started as the index after the marker, we did not find it if we are at the next\n            // marker\n            break;\n        }\n        else if (item === key1) {\n            // We already have same token\n            if (key2 === null) {\n                if (value !== null) {\n                    dst[i + 1] = value;\n                }\n                return;\n            }\n            else if (key2 === dst[i + 1]) {\n                dst[i + 2] = value;\n                return;\n            }\n        }\n        // Increment counter.\n        i++;\n        if (key2 !== null)\n            i++;\n        if (value !== null)\n            i++;\n    }\n    // insert at location.\n    if (markerInsertPosition !== -1) {\n        dst.splice(markerInsertPosition, 0, marker);\n        i = markerInsertPosition + 1;\n    }\n    dst.splice(i++, 0, key1);\n    if (key2 !== null) {\n        dst.splice(i++, 0, key2);\n    }\n    if (value !== null) {\n        dst.splice(i++, 0, value);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nfunction hasParentInjector(parentLocation) {\n    return parentLocation !== NO_PARENT_INJECTOR;\n}\nfunction getParentInjectorIndex(parentLocation) {\n    ngDevMode && assertNumber(parentLocation, 'Number expected');\n    ngDevMode && assertNotEqual(parentLocation, -1, 'Not a valid state.');\n    const parentInjectorIndex = parentLocation & 32767 /* InjectorIndexMask */;\n    ngDevMode &&\n        assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.');\n    return parentLocation & 32767 /* InjectorIndexMask */;\n}\nfunction getParentInjectorViewOffset(parentLocation) {\n    return parentLocation >> 16 /* ViewOffsetShift */;\n}\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the view is found that contains the parent\n * injector.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @returns The LView instance that contains the parent injector\n */\nfunction getParentInjectorView(location, startView) {\n    let viewOffset = getParentInjectorViewOffset(location);\n    let parentView = startView;\n    // For most cases, the parent injector can be found on the host node (e.g. for component\n    // or container), but we must keep the loop here to support the rarer case of deeply nested\n    // <ng-template> tags or inline views, where the parent injector might live many views\n    // above the child injector.\n    while (viewOffset > 0) {\n        parentView = parentView[DECLARATION_VIEW];\n        viewOffset--;\n    }\n    return parentView;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines if the call to `inject` should include `viewProviders` in its resolution.\n *\n * This is set to true when we try to instantiate a component. This value is reset in\n * `getNodeInjectable` to a value which matches the declaration location of the token about to be\n * instantiated. This is done so that if we are injecting a token which was declared outside of\n * `viewProviders` we don't accidentally pull `viewProviders` in.\n *\n * Example:\n *\n * ```\n * @Injectable()\n * class MyService {\n *   constructor(public value: String) {}\n * }\n *\n * @Component({\n *   providers: [\n *     MyService,\n *     {provide: String, value: 'providers' }\n *   ]\n *   viewProviders: [\n *     {provide: String, value: 'viewProviders'}\n *   ]\n * })\n * class MyComponent {\n *   constructor(myService: MyService, value: String) {\n *     // We expect that Component can see into `viewProviders`.\n *     expect(value).toEqual('viewProviders');\n *     // `MyService` was not declared in `viewProviders` hence it can't see it.\n *     expect(myService.value).toEqual('providers');\n *   }\n * }\n *\n * ```\n */\nlet includeViewProviders = true;\nfunction setIncludeViewProviders(v) {\n    const oldValue = includeViewProviders;\n    includeViewProviders = v;\n    return oldValue;\n}\n/**\n * The number of slots in each bloom filter (used by DI). The larger this number, the fewer\n * directives that will share slots, and thus, the fewer false positives when checking for\n * the existence of a directive.\n */\nconst BLOOM_SIZE = 256;\nconst BLOOM_MASK = BLOOM_SIZE - 1;\n/**\n * The number of bits that is represented by a single bloom bucket. JS bit operations are 32 bits,\n * so each bucket represents 32 distinct tokens which accounts for log2(32) = 5 bits of a bloom hash\n * number.\n */\nconst BLOOM_BUCKET_BITS = 5;\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n/**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injectorIndex The index of the node injector where this token should be registered\n * @param tView The TView for the injector's bloom filters\n * @param type The directive token to register\n */\nfunction bloomAdd(injectorIndex, tView, type) {\n    ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n    let id;\n    if (typeof type === 'string') {\n        id = type.charCodeAt(0) || 0;\n    }\n    else if (type.hasOwnProperty(NG_ELEMENT_ID)) {\n        id = type[NG_ELEMENT_ID];\n    }\n    // Set a unique ID on the directive type, so if something tries to inject the directive,\n    // we can easily retrieve the ID and hash it into the bloom bit that should be checked.\n    if (id == null) {\n        id = type[NG_ELEMENT_ID] = nextNgElementId++;\n    }\n    // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),\n    // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.\n    const bloomHash = id & BLOOM_MASK;\n    // Create a mask that targets the specific bit associated with the directive.\n    // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n    // to bit positions 0 - 31 in a 32 bit integer.\n    const mask = 1 << bloomHash;\n    // Each bloom bucket in `tData` represents `BLOOM_BUCKET_BITS` number of bits of `bloomHash`.\n    // Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset that the mask\n    // should be written to.\n    tView.data[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask;\n}\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param tNode for which an injector should be retrieved / created.\n * @param lView View where the node is stored\n * @returns Node injector\n */\nfunction getOrCreateNodeInjectorForNode(tNode, lView) {\n    const existingInjectorIndex = getInjectorIndex(tNode, lView);\n    if (existingInjectorIndex !== -1) {\n        return existingInjectorIndex;\n    }\n    const tView = lView[TVIEW];\n    if (tView.firstCreatePass) {\n        tNode.injectorIndex = lView.length;\n        insertBloom(tView.data, tNode); // foundation for node bloom\n        insertBloom(lView, null); // foundation for cumulative bloom\n        insertBloom(tView.blueprint, null);\n    }\n    const parentLoc = getParentInjectorLocation(tNode, lView);\n    const injectorIndex = tNode.injectorIndex;\n    // If a parent injector can't be found, its location is set to -1.\n    // In that case, we don't need to set up a cumulative bloom\n    if (hasParentInjector(parentLoc)) {\n        const parentIndex = getParentInjectorIndex(parentLoc);\n        const parentLView = getParentInjectorView(parentLoc, lView);\n        const parentData = parentLView[TVIEW].data;\n        // Creates a cumulative bloom filter that merges the parent's bloom filter\n        // and its own cumulative bloom (which contains tokens for all ancestors)\n        for (let i = 0; i < 8 /* BLOOM_SIZE */; i++) {\n            lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n        }\n    }\n    lView[injectorIndex + 8 /* PARENT */] = parentLoc;\n    return injectorIndex;\n}\nfunction insertBloom(arr, footer) {\n    arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\nfunction getInjectorIndex(tNode, lView) {\n    if (tNode.injectorIndex === -1 ||\n        // If the injector index is the same as its parent's injector index, then the index has been\n        // copied down from the parent node. No injector has been created yet on this node.\n        (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) ||\n        // After the first template pass, the injector index might exist but the parent values\n        // might not have been calculated yet for this instance\n        lView[tNode.injectorIndex + 8 /* PARENT */] === null) {\n        return -1;\n    }\n    else {\n        ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);\n        return tNode.injectorIndex;\n    }\n}\n/**\n * Finds the index of the parent injector, with a view offset if applicable. Used to set the\n * parent injector initially.\n *\n * @returns Returns a number that is the combination of the number of LViews that we have to go up\n * to find the LView containing the parent inject AND the index of the injector within that LView.\n */\nfunction getParentInjectorLocation(tNode, lView) {\n    if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n        // If we have a parent `TNode` and there is an injector associated with it we are done, because\n        // the parent injector is within the current `LView`.\n        return tNode.parent.injectorIndex; // ViewOffset is 0\n    }\n    // When parent injector location is computed it may be outside of the current view. (ie it could\n    // be pointing to a declared parent location). This variable stores number of declaration parents\n    // we need to walk up in order to find the parent injector location.\n    let declarationViewOffset = 0;\n    let parentTNode = null;\n    let lViewCursor = lView;\n    // The parent injector is not in the current `LView`. We will have to walk the declared parent\n    // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent\n    // `NodeInjector`.\n    while (lViewCursor !== null) {\n        // First determine the `parentTNode` location. The parent pointer differs based on `TView.type`.\n        const tView = lViewCursor[TVIEW];\n        const tViewType = tView.type;\n        if (tViewType === 2 /* Embedded */) {\n            ngDevMode &&\n                assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n            parentTNode = tView.declTNode;\n        }\n        else if (tViewType === 1 /* Component */) {\n            // Components don't have `TView.declTNode` because each instance of component could be\n            // inserted in different location, hence `TView.declTNode` is meaningless.\n            parentTNode = lViewCursor[T_HOST];\n        }\n        else {\n            ngDevMode && assertEqual(tView.type, 0 /* Root */, 'Root type expected');\n            parentTNode = null;\n        }\n        if (parentTNode === null) {\n            // If we have no parent, than we are done.\n            return NO_PARENT_INJECTOR;\n        }\n        ngDevMode && parentTNode && assertTNodeForLView(parentTNode, lViewCursor[DECLARATION_VIEW]);\n        // Every iteration of the loop requires that we go to the declared parent.\n        declarationViewOffset++;\n        lViewCursor = lViewCursor[DECLARATION_VIEW];\n        if (parentTNode.injectorIndex !== -1) {\n            // We found a NodeInjector which points to something.\n            return (parentTNode.injectorIndex |\n                (declarationViewOffset << 16 /* ViewOffsetShift */));\n        }\n    }\n    return NO_PARENT_INJECTOR;\n}\n/**\n * Makes a type or an injection token public to the DI system by adding it to an\n * injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param token The type or the injection token to be made public\n */\nfunction diPublicInInjector(injectorIndex, tView, token) {\n    bloomAdd(injectorIndex, tView, token);\n}\n/**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n *  at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n *   constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ɵcmp = defineComponent({\n *   factory: () => new MyComponent(injectAttribute('title'))\n *   ...\n * })\n * ```\n *\n * @publicApi\n */\nfunction injectAttributeImpl(tNode, attrNameToInject) {\n    ngDevMode && assertTNodeType(tNode, 12 /* AnyContainer */ | 3 /* AnyRNode */);\n    ngDevMode && assertDefined(tNode, 'expecting tNode');\n    if (attrNameToInject === 'class') {\n        return tNode.classes;\n    }\n    if (attrNameToInject === 'style') {\n        return tNode.styles;\n    }\n    const attrs = tNode.attrs;\n    if (attrs) {\n        const attrsLength = attrs.length;\n        let i = 0;\n        while (i < attrsLength) {\n            const value = attrs[i];\n            // If we hit a `Bindings` or `Template` marker then we are done.\n            if (isNameOnlyAttributeMarker(value))\n                break;\n            // Skip namespaced attributes\n            if (value === 0 /* NamespaceURI */) {\n                // we skip the next two values\n                // as namespaced attributes looks like\n                // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',\n                // 'existValue', ...]\n                i = i + 2;\n            }\n            else if (typeof value === 'number') {\n                // Skip to the first value of the marked attribute.\n                i++;\n                while (i < attrsLength && typeof attrs[i] === 'string') {\n                    i++;\n                }\n            }\n            else if (value === attrNameToInject) {\n                return attrs[i + 1];\n            }\n            else {\n                i = i + 2;\n            }\n        }\n    }\n    return null;\n}\nfunction notFoundValueOrThrow(notFoundValue, token, flags) {\n    if (flags & InjectFlags.Optional) {\n        return notFoundValue;\n    }\n    else {\n        throwProviderNotFoundError(token, 'NodeInjector');\n    }\n}\n/**\n * Returns the value associated to the given token from the ModuleInjector or throws exception\n *\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector or throws an exception\n */\nfunction lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {\n    if (flags & InjectFlags.Optional && notFoundValue === undefined) {\n        // This must be set or the NullInjector will throw for optional deps\n        notFoundValue = null;\n    }\n    if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {\n        const moduleInjector = lView[INJECTOR];\n        // switch to `injectInjectorOnly` implementation for module injector, since module injector\n        // should not have access to Component/Directive DI scope (that may happen through\n        // `directiveInject` implementation)\n        const previousInjectImplementation = setInjectImplementation(undefined);\n        try {\n            if (moduleInjector) {\n                return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);\n            }\n            else {\n                return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);\n            }\n        }\n        finally {\n            setInjectImplementation(previousInjectImplementation);\n        }\n    }\n    return notFoundValueOrThrow(notFoundValue, token, flags);\n}\n/**\n * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.\n *\n * Look for the injector providing the token by walking up the node injector tree and then\n * the module injector tree.\n *\n * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom\n * filter. `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) {\n    if (tNode !== null) {\n        const bloomHash = bloomHashBitOrFactory(token);\n        // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef\n        // so just call the factory function to create it.\n        if (typeof bloomHash === 'function') {\n            if (!enterDI(lView, tNode, flags)) {\n                // Failed to enter DI, try module injector instead. If a token is injected with the @Host\n                // flag, the module injector is not searched for that token in Ivy.\n                return (flags & InjectFlags.Host) ?\n                    notFoundValueOrThrow(notFoundValue, token, flags) :\n                    lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n            }\n            try {\n                const value = bloomHash(flags);\n                if (value == null && !(flags & InjectFlags.Optional)) {\n                    throwProviderNotFoundError(token);\n                }\n                else {\n                    return value;\n                }\n            }\n            finally {\n                leaveDI();\n            }\n        }\n        else if (typeof bloomHash === 'number') {\n            // A reference to the previous injector TView that was found while climbing the element\n            // injector tree. This is used to know if viewProviders can be accessed on the current\n            // injector.\n            let previousTView = null;\n            let injectorIndex = getInjectorIndex(tNode, lView);\n            let parentLocation = NO_PARENT_INJECTOR;\n            let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;\n            // If we should skip this injector, or if there is no injector on this node, start by\n            // searching the parent injector.\n            if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n                parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :\n                    lView[injectorIndex + 8 /* PARENT */];\n                if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {\n                    injectorIndex = -1;\n                }\n                else {\n                    previousTView = lView[TVIEW];\n                    injectorIndex = getParentInjectorIndex(parentLocation);\n                    lView = getParentInjectorView(parentLocation, lView);\n                }\n            }\n            // Traverse up the injector tree until we find a potential match or until we know there\n            // *isn't* a match.\n            while (injectorIndex !== -1) {\n                ngDevMode && assertNodeInjector(lView, injectorIndex);\n                // Check the current injector. If it matches, see if it contains token.\n                const tView = lView[TVIEW];\n                ngDevMode &&\n                    assertTNodeForLView(tView.data[injectorIndex + 8 /* TNODE */], lView);\n                if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n                    // At this point, we have an injector which *may* contain the token, so we step through\n                    // the providers and directives associated with the injector's corresponding node to get\n                    // the instance.\n                    const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n                    if (instance !== NOT_FOUND) {\n                        return instance;\n                    }\n                }\n                parentLocation = lView[injectorIndex + 8 /* PARENT */];\n                if (parentLocation !== NO_PARENT_INJECTOR &&\n                    shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* TNODE */] === hostTElementNode) &&\n                    bloomHasToken(bloomHash, injectorIndex, lView)) {\n                    // The def wasn't found anywhere on this node, so it was a false positive.\n                    // Traverse up the tree and continue searching.\n                    previousTView = tView;\n                    injectorIndex = getParentInjectorIndex(parentLocation);\n                    lView = getParentInjectorView(parentLocation, lView);\n                }\n                else {\n                    // If we should not search parent OR If the ancestor bloom filter value does not have the\n                    // bit corresponding to the directive we can give up on traversing up to find the specific\n                    // injector.\n                    injectorIndex = -1;\n                }\n            }\n        }\n    }\n    return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n}\nconst NOT_FOUND = {};\nfunction createNodeInjector() {\n    return new NodeInjector(getCurrentTNode(), getLView());\n}\nfunction searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {\n    const currentTView = lView[TVIEW];\n    const tNode = currentTView.data[injectorIndex + 8 /* TNODE */];\n    // First, we need to determine if view providers can be accessed by the starting element.\n    // There are two possibilities\n    const canAccessViewProviders = previousTView == null ?\n        // 1) This is the first invocation `previousTView == null` which means that we are at the\n        // `TNode` of where injector is starting to look. In such a case the only time we are allowed\n        // to look into the ViewProviders is if:\n        // - we are on a component\n        // - AND the injector set `includeViewProviders` to true (implying that the token can see\n        // ViewProviders because it is the Component or a Service which itself was declared in\n        // ViewProviders)\n        (isComponentHost(tNode) && includeViewProviders) :\n        // 2) `previousTView != null` which means that we are now walking across the parent nodes.\n        // In such a case we are only allowed to look into the ViewProviders if:\n        // - We just crossed from child View to Parent View `previousTView != currentTView`\n        // - AND the parent TNode is an Element.\n        // This means that we just came from the Component's View and therefore are allowed to see\n        // into the ViewProviders.\n        (previousTView != currentTView && ((tNode.type & 3 /* AnyRNode */) !== 0));\n    // This special case happens when there is a @host on the inject and when we are searching\n    // on the host element node.\n    const isHostSpecialCase = (flags & InjectFlags.Host) && hostTElementNode === tNode;\n    const injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n    if (injectableIdx !== null) {\n        return getNodeInjectable(lView, currentTView, injectableIdx, tNode);\n    }\n    else {\n        return NOT_FOUND;\n    }\n}\n/**\n * Searches for the given token among the node's directives and providers.\n *\n * @param tNode TNode on which directives are present.\n * @param tView The tView we are currently processing\n * @param token Provider token or type of a directive to look for.\n * @param canAccessViewProviders Whether view providers should be considered.\n * @param isHostSpecialCase Whether the host special case applies.\n * @returns Index of a found directive or provider, or null when none found.\n */\nfunction locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {\n    const nodeProviderIndexes = tNode.providerIndexes;\n    const tInjectables = tView.data;\n    const injectablesStart = nodeProviderIndexes & 1048575 /* ProvidersStartIndexMask */;\n    const directivesStart = tNode.directiveStart;\n    const directiveEnd = tNode.directiveEnd;\n    const cptViewProvidersCount = nodeProviderIndexes >> 20 /* CptViewProvidersCountShift */;\n    const startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;\n    // When the host special case applies, only the viewProviders and the component are visible\n    const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n    for (let i = startingIndex; i < endIndex; i++) {\n        const providerTokenOrDef = tInjectables[i];\n        if (i < directivesStart && token === providerTokenOrDef ||\n            i >= directivesStart && providerTokenOrDef.type === token) {\n            return i;\n        }\n    }\n    if (isHostSpecialCase) {\n        const dirDef = tInjectables[directivesStart];\n        if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n            return directivesStart;\n        }\n    }\n    return null;\n}\n/**\n * Retrieve or instantiate the injectable from the `LView` at particular `index`.\n *\n * This function checks to see if the value has already been instantiated and if so returns the\n * cached `injectable`. Otherwise if it detects that the value is still a factory it\n * instantiates the `injectable` and caches the value.\n */\nfunction getNodeInjectable(lView, tView, index, tNode) {\n    let value = lView[index];\n    const tData = tView.data;\n    if (isFactory(value)) {\n        const factory = value;\n        if (factory.resolving) {\n            throwCyclicDependencyError(stringifyForError(tData[index]));\n        }\n        const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n        factory.resolving = true;\n        const previousInjectImplementation = factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null;\n        const success = enterDI(lView, tNode, InjectFlags.Default);\n        ngDevMode &&\n            assertEqual(success, true, 'Because flags do not contain \\`SkipSelf\\' we expect this to always succeed.');\n        try {\n            value = lView[index] = factory.factory(undefined, tData, lView, tNode);\n            // This code path is hit for both directives and providers.\n            // For perf reasons, we want to avoid searching for hooks on providers.\n            // It does no harm to try (the hooks just won't exist), but the extra\n            // checks are unnecessary and this is a hot path. So we check to see\n            // if the index of the dependency is in the directive range for this\n            // tNode. If it's not, we know it's a provider and skip hook registration.\n            if (tView.firstCreatePass && index >= tNode.directiveStart) {\n                ngDevMode && assertDirectiveDef(tData[index]);\n                registerPreOrderHooks(index, tData[index], tView);\n            }\n        }\n        finally {\n            previousInjectImplementation !== null &&\n                setInjectImplementation(previousInjectImplementation);\n            setIncludeViewProviders(previousIncludeViewProviders);\n            factory.resolving = false;\n            leaveDI();\n        }\n    }\n    return value;\n}\n/**\n * Returns the bit in an injector's bloom filter that should be used to determine whether or not\n * the directive might be provided by the injector.\n *\n * When a directive is public, it is added to the bloom filter and given a unique ID that can be\n * retrieved on the Type. When the directive isn't public or the token is not a directive `null`\n * is returned as the node injector can not possibly provide that token.\n *\n * @param token the injection token\n * @returns the matching bit to check in the bloom filter or `null` if the token is not known.\n *   When the returned value is negative then it represents special values such as `Injector`.\n */\nfunction bloomHashBitOrFactory(token) {\n    ngDevMode && assertDefined(token, 'token must be defined');\n    if (typeof token === 'string') {\n        return token.charCodeAt(0) || 0;\n    }\n    const tokenId = \n    // First check with `hasOwnProperty` so we don't get an inherited ID.\n    token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : undefined;\n    // Negative token IDs are used for special objects such as `Injector`\n    if (typeof tokenId === 'number') {\n        if (tokenId >= 0) {\n            return tokenId & BLOOM_MASK;\n        }\n        else {\n            ngDevMode &&\n                assertEqual(tokenId, -1 /* Injector */, 'Expecting to get Special Injector Id');\n            return createNodeInjector;\n        }\n    }\n    else {\n        return tokenId;\n    }\n}\nfunction bloomHasToken(bloomHash, injectorIndex, injectorView) {\n    // Create a mask that targets the specific bit associated with the directive we're looking for.\n    // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n    // to bit positions 0 - 31 in a 32 bit integer.\n    const mask = 1 << bloomHash;\n    // Each bloom bucket in `injectorView` represents `BLOOM_BUCKET_BITS` number of bits of\n    // `bloomHash`. Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset\n    // that should be used.\n    const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)];\n    // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n    // this injector is a potential match.\n    return !!(value & mask);\n}\n/** Returns true if flags prevent parent injector from being searched for tokens */\nfunction shouldSearchParent(flags, isFirstHostTNode) {\n    return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\nclass NodeInjector {\n    constructor(_tNode, _lView) {\n        this._tNode = _tNode;\n        this._lView = _lView;\n    }\n    get(token, notFoundValue) {\n        return getOrCreateInjectable(this._tNode, this._lView, token, undefined, notFoundValue);\n    }\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵgetInheritedFactory(type) {\n    return noSideEffects(() => {\n        const ownConstructor = type.prototype.constructor;\n        const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);\n        const objectPrototype = Object.prototype;\n        let parent = Object.getPrototypeOf(type.prototype).constructor;\n        // Go up the prototype until we hit `Object`.\n        while (parent && parent !== objectPrototype) {\n            const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent);\n            // If we hit something that has a factory and the factory isn't the same as the type,\n            // we've found the inherited factory. Note the check that the factory isn't the type's\n            // own factory is redundant in most cases, but if the user has custom decorators on the\n            // class, this lookup will start one level down in the prototype chain, causing us to\n            // find the own factory first and potentially triggering an infinite loop downstream.\n            if (factory && factory !== ownFactory) {\n                return factory;\n            }\n            parent = Object.getPrototypeOf(parent);\n        }\n        // There is no factory defined. Either this was improper usage of inheritance\n        // (no Angular decorator on the superclass) or there is no constructor at all\n        // in the inheritance chain. Since the two cases cannot be distinguished, the\n        // latter has to be assumed.\n        return t => new t();\n    });\n}\nfunction getFactoryOf(type) {\n    if (isForwardRef(type)) {\n        return () => {\n            const factory = getFactoryOf(resolveForwardRef(type));\n            return factory && factory();\n        };\n    }\n    return getFactoryDef(type);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nfunction ɵɵinjectAttribute(attrNameToInject) {\n    return injectAttributeImpl(getCurrentTNode(), attrNameToInject);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ANNOTATIONS = '__annotations__';\nconst PARAMETERS = '__parameters__';\nconst PROP_METADATA = '__prop__metadata__';\n/**\n * @suppress {globalThis}\n */\nfunction makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {\n    return noSideEffects(() => {\n        const metaCtor = makeMetadataCtor(props);\n        function DecoratorFactory(...args) {\n            if (this instanceof DecoratorFactory) {\n                metaCtor.call(this, ...args);\n                return this;\n            }\n            const annotationInstance = new DecoratorFactory(...args);\n            return function TypeDecorator(cls) {\n                if (typeFn)\n                    typeFn(cls, ...args);\n                // Use of Object.defineProperty is important since it creates non-enumerable property which\n                // prevents the property is copied during subclassing.\n                const annotations = cls.hasOwnProperty(ANNOTATIONS) ?\n                    cls[ANNOTATIONS] :\n                    Object.defineProperty(cls, ANNOTATIONS, { value: [] })[ANNOTATIONS];\n                annotations.push(annotationInstance);\n                if (additionalProcessing)\n                    additionalProcessing(cls);\n                return cls;\n            };\n        }\n        if (parentClass) {\n            DecoratorFactory.prototype = Object.create(parentClass.prototype);\n        }\n        DecoratorFactory.prototype.ngMetadataName = name;\n        DecoratorFactory.annotationCls = DecoratorFactory;\n        return DecoratorFactory;\n    });\n}\nfunction makeMetadataCtor(props) {\n    return function ctor(...args) {\n        if (props) {\n            const values = props(...args);\n            for (const propName in values) {\n                this[propName] = values[propName];\n            }\n        }\n    };\n}\nfunction makeParamDecorator(name, props, parentClass) {\n    return noSideEffects(() => {\n        const metaCtor = makeMetadataCtor(props);\n        function ParamDecoratorFactory(...args) {\n            if (this instanceof ParamDecoratorFactory) {\n                metaCtor.apply(this, args);\n                return this;\n            }\n            const annotationInstance = new ParamDecoratorFactory(...args);\n            ParamDecorator.annotation = annotationInstance;\n            return ParamDecorator;\n            function ParamDecorator(cls, unusedKey, index) {\n                // Use of Object.defineProperty is important since it creates non-enumerable property which\n                // prevents the property is copied during subclassing.\n                const parameters = cls.hasOwnProperty(PARAMETERS) ?\n                    cls[PARAMETERS] :\n                    Object.defineProperty(cls, PARAMETERS, { value: [] })[PARAMETERS];\n                // there might be gaps if some in between parameters do not have annotations.\n                // we pad with nulls.\n                while (parameters.length <= index) {\n                    parameters.push(null);\n                }\n                (parameters[index] = parameters[index] || []).push(annotationInstance);\n                return cls;\n            }\n        }\n        if (parentClass) {\n            ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n        }\n        ParamDecoratorFactory.prototype.ngMetadataName = name;\n        ParamDecoratorFactory.annotationCls = ParamDecoratorFactory;\n        return ParamDecoratorFactory;\n    });\n}\nfunction makePropDecorator(name, props, parentClass, additionalProcessing) {\n    return noSideEffects(() => {\n        const metaCtor = makeMetadataCtor(props);\n        function PropDecoratorFactory(...args) {\n            if (this instanceof PropDecoratorFactory) {\n                metaCtor.apply(this, args);\n                return this;\n            }\n            const decoratorInstance = new PropDecoratorFactory(...args);\n            function PropDecorator(target, name) {\n                const constructor = target.constructor;\n                // Use of Object.defineProperty is important because it creates a non-enumerable property\n                // which prevents the property from being copied during subclassing.\n                const meta = constructor.hasOwnProperty(PROP_METADATA) ?\n                    constructor[PROP_METADATA] :\n                    Object.defineProperty(constructor, PROP_METADATA, { value: {} })[PROP_METADATA];\n                meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n                meta[name].unshift(decoratorInstance);\n                if (additionalProcessing)\n                    additionalProcessing(target, name, ...args);\n            }\n            return PropDecorator;\n        }\n        if (parentClass) {\n            PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n        }\n        PropDecoratorFactory.prototype.ngMetadataName = name;\n        PropDecoratorFactory.annotationCls = PropDecoratorFactory;\n        return PropDecoratorFactory;\n    });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction CREATE_ATTRIBUTE_DECORATOR__PRE_R3__() {\n    return makeParamDecorator('Attribute', (attributeName) => ({ attributeName }));\n}\nfunction CREATE_ATTRIBUTE_DECORATOR__POST_R3__() {\n    return makeParamDecorator('Attribute', (attributeName) => ({ attributeName, __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName) }));\n}\nconst CREATE_ATTRIBUTE_DECORATOR_IMPL = CREATE_ATTRIBUTE_DECORATOR__POST_R3__;\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Attribute = CREATE_ATTRIBUTE_DECORATOR_IMPL();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides additional level of type safety.\n *\n * ```\n * interface MyInterface {...}\n * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));\n * // myInterface is inferred to be MyInterface.\n * ```\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the `inject` function. See below for an example.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As\n * mentioned above, `'root'` is the default value for `providedIn`.\n *\n * @usageNotes\n * ### Basic Example\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n *\n * @publicApi\n */\nclass InjectionToken {\n    constructor(_desc, options) {\n        this._desc = _desc;\n        /** @internal */\n        this.ngMetadataName = 'InjectionToken';\n        this.ɵprov = undefined;\n        if (typeof options == 'number') {\n            (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                assertLessThan(options, 0, 'Only negative numbers are supported here');\n            // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n            // See `InjectorMarkers`\n            this.__NG_ELEMENT_ID__ = options;\n        }\n        else if (options !== undefined) {\n            this.ɵprov = ɵɵdefineInjectable({\n                token: this,\n                providedIn: options.providedIn || 'root',\n                factory: options.factory,\n            });\n        }\n    }\n    toString() {\n        return `InjectionToken ${this._desc}`;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A DI token that you can use to create a virtual [provider](guide/glossary#provider)\n * that will populate the `entryComponents` field of components and NgModules\n * based on its `useValue` property value.\n * All components that are referenced in the `useValue` value (either directly\n * or in a nested array or map) are added to the `entryComponents` property.\n *\n * @usageNotes\n *\n * The following example shows how the router can populate the `entryComponents`\n * field of an NgModule based on a router configuration that refers\n * to components.\n *\n * ```typescript\n * // helper function inside the router\n * function provideRoutes(routes) {\n *   return [\n *     {provide: ROUTES, useValue: routes},\n *     {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}\n *   ];\n * }\n *\n * // user code\n * let routes = [\n *   {path: '/root', component: RootComp},\n *   {path: '/teams', component: TeamsComp}\n * ];\n *\n * @NgModule({\n *   providers: [provideRoutes(routes)]\n * })\n * class ModuleWithRoutes {}\n * ```\n *\n * @publicApi\n * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.\n */\nconst ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents');\n// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\nconst emitDistinctChangesOnlyDefaultValue = true;\n/**\n * Base class for query metadata.\n *\n * @see `ContentChildren`.\n * @see `ContentChild`.\n * @see `ViewChildren`.\n * @see `ViewChild`.\n *\n * @publicApi\n */\nclass Query {\n}\nconst ɵ0$1 = (selector, data = {}) => (Object.assign({ selector, first: false, isViewQuery: false, descendants: false, emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue }, data));\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nconst ContentChildren = makePropDecorator('ContentChildren', ɵ0$1, Query);\nconst ɵ1 = (selector, data = {}) => (Object.assign({ selector, first: true, isViewQuery: false, descendants: true }, data));\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\nconst ContentChild = makePropDecorator('ContentChild', ɵ1, Query);\nconst ɵ2 = (selector, data = {}) => (Object.assign({ selector, first: false, isViewQuery: true, descendants: true, emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue }, data));\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChildren = makePropDecorator('ViewChildren', ɵ2, Query);\nconst ɵ3 = (selector, data) => (Object.assign({ selector, first: true, isViewQuery: true, descendants: true }, data));\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChild = makePropDecorator('ViewChild', ɵ3, Query);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar FactoryTarget;\n(function (FactoryTarget) {\n    FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n    FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n    FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n    FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n    FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n})(FactoryTarget || (FactoryTarget = {}));\nvar ViewEncapsulation$1;\n(function (ViewEncapsulation) {\n    ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n    // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n    ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n    ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation$1 || (ViewEncapsulation$1 = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getCompilerFacade(request) {\n    const globalNg = _global['ng'];\n    if (globalNg && globalNg.ɵcompilerFacade) {\n        return globalNg.ɵcompilerFacade;\n    }\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        // Log the type as an error so that a developer can easily navigate to the type from the\n        // console.\n        console.error(`JIT compilation failed for ${request.kind}`, request.type);\n        let message = `The ${request.kind} '${request\n            .type.name}' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.\\n\\n`;\n        if (request.usage === 1 /* PartialDeclaration */) {\n            message += `The ${request.kind} is part of a library that has been partially compiled.\\n`;\n            message +=\n                `However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.\\n`;\n            message += '\\n';\n            message +=\n                `Ideally, the library is processed using the Angular Linker to become fully AOT compiled.\\n`;\n        }\n        else {\n            message +=\n                `JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.\\n`;\n        }\n        message +=\n            `Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',\\n`;\n        message +=\n            `or manually provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`;\n        throw new Error(message);\n    }\n    else {\n        throw new Error('JIT compiler unavailable');\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\nconst Type = Function;\nfunction isType(v) {\n    return typeof v === 'function';\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Equivalent to ES6 spread, add each item to an array.\n *\n * @param items The items to add\n * @param arr The array to which you want to add the items\n */\nfunction addAllToArray(items, arr) {\n    for (let i = 0; i < items.length; i++) {\n        arr.push(items[i]);\n    }\n}\n/**\n * Determines if the contents of two arrays is identical\n *\n * @param a first array\n * @param b second array\n * @param identityAccessor Optional function for extracting stable object identity from a value in\n *     the array.\n */\nfunction arrayEquals(a, b, identityAccessor) {\n    if (a.length !== b.length)\n        return false;\n    for (let i = 0; i < a.length; i++) {\n        let valueA = a[i];\n        let valueB = b[i];\n        if (identityAccessor) {\n            valueA = identityAccessor(valueA);\n            valueB = identityAccessor(valueB);\n        }\n        if (valueB !== valueA) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Flattens an array.\n */\nfunction flatten(list, dst) {\n    if (dst === undefined)\n        dst = list;\n    for (let i = 0; i < list.length; i++) {\n        let item = list[i];\n        if (Array.isArray(item)) {\n            // we need to inline it.\n            if (dst === list) {\n                // Our assumption that the list was already flat was wrong and\n                // we need to clone flat since we need to write to it.\n                dst = list.slice(0, i);\n            }\n            flatten(item, dst);\n        }\n        else if (dst !== list) {\n            dst.push(item);\n        }\n    }\n    return dst;\n}\nfunction deepForEach(input, fn) {\n    input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));\n}\nfunction addToArray(arr, index, value) {\n    // perf: array.push is faster than array.splice!\n    if (index >= arr.length) {\n        arr.push(value);\n    }\n    else {\n        arr.splice(index, 0, value);\n    }\n}\nfunction removeFromArray(arr, index) {\n    // perf: array.pop is faster than array.splice!\n    if (index >= arr.length - 1) {\n        return arr.pop();\n    }\n    else {\n        return arr.splice(index, 1)[0];\n    }\n}\nfunction newArray(size, value) {\n    const list = [];\n    for (let i = 0; i < size; i++) {\n        list.push(value);\n    }\n    return list;\n}\n/**\n * Remove item from array (Same as `Array.splice()` but faster.)\n *\n * `Array.splice()` is not as fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * https://jsperf.com/fast-array-splice (About 20x faster)\n *\n * @param array Array to splice\n * @param index Index of element in array to remove.\n * @param count Number of items to remove.\n */\nfunction arraySplice(array, index, count) {\n    const length = array.length - count;\n    while (index < length) {\n        array[index] = array[index + count];\n        index++;\n    }\n    while (count--) {\n        array.pop(); // shrink the array\n    }\n}\n/**\n * Same as `Array.splice(index, 0, value)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value Value to add to array.\n */\nfunction arrayInsert(array, index, value) {\n    ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n    let end = array.length;\n    while (end > index) {\n        const previousEnd = end - 1;\n        array[end] = array[previousEnd];\n        end = previousEnd;\n    }\n    array[index] = value;\n}\n/**\n * Same as `Array.splice2(index, 0, value1, value2)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value1 Value to add to array.\n * @param value2 Value to add to array.\n */\nfunction arrayInsert2(array, index, value1, value2) {\n    ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n    let end = array.length;\n    if (end == index) {\n        // inserting at the end.\n        array.push(value1, value2);\n    }\n    else if (end === 1) {\n        // corner case when we have less items in array than we have items to insert.\n        array.push(value2, array[0]);\n        array[0] = value1;\n    }\n    else {\n        end--;\n        array.push(array[end - 1], array[end]);\n        while (end > index) {\n            const previousEnd = end - 2;\n            array[end] = array[previousEnd];\n            end--;\n        }\n        array[index] = value1;\n        array[index + 1] = value2;\n    }\n}\n/**\n * Insert a `value` into an `array` so that the array remains sorted.\n *\n * NOTE:\n * - Duplicates are not allowed, and are ignored.\n * - This uses binary search algorithm for fast inserts.\n *\n * @param array A sorted array to insert into.\n * @param value The value to insert.\n * @returns index of the inserted value.\n */\nfunction arrayInsertSorted(array, value) {\n    let index = arrayIndexOfSorted(array, value);\n    if (index < 0) {\n        // if we did not find it insert it.\n        index = ~index;\n        arrayInsert(array, index, value);\n    }\n    return index;\n}\n/**\n * Remove `value` from a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to remove from.\n * @param value The value to remove.\n * @returns index of the removed value.\n *   - positive index if value found and removed.\n *   - negative index if value not found. (`~index` to get the value where it should have been\n *     inserted)\n */\nfunction arrayRemoveSorted(array, value) {\n    const index = arrayIndexOfSorted(array, value);\n    if (index >= 0) {\n        arraySplice(array, index, 1);\n    }\n    return index;\n}\n/**\n * Get an index of an `value` in a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @returns index of the value.\n *   - positive index if value found.\n *   - negative index if value not found. (`~index` to get the value where it should have been\n *     located)\n */\nfunction arrayIndexOfSorted(array, value) {\n    return _arrayIndexOfSorted(array, value, 0);\n}\n/**\n * Set a `value` for a `key`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or create.\n * @param value The value to set for a `key`.\n * @returns index (always even) of where the value vas set.\n */\nfunction keyValueArraySet(keyValueArray, key, value) {\n    let index = keyValueArrayIndexOf(keyValueArray, key);\n    if (index >= 0) {\n        // if we found it set it.\n        keyValueArray[index | 1] = value;\n    }\n    else {\n        index = ~index;\n        arrayInsert2(keyValueArray, index, key, value);\n    }\n    return index;\n}\n/**\n * Retrieve a `value` for a `key` (on `undefined` if not found.)\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @return The `value` stored at the `key` location or `undefined if not found.\n */\nfunction keyValueArrayGet(keyValueArray, key) {\n    const index = keyValueArrayIndexOf(keyValueArray, key);\n    if (index >= 0) {\n        // if we found it retrieve it.\n        return keyValueArray[index | 1];\n    }\n    return undefined;\n}\n/**\n * Retrieve a `key` index value in the array or `-1` if not found.\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @returns index of where the key is (or should have been.)\n *   - positive (even) index if key found.\n *   - negative index if key not found. (`~index` (even) to get the index where it should have\n *     been inserted.)\n */\nfunction keyValueArrayIndexOf(keyValueArray, key) {\n    return _arrayIndexOfSorted(keyValueArray, key, 1);\n}\n/**\n * Delete a `key` (and `value`) from the `KeyValueArray`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or delete (if exist).\n * @returns index of where the key was (or should have been.)\n *   - positive (even) index if key found and deleted.\n *   - negative index if key not found. (`~index` (even) to get the index where it should have\n *     been.)\n */\nfunction keyValueArrayDelete(keyValueArray, key) {\n    const index = keyValueArrayIndexOf(keyValueArray, key);\n    if (index >= 0) {\n        // if we found it remove it.\n        arraySplice(keyValueArray, index, 2);\n    }\n    return index;\n}\n/**\n * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @param shift grouping shift.\n *   - `0` means look at every location\n *   - `1` means only look at every other (even) location (the odd locations are to be ignored as\n *         they are values.)\n * @returns index of the value.\n *   - positive index if value found.\n *   - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nfunction _arrayIndexOfSorted(array, value, shift) {\n    ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n    let start = 0;\n    let end = array.length >> shift;\n    while (end !== start) {\n        const middle = start + ((end - start) >> 1); // find the middle.\n        const current = array[middle << shift];\n        if (value === current) {\n            return (middle << shift);\n        }\n        else if (current > value) {\n            end = middle;\n        }\n        else {\n            start = middle + 1; // We already searched middle so make it non-inclusive by adding 1\n        }\n    }\n    return ~(end << shift);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/*\n * #########################\n * Attention: These Regular expressions have to hold even if the code is minified!\n * ##########################\n */\n/**\n * Regular expression that detects pass-through constructors for ES5 output. This Regex\n * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also\n * it intends to capture the pattern where existing constructors have been downleveled from\n * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g.\n *\n * ```\n *   function MyClass() {\n *     var _this = _super.apply(this, arguments) || this;\n * ```\n *\n * downleveled to ES5 with `downlevelIteration` for TypeScript < 4.2:\n * ```\n *   function MyClass() {\n *     var _this = _super.apply(this, __spread(arguments)) || this;\n * ```\n *\n * or downleveled to ES5 with `downlevelIteration` for TypeScript >= 4.2:\n * ```\n *   function MyClass() {\n *     var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;\n * ```\n *\n * More details can be found in: https://github.com/angular/angular/issues/38453.\n */\nconst ES5_DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*(arguments|(?:[^()]+\\(\\[\\],)?[^()]+\\(arguments\\))\\)/;\n/** Regular expression that detects ES2015 classes which extend from other classes. */\nconst ES2015_INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes and\n * have an explicit constructor defined.\n */\nconst ES2015_INHERITED_CLASS_WITH_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes\n * and inherit a constructor.\n */\nconst ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{\\s*super\\(\\.\\.\\.arguments\\)/;\n/**\n * Determine whether a stringified type is a class which delegates its constructor\n * to its parent.\n *\n * This is not trivial since compiled code can actually contain a constructor function\n * even if the original source code did not. For instance, when the child class contains\n * an initialized instance property.\n */\nfunction isDelegateCtor(typeStr) {\n    return ES5_DELEGATE_CTOR.test(typeStr) ||\n        ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) ||\n        (ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr));\n}\nclass ReflectionCapabilities {\n    constructor(reflect) {\n        this._reflect = reflect || _global['Reflect'];\n    }\n    isReflectionEnabled() {\n        return true;\n    }\n    factory(t) {\n        return (...args) => new t(...args);\n    }\n    /** @internal */\n    _zipTypesAndAnnotations(paramTypes, paramAnnotations) {\n        let result;\n        if (typeof paramTypes === 'undefined') {\n            result = newArray(paramAnnotations.length);\n        }\n        else {\n            result = newArray(paramTypes.length);\n        }\n        for (let i = 0; i < result.length; i++) {\n            // TS outputs Object for parameters without types, while Traceur omits\n            // the annotations. For now we preserve the Traceur behavior to aid\n            // migration, but this can be revisited.\n            if (typeof paramTypes === 'undefined') {\n                result[i] = [];\n            }\n            else if (paramTypes[i] && paramTypes[i] != Object) {\n                result[i] = [paramTypes[i]];\n            }\n            else {\n                result[i] = [];\n            }\n            if (paramAnnotations && paramAnnotations[i] != null) {\n                result[i] = result[i].concat(paramAnnotations[i]);\n            }\n        }\n        return result;\n    }\n    _ownParameters(type, parentCtor) {\n        const typeStr = type.toString();\n        // If we have no decorators, we only have function.length as metadata.\n        // In that case, to detect whether a child class declared an own constructor or not,\n        // we need to look inside of that constructor to check whether it is\n        // just calling the parent.\n        // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n        // that sets 'design:paramtypes' to []\n        // if a class inherits from another class but has no ctor declared itself.\n        if (isDelegateCtor(typeStr)) {\n            return null;\n        }\n        // Prefer the direct API.\n        if (type.parameters && type.parameters !== parentCtor.parameters) {\n            return type.parameters;\n        }\n        // API of tsickle for lowering decorators to properties on the class.\n        const tsickleCtorParams = type.ctorParameters;\n        if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n            // Newer tsickle uses a function closure\n            // Retain the non-function case for compatibility with older tsickle\n            const ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n            const paramTypes = ctorParameters.map((ctorParam) => ctorParam && ctorParam.type);\n            const paramAnnotations = ctorParameters.map((ctorParam) => ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators));\n            return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n        }\n        // API for metadata created by invoking the decorators.\n        const paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];\n        const paramTypes = this._reflect && this._reflect.getOwnMetadata &&\n            this._reflect.getOwnMetadata('design:paramtypes', type);\n        if (paramTypes || paramAnnotations) {\n            return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n        }\n        // If a class has no decorators, at least create metadata\n        // based on function.length.\n        // Note: We know that this is a real constructor as we checked\n        // the content of the constructor above.\n        return newArray(type.length);\n    }\n    parameters(type) {\n        // Note: only report metadata if we have at least one class decorator\n        // to stay in sync with the static reflector.\n        if (!isType(type)) {\n            return [];\n        }\n        const parentCtor = getParentCtor(type);\n        let parameters = this._ownParameters(type, parentCtor);\n        if (!parameters && parentCtor !== Object) {\n            parameters = this.parameters(parentCtor);\n        }\n        return parameters || [];\n    }\n    _ownAnnotations(typeOrFunc, parentCtor) {\n        // Prefer the direct API.\n        if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n            let annotations = typeOrFunc.annotations;\n            if (typeof annotations === 'function' && annotations.annotations) {\n                annotations = annotations.annotations;\n            }\n            return annotations;\n        }\n        // API of tsickle for lowering decorators to properties on the class.\n        if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {\n            return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);\n        }\n        // API for metadata created by invoking the decorators.\n        if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n            return typeOrFunc[ANNOTATIONS];\n        }\n        return null;\n    }\n    annotations(typeOrFunc) {\n        if (!isType(typeOrFunc)) {\n            return [];\n        }\n        const parentCtor = getParentCtor(typeOrFunc);\n        const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n        const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n        return parentAnnotations.concat(ownAnnotations);\n    }\n    _ownPropMetadata(typeOrFunc, parentCtor) {\n        // Prefer the direct API.\n        if (typeOrFunc.propMetadata &&\n            typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n            let propMetadata = typeOrFunc.propMetadata;\n            if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n                propMetadata = propMetadata.propMetadata;\n            }\n            return propMetadata;\n        }\n        // API of tsickle for lowering decorators to properties on the class.\n        if (typeOrFunc.propDecorators &&\n            typeOrFunc.propDecorators !== parentCtor.propDecorators) {\n            const propDecorators = typeOrFunc.propDecorators;\n            const propMetadata = {};\n            Object.keys(propDecorators).forEach(prop => {\n                propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n            });\n            return propMetadata;\n        }\n        // API for metadata created by invoking the decorators.\n        if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n            return typeOrFunc[PROP_METADATA];\n        }\n        return null;\n    }\n    propMetadata(typeOrFunc) {\n        if (!isType(typeOrFunc)) {\n            return {};\n        }\n        const parentCtor = getParentCtor(typeOrFunc);\n        const propMetadata = {};\n        if (parentCtor !== Object) {\n            const parentPropMetadata = this.propMetadata(parentCtor);\n            Object.keys(parentPropMetadata).forEach((propName) => {\n                propMetadata[propName] = parentPropMetadata[propName];\n            });\n        }\n        const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n        if (ownPropMetadata) {\n            Object.keys(ownPropMetadata).forEach((propName) => {\n                const decorators = [];\n                if (propMetadata.hasOwnProperty(propName)) {\n                    decorators.push(...propMetadata[propName]);\n                }\n                decorators.push(...ownPropMetadata[propName]);\n                propMetadata[propName] = decorators;\n            });\n        }\n        return propMetadata;\n    }\n    ownPropMetadata(typeOrFunc) {\n        if (!isType(typeOrFunc)) {\n            return {};\n        }\n        return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n    }\n    hasLifecycleHook(type, lcProperty) {\n        return type instanceof Type && lcProperty in type.prototype;\n    }\n    guards(type) {\n        return {};\n    }\n    getter(name) {\n        return new Function('o', 'return o.' + name + ';');\n    }\n    setter(name) {\n        return new Function('o', 'v', 'return o.' + name + ' = v;');\n    }\n    method(name) {\n        const functionBody = `if (!o.${name}) throw new Error('\"${name}\" is undefined');\n        return o.${name}.apply(o, args);`;\n        return new Function('o', 'args', functionBody);\n    }\n    // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n    importUri(type) {\n        // StaticSymbol\n        if (typeof type === 'object' && type['filePath']) {\n            return type['filePath'];\n        }\n        // Runtime type\n        return `./${stringify(type)}`;\n    }\n    resourceUri(type) {\n        return `./${stringify(type)}`;\n    }\n    resolveIdentifier(name, moduleUrl, members, runtime) {\n        return runtime;\n    }\n    resolveEnum(enumIdentifier, name) {\n        return enumIdentifier[name];\n    }\n}\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n    if (!decoratorInvocations) {\n        return [];\n    }\n    return decoratorInvocations.map(decoratorInvocation => {\n        const decoratorType = decoratorInvocation.type;\n        const annotationCls = decoratorType.annotationCls;\n        const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n        return new annotationCls(...annotationArgs);\n    });\n}\nfunction getParentCtor(ctor) {\n    const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n    const parentCtor = parentProto ? parentProto.constructor : null;\n    // Note: We always use `Object` as the null value\n    // to simplify checking later on.\n    return parentCtor || Object;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _THROW_IF_NOT_FOUND = {};\nconst THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n/*\n * Name of a property (that we patch onto DI decorator), which is used as an annotation of which\n * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators\n * in the code, thus making them tree-shakable.\n */\nconst DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\nconst NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'ɵ';\nconst SOURCE = '__source';\nconst ɵ0$2 = getClosureSafeProperty;\nconst USE_VALUE = getClosureSafeProperty({ provide: String, useValue: ɵ0$2 });\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector = undefined;\nfunction setCurrentInjector(injector) {\n    const former = _currentInjector;\n    _currentInjector = injector;\n    return former;\n}\nfunction injectInjectorOnly(token, flags = InjectFlags.Default) {\n    if (_currentInjector === undefined) {\n        throw new Error(`inject() must be called from an injection context`);\n    }\n    else if (_currentInjector === null) {\n        return injectRootLimpMode(token, undefined, flags);\n    }\n    else {\n        return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);\n    }\n}\nfunction ɵɵinject(token, flags = InjectFlags.Default) {\n    return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags);\n}\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nfunction ɵɵinvalidFactoryDep(index) {\n    const msg = ngDevMode ?\n        `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${index} of the parameter list is invalid.\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\n\nPlease check that 1) the type for the parameter at index ${index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.` :\n        'invalid';\n    throw new Error(msg);\n}\n/**\n * Injects a token from the currently active injector.\n *\n * Must be used in the context of a factory function such as one defined for an\n * `InjectionToken`. Throws an error if not called from such a context.\n *\n * Within such a factory function, using this function to request injection of a dependency\n * is faster and more type-safe than providing an additional array of dependencies\n * (as has been common with `useFactory` providers).\n *\n * @param token The injection token for the dependency to be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.\n * @returns the injected value if injection is successful, `null` otherwise.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n * @publicApi\n */\nconst inject = ɵɵinject;\nfunction injectArgs(types) {\n    const args = [];\n    for (let i = 0; i < types.length; i++) {\n        const arg = resolveForwardRef(types[i]);\n        if (Array.isArray(arg)) {\n            if (arg.length === 0) {\n                throw new Error('Arguments array must have arguments.');\n            }\n            let type = undefined;\n            let flags = InjectFlags.Default;\n            for (let j = 0; j < arg.length; j++) {\n                const meta = arg[j];\n                const flag = getInjectFlag(meta);\n                if (typeof flag === 'number') {\n                    // Special case when we handle @Inject decorator.\n                    if (flag === -1 /* Inject */) {\n                        type = meta.token;\n                    }\n                    else {\n                        flags |= flag;\n                    }\n                }\n                else {\n                    type = meta;\n                }\n            }\n            args.push(ɵɵinject(type, flags));\n        }\n        else {\n            args.push(ɵɵinject(arg));\n        }\n    }\n    return args;\n}\n/**\n * Attaches a given InjectFlag to a given decorator using monkey-patching.\n * Since DI decorators can be used in providers `deps` array (when provider is configured using\n * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we\n * attach the flag to make it available both as a static property and as a field on decorator\n * instance.\n *\n * @param decorator Provided DI decorator.\n * @param flag InjectFlag that should be applied.\n */\nfunction attachInjectFlag(decorator, flag) {\n    decorator[DI_DECORATOR_FLAG] = flag;\n    decorator.prototype[DI_DECORATOR_FLAG] = flag;\n    return decorator;\n}\n/**\n * Reads monkey-patched property that contains InjectFlag attached to a decorator.\n *\n * @param token Token that may contain monkey-patched DI flags property.\n */\nfunction getInjectFlag(token) {\n    return token[DI_DECORATOR_FLAG];\n}\nfunction catchInjectorError(e, token, injectorErrorName, source) {\n    const tokenPath = e[NG_TEMP_TOKEN_PATH];\n    if (token[SOURCE]) {\n        tokenPath.unshift(token[SOURCE]);\n    }\n    e.message = formatError('\\n' + e.message, tokenPath, injectorErrorName, source);\n    e[NG_TOKEN_PATH] = tokenPath;\n    e[NG_TEMP_TOKEN_PATH] = null;\n    throw e;\n}\nfunction formatError(text, obj, injectorErrorName, source = null) {\n    text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;\n    let context = stringify(obj);\n    if (Array.isArray(obj)) {\n        context = obj.map(stringify).join(' -> ');\n    }\n    else if (typeof obj === 'object') {\n        let parts = [];\n        for (let key in obj) {\n            if (obj.hasOwnProperty(key)) {\n                let value = obj[key];\n                parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n            }\n        }\n        context = `{${parts.join(', ')}}`;\n    }\n    return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(NEW_LINE, '\\n  ')}`;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0$3 = (token) => ({ token });\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Inject = attachInjectFlag(\n// Disable tslint because `DecoratorFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nmakeParamDecorator('Inject', ɵ0$3), -1 /* Inject */);\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Optional = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('Optional'), 8 /* Optional */);\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Self = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('Self'), 2 /* Self */);\n/**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst SkipSelf = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('SkipSelf'), 4 /* SkipSelf */);\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Host = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('Host'), 1 /* Host */);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet _reflect = null;\nfunction getReflect() {\n    return (_reflect = _reflect || new ReflectionCapabilities());\n}\nfunction reflectDependencies(type) {\n    return convertDependencies(getReflect().parameters(type));\n}\nfunction convertDependencies(deps) {\n    return deps.map(dep => reflectDependency(dep));\n}\nfunction reflectDependency(dep) {\n    const meta = {\n        token: null,\n        attribute: null,\n        host: false,\n        optional: false,\n        self: false,\n        skipSelf: false,\n    };\n    if (Array.isArray(dep) && dep.length > 0) {\n        for (let j = 0; j < dep.length; j++) {\n            const param = dep[j];\n            if (param === undefined) {\n                // param may be undefined if type of dep is not set by ngtsc\n                continue;\n            }\n            const proto = Object.getPrototypeOf(param);\n            if (param instanceof Optional || proto.ngMetadataName === 'Optional') {\n                meta.optional = true;\n            }\n            else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') {\n                meta.skipSelf = true;\n            }\n            else if (param instanceof Self || proto.ngMetadataName === 'Self') {\n                meta.self = true;\n            }\n            else if (param instanceof Host || proto.ngMetadataName === 'Host') {\n                meta.host = true;\n            }\n            else if (param instanceof Inject) {\n                meta.token = param.token;\n            }\n            else if (param instanceof Attribute) {\n                if (param.attributeName === undefined) {\n                    throw new Error(`Attribute name must be defined.`);\n                }\n                meta.attribute = param.attributeName;\n            }\n            else {\n                meta.token = param;\n            }\n        }\n    }\n    else if (dep === undefined || (Array.isArray(dep) && dep.length === 0)) {\n        meta.token = null;\n    }\n    else {\n        meta.token = dep;\n    }\n    return meta;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n *   selector: 'my-comp',\n *   templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n *   // After resolution all URLs have been converted into `template` strings.\n *   renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\nfunction resolveComponentResources(resourceResolver) {\n    // Store all promises which are fetching the resources.\n    const componentResolved = [];\n    // Cache so that we don't fetch the same resource more than once.\n    const urlMap = new Map();\n    function cachedResourceResolve(url) {\n        let promise = urlMap.get(url);\n        if (!promise) {\n            const resp = resourceResolver(url);\n            urlMap.set(url, promise = resp.then(unwrapResponse));\n        }\n        return promise;\n    }\n    componentResourceResolutionQueue.forEach((component, type) => {\n        const promises = [];\n        if (component.templateUrl) {\n            promises.push(cachedResourceResolve(component.templateUrl).then((template) => {\n                component.template = template;\n            }));\n        }\n        const styleUrls = component.styleUrls;\n        const styles = component.styles || (component.styles = []);\n        const styleOffset = component.styles.length;\n        styleUrls && styleUrls.forEach((styleUrl, index) => {\n            styles.push(''); // pre-allocate array.\n            promises.push(cachedResourceResolve(styleUrl).then((style) => {\n                styles[styleOffset + index] = style;\n                styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n                if (styleUrls.length == 0) {\n                    component.styleUrls = undefined;\n                }\n            }));\n        });\n        const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type));\n        componentResolved.push(fullyResolved);\n    });\n    clearResolutionOfComponentResourcesQueue();\n    return Promise.all(componentResolved).then(() => undefined);\n}\nlet componentResourceResolutionQueue = new Map();\n// Track when existing ɵcmp for a Type is waiting on resources.\nconst componentDefPendingResolution = new Set();\nfunction maybeQueueResolutionOfComponentResources(type, metadata) {\n    if (componentNeedsResolution(metadata)) {\n        componentResourceResolutionQueue.set(type, metadata);\n        componentDefPendingResolution.add(type);\n    }\n}\nfunction isComponentDefPendingResolution(type) {\n    return componentDefPendingResolution.has(type);\n}\nfunction componentNeedsResolution(component) {\n    return !!((component.templateUrl && !component.hasOwnProperty('template')) ||\n        component.styleUrls && component.styleUrls.length);\n}\nfunction clearResolutionOfComponentResourcesQueue() {\n    const old = componentResourceResolutionQueue;\n    componentResourceResolutionQueue = new Map();\n    return old;\n}\nfunction restoreComponentResolutionQueue(queue) {\n    componentDefPendingResolution.clear();\n    queue.forEach((_, type) => componentDefPendingResolution.add(type));\n    componentResourceResolutionQueue = queue;\n}\nfunction isComponentResourceResolutionQueueEmpty() {\n    return componentResourceResolutionQueue.size === 0;\n}\nfunction unwrapResponse(response) {\n    return typeof response == 'string' ? response : response.text();\n}\nfunction componentDefResolved(type) {\n    componentDefPendingResolution.delete(type);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy;\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy() {\n    if (policy === undefined) {\n        policy = null;\n        if (_global.trustedTypes) {\n            try {\n                policy = _global.trustedTypes.createPolicy('angular', {\n                    createHTML: (s) => s,\n                    createScript: (s) => s,\n                    createScriptURL: (s) => s,\n                });\n            }\n            catch (_a) {\n                // trustedTypes.createPolicy throws if called with a name that is\n                // already registered, even in report-only mode. Until the API changes,\n                // catch the error not to break the applications functionally. In such\n                // cases, the code will fall back to using strings.\n            }\n        }\n    }\n    return policy;\n}\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will be interpreted as HTML by a browser, e.g. when assigning to\n * element.innerHTML.\n */\nfunction trustedHTMLFromString(html) {\n    var _a;\n    return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createHTML(html)) || html;\n}\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security In particular, it must be assured that the provided string will\n * never cause an XSS vulnerability if used in a context that will be\n * interpreted and executed as a script by a browser, e.g. when calling eval.\n */\nfunction trustedScriptFromString(script) {\n    var _a;\n    return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createScript(script)) || script;\n}\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will cause a browser to load and execute a resource, e.g. when\n * assigning to script.src.\n */\nfunction trustedScriptURLFromString(url) {\n    var _a;\n    return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createScriptURL(url)) || url;\n}\n/**\n * Unsafely call the Function constructor with the given string arguments. It\n * is only available in development mode, and should be stripped out of\n * production code.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only called from development code, as use in production code can lead to\n * XSS vulnerabilities.\n */\nfunction newTrustedFunctionForDev(...args) {\n    if (typeof ngDevMode === 'undefined') {\n        throw new Error('newTrustedFunctionForDev should never be called in production');\n    }\n    if (!_global.trustedTypes) {\n        // In environments that don't support Trusted Types, fall back to the most\n        // straightforward implementation:\n        return new Function(...args);\n    }\n    // Chrome currently does not support passing TrustedScript to the Function\n    // constructor. The following implements the workaround proposed on the page\n    // below, where the Chromium bug is also referenced:\n    // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor\n    const fnArgs = args.slice(0, -1).join(',');\n    const fnBody = args[args.length - 1];\n    const body = `(function anonymous(${fnArgs}\n) { ${fnBody}\n})`;\n    // Using eval directly confuses the compiler and prevents this module from\n    // being stripped out of JS binaries even if not used. The global['eval']\n    // indirection fixes that.\n    const fn = _global['eval'](trustedScriptFromString(body));\n    if (fn.bind === undefined) {\n        // Workaround for a browser bug that only exists in Chrome 83, where passing\n        // a TrustedScript to eval just returns the TrustedScript back without\n        // evaluating it. In that case, fall back to the most straightforward\n        // implementation:\n        return new Function(...args);\n    }\n    // To completely mimic the behavior of calling \"new Function\", two more\n    // things need to happen:\n    // 1. Stringifying the resulting function should return its source code\n    fn.toString = () => body;\n    // 2. When calling the resulting function, `this` should refer to `global`\n    return fn.bind(_global);\n    // When Trusted Types support in Function constructors is widely available,\n    // the implementation of this function can be simplified to:\n    // return new Function(...args.map(a => trustedScriptFromString(a)));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy$1;\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy$1() {\n    if (policy$1 === undefined) {\n        policy$1 = null;\n        if (_global.trustedTypes) {\n            try {\n                policy$1 = _global.trustedTypes\n                    .createPolicy('angular#unsafe-bypass', {\n                    createHTML: (s) => s,\n                    createScript: (s) => s,\n                    createScriptURL: (s) => s,\n                });\n            }\n            catch (_a) {\n                // trustedTypes.createPolicy throws if called with a name that is\n                // already registered, even in report-only mode. Until the API changes,\n                // catch the error not to break the applications functionally. In such\n                // cases, the code will fall back to using strings.\n            }\n        }\n    }\n    return policy$1;\n}\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nfunction trustedHTMLFromStringBypass(html) {\n    var _a;\n    return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createHTML(html)) || html;\n}\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nfunction trustedScriptFromStringBypass(script) {\n    var _a;\n    return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createScript(script)) || script;\n}\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nfunction trustedScriptURLFromStringBypass(url) {\n    var _a;\n    return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createScriptURL(url)) || url;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass SafeValueImpl {\n    constructor(changingThisBreaksApplicationSecurity) {\n        this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;\n    }\n    toString() {\n        return `SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}` +\n            ` (see https://g.co/ng/security#xss)`;\n    }\n}\nclass SafeHtmlImpl extends SafeValueImpl {\n    getTypeName() {\n        return \"HTML\" /* Html */;\n    }\n}\nclass SafeStyleImpl extends SafeValueImpl {\n    getTypeName() {\n        return \"Style\" /* Style */;\n    }\n}\nclass SafeScriptImpl extends SafeValueImpl {\n    getTypeName() {\n        return \"Script\" /* Script */;\n    }\n}\nclass SafeUrlImpl extends SafeValueImpl {\n    getTypeName() {\n        return \"URL\" /* Url */;\n    }\n}\nclass SafeResourceUrlImpl extends SafeValueImpl {\n    getTypeName() {\n        return \"ResourceURL\" /* ResourceUrl */;\n    }\n}\nfunction unwrapSafeValue(value) {\n    return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity :\n        value;\n}\nfunction allowSanitizationBypassAndThrow(value, type) {\n    const actualType = getSanitizationBypassType(value);\n    if (actualType != null && actualType !== type) {\n        // Allow ResourceURLs in URL contexts, they are strictly more trusted.\n        if (actualType === \"ResourceURL\" /* ResourceUrl */ && type === \"URL\" /* Url */)\n            return true;\n        throw new Error(`Required a safe ${type}, got a ${actualType} (see https://g.co/ng/security#xss)`);\n    }\n    return actualType === type;\n}\nfunction getSanitizationBypassType(value) {\n    return value instanceof SafeValueImpl && value.getTypeName() || null;\n}\n/**\n * Mark `html` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link htmlSanitizer} to be trusted implicitly.\n *\n * @param trustedHtml `html` string which needs to be implicitly trusted.\n * @returns a `html` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustHtml(trustedHtml) {\n    return new SafeHtmlImpl(trustedHtml);\n}\n/**\n * Mark `style` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link styleSanitizer} to be trusted implicitly.\n *\n * @param trustedStyle `style` string which needs to be implicitly trusted.\n * @returns a `style` hich has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustStyle(trustedStyle) {\n    return new SafeStyleImpl(trustedStyle);\n}\n/**\n * Mark `script` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link scriptSanitizer} to be trusted implicitly.\n *\n * @param trustedScript `script` string which needs to be implicitly trusted.\n * @returns a `script` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustScript(trustedScript) {\n    return new SafeScriptImpl(trustedScript);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link urlSanitizer} to be trusted implicitly.\n *\n * @param trustedUrl `url` string which needs to be implicitly trusted.\n * @returns a `url`  which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustUrl(trustedUrl) {\n    return new SafeUrlImpl(trustedUrl);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.\n *\n * @param trustedResourceUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustResourceUrl(trustedResourceUrl) {\n    return new SafeResourceUrlImpl(trustedResourceUrl);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This helper is used to get hold of an inert tree of DOM elements containing dirty HTML\n * that needs sanitizing.\n * Depending upon browser support we use one of two strategies for doing this.\n * Default: DOMParser strategy\n * Fallback: InertDocument strategy\n */\nfunction getInertBodyHelper(defaultDoc) {\n    const inertDocumentHelper = new InertDocumentHelper(defaultDoc);\n    return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper;\n}\n/**\n * Uses DOMParser to create and fill an inert body element.\n * This is the default strategy used in browsers that support it.\n */\nclass DOMParserHelper {\n    constructor(inertDocumentHelper) {\n        this.inertDocumentHelper = inertDocumentHelper;\n    }\n    getInertBodyElement(html) {\n        // We add these extra elements to ensure that the rest of the content is parsed as expected\n        // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n        // `<head>` tag. Note that the `<body>` tag is closed implicitly to prevent unclosed tags\n        // in `html` from consuming the otherwise explicit `</body>` tag.\n        html = '<body><remove></remove>' + html;\n        try {\n            const body = new window.DOMParser()\n                .parseFromString(trustedHTMLFromString(html), 'text/html')\n                .body;\n            if (body === null) {\n                // In some browsers (e.g. Mozilla/5.0 iPad AppleWebKit Mobile) the `body` property only\n                // becomes available in the following tick of the JS engine. In that case we fall back to\n                // the `inertDocumentHelper` instead.\n                return this.inertDocumentHelper.getInertBodyElement(html);\n            }\n            body.removeChild(body.firstChild);\n            return body;\n        }\n        catch (_a) {\n            return null;\n        }\n    }\n}\n/**\n * Use an HTML5 `template` element, if supported, or an inert body element created via\n * `createHtmlDocument` to create and fill an inert DOM element.\n * This is the fallback strategy if the browser does not support DOMParser.\n */\nclass InertDocumentHelper {\n    constructor(defaultDoc) {\n        this.defaultDoc = defaultDoc;\n        this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n        if (this.inertDocument.body == null) {\n            // usually there should be only one body element in the document, but IE doesn't have any, so\n            // we need to create one.\n            const inertHtml = this.inertDocument.createElement('html');\n            this.inertDocument.appendChild(inertHtml);\n            const inertBodyElement = this.inertDocument.createElement('body');\n            inertHtml.appendChild(inertBodyElement);\n        }\n    }\n    getInertBodyElement(html) {\n        // Prefer using <template> element if supported.\n        const templateEl = this.inertDocument.createElement('template');\n        if ('content' in templateEl) {\n            templateEl.innerHTML = trustedHTMLFromString(html);\n            return templateEl;\n        }\n        // Note that previously we used to do something like `this.inertDocument.body.innerHTML = html`\n        // and we returned the inert `body` node. This was changed, because IE seems to treat setting\n        // `innerHTML` on an inserted element differently, compared to one that hasn't been inserted\n        // yet. In particular, IE appears to split some of the text into multiple text nodes rather\n        // than keeping them in a single one which ends up messing with Ivy's i18n parsing further\n        // down the line. This has been worked around by creating a new inert `body` and using it as\n        // the root node in which we insert the HTML.\n        const inertBody = this.inertDocument.createElement('body');\n        inertBody.innerHTML = trustedHTMLFromString(html);\n        // Support: IE 11 only\n        // strip custom-namespaced attributes on IE<=11\n        if (this.defaultDoc.documentMode) {\n            this.stripCustomNsAttrs(inertBody);\n        }\n        return inertBody;\n    }\n    /**\n     * When IE11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'\n     * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.\n     * 'ns1:xlink:foo').\n     *\n     * This is undesirable since we don't want to allow any of these custom attributes. This method\n     * strips them all.\n     */\n    stripCustomNsAttrs(el) {\n        const elAttrs = el.attributes;\n        // loop backwards so that we can support removals.\n        for (let i = elAttrs.length - 1; 0 < i; i--) {\n            const attrib = elAttrs.item(i);\n            const attrName = attrib.name;\n            if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n                el.removeAttribute(attrName);\n            }\n        }\n        let childNode = el.firstChild;\n        while (childNode) {\n            if (childNode.nodeType === Node.ELEMENT_NODE)\n                this.stripCustomNsAttrs(childNode);\n            childNode = childNode.nextSibling;\n        }\n    }\n}\n/**\n * We need to determine whether the DOMParser exists in the global context and\n * supports parsing HTML; HTML parsing support is not as wide as other formats, see\n * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#Browser_compatibility.\n *\n * @suppress {uselessCode}\n */\nfunction isDOMParserAvailable() {\n    try {\n        return !!new window.DOMParser().parseFromString(trustedHTMLFromString(''), 'text/html');\n    }\n    catch (_a) {\n        return false;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either an allowed protocol (http, https, mailto or ftp).\n * (2) or no protocol.  A protocol must be followed by a colon. The below\n *     allows that by allowing colons only after one of the characters [/?#].\n *     A colon after a hash (#) must be in the fragment.\n *     Otherwise, a colon after a (?) must be in a query.\n *     Otherwise, a colon after a single solidus (/) must be in a path.\n *     Otherwise, a colon after a double solidus (//) must be in the authority\n *     (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"h&#116;tp\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo&lt;bar/baz\".  Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript&#58;...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;\n/* A pattern that matches safe srcset values */\nconst SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n/** A pattern that matches safe data URLs. Only matches image, video and audio types. */\nconst DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\\/]+=*$/i;\nfunction _sanitizeUrl(url) {\n    url = String(url);\n    if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN))\n        return url;\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        console.warn(`WARNING: sanitizing unsafe URL value ${url} (see https://g.co/ng/security#xss)`);\n    }\n    return 'unsafe:' + url;\n}\nfunction sanitizeSrcset(srcset) {\n    srcset = String(srcset);\n    return srcset.split(',').map((srcset) => _sanitizeUrl(srcset.trim())).join(', ');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction tagSet(tags) {\n    const res = {};\n    for (const t of tags.split(','))\n        res[t] = true;\n    return res;\n}\nfunction merge(...sets) {\n    const res = {};\n    for (const s of sets) {\n        for (const v in s) {\n            if (s.hasOwnProperty(v))\n                res[v] = true;\n        }\n    }\n    return res;\n}\n// Good source of info about elements and attributes\n// https://html.spec.whatwg.org/#semantics\n// https://simon.html5.org/html-elements\n// Safe Void Elements - HTML5\n// https://html.spec.whatwg.org/#void-elements\nconst VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');\n// Elements that you can, intentionally, leave open (and which close themselves)\n// https://html.spec.whatwg.org/#optional-tags\nconst OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nconst OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\nconst OPTIONAL_END_TAG_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n// Safe Block Elements - HTML5\nconst BLOCK_ELEMENTS = merge(OPTIONAL_END_TAG_BLOCK_ELEMENTS, tagSet('address,article,' +\n    'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +\n    'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul'));\n// Inline Elements - HTML5\nconst INLINE_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, tagSet('a,abbr,acronym,audio,b,' +\n    'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +\n    'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));\nconst VALID_ELEMENTS = merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n// Attributes that have href and hence need to be sanitized\nconst URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\n// Attributes that have special href set hence need to be sanitized\nconst SRCSET_ATTRS = tagSet('srcset');\nconst HTML_ATTRS = tagSet('abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' +\n    'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' +\n    'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' +\n    'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' +\n    'valign,value,vspace,width');\n// Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018)\nconst ARIA_ATTRS = tagSet('aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' +\n    'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' +\n    'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' +\n    'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' +\n    'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' +\n    'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' +\n    'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext');\n// NB: This currently consciously doesn't support SVG. SVG sanitization has had several security\n// issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via\n// innerHTML is required, SVG attributes should be added here.\n// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those\n// can be sanitized, but they increase security surface area without a legitimate use case, so they\n// are left out here.\nconst VALID_ATTRS = merge(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS, ARIA_ATTRS);\n// Elements whose content should not be traversed/preserved, if the elements themselves are invalid.\n//\n// Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve)\n// `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we\n// don't want to preserve the content, if the elements themselves are going to be removed.\nconst SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template');\n/**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\nclass SanitizingHtmlSerializer {\n    constructor() {\n        // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n        // because characters were re-encoded.\n        this.sanitizedSomething = false;\n        this.buf = [];\n    }\n    sanitizeChildren(el) {\n        // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.\n        // However this code never accesses properties off of `document` before deleting its contents\n        // again, so it shouldn't be vulnerable to DOM clobbering.\n        let current = el.firstChild;\n        let traverseContent = true;\n        while (current) {\n            if (current.nodeType === Node.ELEMENT_NODE) {\n                traverseContent = this.startElement(current);\n            }\n            else if (current.nodeType === Node.TEXT_NODE) {\n                this.chars(current.nodeValue);\n            }\n            else {\n                // Strip non-element, non-text nodes.\n                this.sanitizedSomething = true;\n            }\n            if (traverseContent && current.firstChild) {\n                current = current.firstChild;\n                continue;\n            }\n            while (current) {\n                // Leaving the element. Walk up and to the right, closing tags as we go.\n                if (current.nodeType === Node.ELEMENT_NODE) {\n                    this.endElement(current);\n                }\n                let next = this.checkClobberedElement(current, current.nextSibling);\n                if (next) {\n                    current = next;\n                    break;\n                }\n                current = this.checkClobberedElement(current, current.parentNode);\n            }\n        }\n        return this.buf.join('');\n    }\n    /**\n     * Sanitizes an opening element tag (if valid) and returns whether the element's contents should\n     * be traversed. Element content must always be traversed (even if the element itself is not\n     * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`.\n     *\n     * @param element The element to sanitize.\n     * @return True if the element's contents should be traversed.\n     */\n    startElement(element) {\n        const tagName = element.nodeName.toLowerCase();\n        if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n            this.sanitizedSomething = true;\n            return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);\n        }\n        this.buf.push('<');\n        this.buf.push(tagName);\n        const elAttrs = element.attributes;\n        for (let i = 0; i < elAttrs.length; i++) {\n            const elAttr = elAttrs.item(i);\n            const attrName = elAttr.name;\n            const lower = attrName.toLowerCase();\n            if (!VALID_ATTRS.hasOwnProperty(lower)) {\n                this.sanitizedSomething = true;\n                continue;\n            }\n            let value = elAttr.value;\n            // TODO(martinprobst): Special case image URIs for data:image/...\n            if (URI_ATTRS[lower])\n                value = _sanitizeUrl(value);\n            if (SRCSET_ATTRS[lower])\n                value = sanitizeSrcset(value);\n            this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n        }\n        this.buf.push('>');\n        return true;\n    }\n    endElement(current) {\n        const tagName = current.nodeName.toLowerCase();\n        if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {\n            this.buf.push('</');\n            this.buf.push(tagName);\n            this.buf.push('>');\n        }\n    }\n    chars(chars) {\n        this.buf.push(encodeEntities(chars));\n    }\n    checkClobberedElement(node, nextNode) {\n        if (nextNode &&\n            (node.compareDocumentPosition(nextNode) &\n                Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) {\n            throw new Error(`Failed to sanitize html because the element is clobbered: ${node.outerHTML}`);\n        }\n        return nextNode;\n    }\n}\n// Regular Expressions for parsing tags and attributes\nconst SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nconst NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n */\nfunction encodeEntities(value) {\n    return value.replace(/&/g, '&amp;')\n        .replace(SURROGATE_PAIR_REGEXP, function (match) {\n        const hi = match.charCodeAt(0);\n        const low = match.charCodeAt(1);\n        return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n    })\n        .replace(NON_ALPHANUMERIC_REGEXP, function (match) {\n        return '&#' + match.charCodeAt(0) + ';';\n    })\n        .replace(/</g, '&lt;')\n        .replace(/>/g, '&gt;');\n}\nlet inertBodyHelper;\n/**\n * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to\n * the DOM in a browser environment.\n */\nfunction _sanitizeHtml(defaultDoc, unsafeHtmlInput) {\n    let inertBodyElement = null;\n    try {\n        inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc);\n        // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n        let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n        inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n        // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser\n        // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.\n        let mXSSAttempts = 5;\n        let parsedHtml = unsafeHtml;\n        do {\n            if (mXSSAttempts === 0) {\n                throw new Error('Failed to sanitize html because the input is unstable');\n            }\n            mXSSAttempts--;\n            unsafeHtml = parsedHtml;\n            parsedHtml = inertBodyElement.innerHTML;\n            inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n        } while (unsafeHtml !== parsedHtml);\n        const sanitizer = new SanitizingHtmlSerializer();\n        const safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement);\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) {\n            console.warn('WARNING: sanitizing HTML stripped some content, see https://g.co/ng/security#xss');\n        }\n        return trustedHTMLFromString(safeHtml);\n    }\n    finally {\n        // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n        if (inertBodyElement) {\n            const parent = getTemplateContent(inertBodyElement) || inertBodyElement;\n            while (parent.firstChild) {\n                parent.removeChild(parent.firstChild);\n            }\n        }\n    }\n}\nfunction getTemplateContent(el) {\n    return 'content' in el /** Microsoft/TypeScript#21517 */ && isTemplateElement(el) ?\n        el.content :\n        null;\n}\nfunction isTemplateElement(el) {\n    return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizer for more details on security in Angular applications.\n *\n * @publicApi\n */\nvar SecurityContext;\n(function (SecurityContext) {\n    SecurityContext[SecurityContext[\"NONE\"] = 0] = \"NONE\";\n    SecurityContext[SecurityContext[\"HTML\"] = 1] = \"HTML\";\n    SecurityContext[SecurityContext[\"STYLE\"] = 2] = \"STYLE\";\n    SecurityContext[SecurityContext[\"SCRIPT\"] = 3] = \"SCRIPT\";\n    SecurityContext[SecurityContext[\"URL\"] = 4] = \"URL\";\n    SecurityContext[SecurityContext[\"RESOURCE_URL\"] = 5] = \"RESOURCE_URL\";\n})(SecurityContext || (SecurityContext = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `html` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.\n *\n * @param unsafeHtml untrusted `html`, typically from the user.\n * @returns `html` string which is safe to display to user, because all of the dangerous javascript\n * and urls have been removed.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeHtml(unsafeHtml) {\n    const sanitizer = getSanitizer();\n    if (sanitizer) {\n        return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '');\n    }\n    if (allowSanitizationBypassAndThrow(unsafeHtml, \"HTML\" /* Html */)) {\n        return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml));\n    }\n    return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml));\n}\n/**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeStyle(unsafeStyle) {\n    const sanitizer = getSanitizer();\n    if (sanitizer) {\n        return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n    }\n    if (allowSanitizationBypassAndThrow(unsafeStyle, \"Style\" /* Style */)) {\n        return unwrapSafeValue(unsafeStyle);\n    }\n    return renderStringify(unsafeStyle);\n}\n/**\n * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing\n * dangerous\n * content.\n *\n * This method parses the `url` and locates potentially dangerous content (such as javascript) and\n * removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * all of the dangerous javascript has been removed.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeUrl(unsafeUrl) {\n    const sanitizer = getSanitizer();\n    if (sanitizer) {\n        return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n    }\n    if (allowSanitizationBypassAndThrow(unsafeUrl, \"URL\" /* Url */)) {\n        return unwrapSafeValue(unsafeUrl);\n    }\n    return _sanitizeUrl(renderStringify(unsafeUrl));\n}\n/**\n * A `url` sanitizer which only lets trusted `url`s through.\n *\n * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.\n *\n * @param unsafeResourceUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * only trusted `url`s have been allowed to pass.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeResourceUrl(unsafeResourceUrl) {\n    const sanitizer = getSanitizer();\n    if (sanitizer) {\n        return trustedScriptURLFromStringBypass(sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '');\n    }\n    if (allowSanitizationBypassAndThrow(unsafeResourceUrl, \"ResourceURL\" /* ResourceUrl */)) {\n        return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl));\n    }\n    throw new Error('unsafe value used in a resource URL context (see https://g.co/ng/security#xss)');\n}\n/**\n * A `script` sanitizer which only lets trusted javascript through.\n *\n * This passes only `script`s marked trusted by calling {@link\n * bypassSanitizationTrustScript}.\n *\n * @param unsafeScript untrusted `script`, typically from the user.\n * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,\n * because only trusted `scripts` have been allowed to pass.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeScript(unsafeScript) {\n    const sanitizer = getSanitizer();\n    if (sanitizer) {\n        return trustedScriptFromStringBypass(sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '');\n    }\n    if (allowSanitizationBypassAndThrow(unsafeScript, \"Script\" /* Script */)) {\n        return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript));\n    }\n    throw new Error('unsafe value used in a script context');\n}\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedHTML. Interpolation is explicitly not allowed.\n *\n * @param html constant template literal containing trusted HTML.\n * @returns TrustedHTML wrapping `html`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedHTML.\n *\n * @codeGenApi\n */\nfunction ɵɵtrustConstantHtml(html) {\n    // The following runtime check ensures that the function was called as a\n    // template tag (e.g. ɵɵtrustConstantHtml`content`), without any interpolation\n    // (e.g. not ɵɵtrustConstantHtml`content ${variable}`). A TemplateStringsArray\n    // is an array with a `raw` property that is also an array. The associated\n    // template literal has no interpolation if and only if the length of the\n    // TemplateStringsArray is 1.\n    if (ngDevMode && (!Array.isArray(html) || !Array.isArray(html.raw) || html.length !== 1)) {\n        throw new Error(`Unexpected interpolation in trusted HTML constant: ${html.join('?')}`);\n    }\n    return trustedHTMLFromString(html[0]);\n}\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedScriptURL. Interpolation is explicitly not allowed.\n *\n * @param url constant template literal containing a trusted script URL.\n * @returns TrustedScriptURL wrapping `url`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedScriptURL.\n *\n * @codeGenApi\n */\nfunction ɵɵtrustConstantResourceUrl(url) {\n    // The following runtime check ensures that the function was called as a\n    // template tag (e.g. ɵɵtrustConstantResourceUrl`content`), without any\n    // interpolation (e.g. not ɵɵtrustConstantResourceUrl`content ${variable}`). A\n    // TemplateStringsArray is an array with a `raw` property that is also an\n    // array. The associated template literal has no interpolation if and only if\n    // the length of the TemplateStringsArray is 1.\n    if (ngDevMode && (!Array.isArray(url) || !Array.isArray(url.raw) || url.length !== 1)) {\n        throw new Error(`Unexpected interpolation in trusted URL constant: ${url.join('?')}`);\n    }\n    return trustedScriptURLFromString(url[0]);\n}\n/**\n * Detects which sanitizer to use for URL property, based on tag name and prop name.\n *\n * The rules are based on the RESOURCE_URL context config from\n * `packages/compiler/src/schema/dom_security_schema.ts`.\n * If tag and prop names don't match Resource URL schema, use URL sanitizer.\n */\nfunction getUrlSanitizer(tag, prop) {\n    if ((prop === 'src' &&\n        (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' ||\n            tag === 'script')) ||\n        (prop === 'href' && (tag === 'base' || tag === 'link'))) {\n        return ɵɵsanitizeResourceUrl;\n    }\n    return ɵɵsanitizeUrl;\n}\n/**\n * Sanitizes URL, selecting sanitizer function based on tag and property names.\n *\n * This function is used in case we can't define security context at compile time, when only prop\n * name is available. This happens when we generate host bindings for Directives/Components. The\n * host element is unknown at compile time, so we defer calculation of specific sanitizer to\n * runtime.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @param tag target element tag name.\n * @param prop name of the property that contains the value.\n * @returns `url` string which is safe to bind.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) {\n    return getUrlSanitizer(tag, prop)(unsafeUrl);\n}\nfunction validateAgainstEventProperties(name) {\n    if (name.toLowerCase().startsWith('on')) {\n        const msg = `Binding to event property '${name}' is disallowed for security reasons, ` +\n            `please use (${name.slice(2)})=...` +\n            `\\nIf '${name}' is a directive input, make sure the directive is imported by the` +\n            ` current module.`;\n        throw new Error(msg);\n    }\n}\nfunction validateAgainstEventAttributes(name) {\n    if (name.toLowerCase().startsWith('on')) {\n        const msg = `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n            `please use (${name.slice(2)})=...`;\n        throw new Error(msg);\n    }\n}\nfunction getSanitizer() {\n    const lView = getLView();\n    return lView && lView[SANITIZER];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Returns the matching `LContext` data for a given DOM node, directive or component instance.\n *\n * This function will examine the provided DOM element, component, or directive instance\\'s\n * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched\n * value will be that of the newly created `LContext`.\n *\n * If the monkey-patched value is the `LView` instance then the context value for that\n * target will be created and the monkey-patch reference will be updated. Therefore when this\n * function is called it may mutate the provided element\\'s, component\\'s or any of the associated\n * directive\\'s monkey-patch values.\n *\n * If the monkey-patch value is not detected then the code will walk up the DOM until an element\n * is found which contains a monkey-patch reference. When that occurs then the provided element\n * will be updated with a new context (which is then returned). If the monkey-patch value is not\n * detected for a component/directive instance then it will throw an error (all components and\n * directives should be automatically monkey-patched by ivy).\n *\n * @param target Component, Directive or DOM Node.\n */\nfunction getLContext(target) {\n    let mpValue = readPatchedData(target);\n    if (mpValue) {\n        // only when it's an array is it considered an LView instance\n        // ... otherwise it's an already constructed LContext instance\n        if (Array.isArray(mpValue)) {\n            const lView = mpValue;\n            let nodeIndex;\n            let component = undefined;\n            let directives = undefined;\n            if (isComponentInstance(target)) {\n                nodeIndex = findViaComponent(lView, target);\n                if (nodeIndex == -1) {\n                    throw new Error('The provided component was not found in the application');\n                }\n                component = target;\n            }\n            else if (isDirectiveInstance(target)) {\n                nodeIndex = findViaDirective(lView, target);\n                if (nodeIndex == -1) {\n                    throw new Error('The provided directive was not found in the application');\n                }\n                directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);\n            }\n            else {\n                nodeIndex = findViaNativeElement(lView, target);\n                if (nodeIndex == -1) {\n                    return null;\n                }\n            }\n            // the goal is not to fill the entire context full of data because the lookups\n            // are expensive. Instead, only the target data (the element, component, container, ICU\n            // expression or directive details) are filled into the context. If called multiple times\n            // with different target values then the missing target data will be filled in.\n            const native = unwrapRNode(lView[nodeIndex]);\n            const existingCtx = readPatchedData(native);\n            const context = (existingCtx && !Array.isArray(existingCtx)) ?\n                existingCtx :\n                createLContext(lView, nodeIndex, native);\n            // only when the component has been discovered then update the monkey-patch\n            if (component && context.component === undefined) {\n                context.component = component;\n                attachPatchData(context.component, context);\n            }\n            // only when the directives have been discovered then update the monkey-patch\n            if (directives && context.directives === undefined) {\n                context.directives = directives;\n                for (let i = 0; i < directives.length; i++) {\n                    attachPatchData(directives[i], context);\n                }\n            }\n            attachPatchData(context.native, context);\n            mpValue = context;\n        }\n    }\n    else {\n        const rElement = target;\n        ngDevMode && assertDomNode(rElement);\n        // if the context is not found then we need to traverse upwards up the DOM\n        // to find the nearest element that has already been monkey patched with data\n        let parent = rElement;\n        while (parent = parent.parentNode) {\n            const parentContext = readPatchedData(parent);\n            if (parentContext) {\n                let lView;\n                if (Array.isArray(parentContext)) {\n                    lView = parentContext;\n                }\n                else {\n                    lView = parentContext.lView;\n                }\n                // the edge of the app was also reached here through another means\n                // (maybe because the DOM was changed manually).\n                if (!lView) {\n                    return null;\n                }\n                const index = findViaNativeElement(lView, rElement);\n                if (index >= 0) {\n                    const native = unwrapRNode(lView[index]);\n                    const context = createLContext(lView, index, native);\n                    attachPatchData(native, context);\n                    mpValue = context;\n                    break;\n                }\n            }\n        }\n    }\n    return mpValue || null;\n}\n/**\n * Creates an empty instance of a `LContext` context\n */\nfunction createLContext(lView, nodeIndex, native) {\n    return {\n        lView,\n        nodeIndex,\n        native,\n        component: undefined,\n        directives: undefined,\n        localRefs: undefined,\n    };\n}\n/**\n * Takes a component instance and returns the view for that component.\n *\n * @param componentInstance\n * @returns The component's view\n */\nfunction getComponentViewByInstance(componentInstance) {\n    let lView = readPatchedData(componentInstance);\n    let view;\n    if (Array.isArray(lView)) {\n        const nodeIndex = findViaComponent(lView, componentInstance);\n        view = getComponentLViewByIndex(nodeIndex, lView);\n        const context = createLContext(lView, nodeIndex, view[HOST]);\n        context.component = componentInstance;\n        attachPatchData(componentInstance, context);\n        attachPatchData(context.native, context);\n    }\n    else {\n        const context = lView;\n        view = getComponentLViewByIndex(context.nodeIndex, context.lView);\n    }\n    return view;\n}\n/**\n * This property will be monkey-patched on elements, components and directives.\n */\nconst MONKEY_PATCH_KEY_NAME = '__ngContext__';\n/**\n * Assigns the given data to the given target (which could be a component,\n * directive or DOM node instance) using monkey-patching.\n */\nfunction attachPatchData(target, data) {\n    ngDevMode && assertDefined(target, 'Target expected');\n    target[MONKEY_PATCH_KEY_NAME] = data;\n}\n/**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\nfunction readPatchedData(target) {\n    ngDevMode && assertDefined(target, 'Target expected');\n    return target[MONKEY_PATCH_KEY_NAME] || null;\n}\nfunction readPatchedLView(target) {\n    const value = readPatchedData(target);\n    if (value) {\n        return Array.isArray(value) ? value : value.lView;\n    }\n    return null;\n}\nfunction isComponentInstance(instance) {\n    return instance && instance.constructor && instance.constructor.ɵcmp;\n}\nfunction isDirectiveInstance(instance) {\n    return instance && instance.constructor && instance.constructor.ɵdir;\n}\n/**\n * Locates the element within the given LView and returns the matching index\n */\nfunction findViaNativeElement(lView, target) {\n    const tView = lView[TVIEW];\n    for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n        if (unwrapRNode(lView[i]) === target) {\n            return i;\n        }\n    }\n    return -1;\n}\n/**\n * Locates the next tNode (child, sibling or parent).\n */\nfunction traverseNextElement(tNode) {\n    if (tNode.child) {\n        return tNode.child;\n    }\n    else if (tNode.next) {\n        return tNode.next;\n    }\n    else {\n        // Let's take the following template: <div><span>text</span></div><component/>\n        // After checking the text node, we need to find the next parent that has a \"next\" TNode,\n        // in this case the parent `div`, so that we can find the component.\n        while (tNode.parent && !tNode.parent.next) {\n            tNode = tNode.parent;\n        }\n        return tNode.parent && tNode.parent.next;\n    }\n}\n/**\n * Locates the component within the given LView and returns the matching index\n */\nfunction findViaComponent(lView, componentInstance) {\n    const componentIndices = lView[TVIEW].components;\n    if (componentIndices) {\n        for (let i = 0; i < componentIndices.length; i++) {\n            const elementComponentIndex = componentIndices[i];\n            const componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n            if (componentView[CONTEXT] === componentInstance) {\n                return elementComponentIndex;\n            }\n        }\n    }\n    else {\n        const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);\n        const rootComponent = rootComponentView[CONTEXT];\n        if (rootComponent === componentInstance) {\n            // we are dealing with the root element here therefore we know that the\n            // element is the very first element after the HEADER data in the lView\n            return HEADER_OFFSET;\n        }\n    }\n    return -1;\n}\n/**\n * Locates the directive within the given LView and returns the matching index\n */\nfunction findViaDirective(lView, directiveInstance) {\n    // if a directive is monkey patched then it will (by default)\n    // have a reference to the LView of the current view. The\n    // element bound to the directive being search lives somewhere\n    // in the view data. We loop through the nodes and check their\n    // list of directives for the instance.\n    let tNode = lView[TVIEW].firstChild;\n    while (tNode) {\n        const directiveIndexStart = tNode.directiveStart;\n        const directiveIndexEnd = tNode.directiveEnd;\n        for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {\n            if (lView[i] === directiveInstance) {\n                return tNode.index;\n            }\n        }\n        tNode = traverseNextElement(tNode);\n    }\n    return -1;\n}\n/**\n * Returns a list of directives extracted from the given view based on the\n * provided list of directive index values.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n * @param includeComponents Whether or not to include components in returned directives\n */\nfunction getDirectivesAtNodeIndex(nodeIndex, lView, includeComponents) {\n    const tNode = lView[TVIEW].data[nodeIndex];\n    let directiveStartIndex = tNode.directiveStart;\n    if (directiveStartIndex == 0)\n        return EMPTY_ARRAY;\n    const directiveEndIndex = tNode.directiveEnd;\n    if (!includeComponents && tNode.flags & 2 /* isComponentHost */)\n        directiveStartIndex++;\n    return lView.slice(directiveStartIndex, directiveEndIndex);\n}\nfunction getComponentAtNodeIndex(nodeIndex, lView) {\n    const tNode = lView[TVIEW].data[nodeIndex];\n    let directiveStartIndex = tNode.directiveStart;\n    return tNode.flags & 2 /* isComponentHost */ ? lView[directiveStartIndex] : null;\n}\n/**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\nfunction discoverLocalRefs(lView, nodeIndex) {\n    const tNode = lView[TVIEW].data[nodeIndex];\n    if (tNode && tNode.localNames) {\n        const result = {};\n        let localIndex = tNode.index + 1;\n        for (let i = 0; i < tNode.localNames.length; i += 2) {\n            result[tNode.localNames[i]] = lView[localIndex];\n            localIndex++;\n        }\n        return result;\n    }\n    return null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ERROR_TYPE = 'ngType';\nconst ERROR_DEBUG_CONTEXT = 'ngDebugContext';\nconst ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nconst ERROR_LOGGER = 'ngErrorLogger';\nfunction wrappedError(message, originalError) {\n    const msg = `${message} caused by: ${originalError instanceof Error ? originalError.message : originalError}`;\n    const error = Error(msg);\n    error[ERROR_ORIGINAL_ERROR] = originalError;\n    return error;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getType(error) {\n    return error[ERROR_TYPE];\n}\nfunction getDebugContext(error) {\n    return error[ERROR_DEBUG_CONTEXT];\n}\nfunction getOriginalError(error) {\n    return error[ERROR_ORIGINAL_ERROR];\n}\nfunction getErrorLogger(error) {\n    return error && error[ERROR_LOGGER] || defaultErrorLogger;\n}\nfunction defaultErrorLogger(console, ...values) {\n    console.error(...values);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provides a hook for centralized exception handling.\n *\n * The default implementation of `ErrorHandler` prints error messages to the `console`. To\n * intercept error handling, write a custom exception handler that replaces this default as\n * appropriate for your app.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * class MyErrorHandler implements ErrorHandler {\n *   handleError(error) {\n *     // do something with the exception\n *   }\n * }\n *\n * @NgModule({\n *   providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n *\n * @publicApi\n */\nclass ErrorHandler {\n    constructor() {\n        /**\n         * @internal\n         */\n        this._console = console;\n    }\n    handleError(error) {\n        const originalError = this._findOriginalError(error);\n        const context = this._findContext(error);\n        // Note: Browser consoles show the place from where console.error was called.\n        // We can use this to give users additional information about the error.\n        const errorLogger = getErrorLogger(error);\n        errorLogger(this._console, `ERROR`, error);\n        if (originalError) {\n            errorLogger(this._console, `ORIGINAL ERROR`, originalError);\n        }\n        if (context) {\n            errorLogger(this._console, 'ERROR CONTEXT', context);\n        }\n    }\n    /** @internal */\n    _findContext(error) {\n        return error ? (getDebugContext(error) || this._findContext(getOriginalError(error))) : null;\n    }\n    /** @internal */\n    _findOriginalError(error) {\n        let e = error && getOriginalError(error);\n        while (e && getOriginalError(e)) {\n            e = getOriginalError(e);\n        }\n        return e || null;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n * @publicApi\n */\nconst CUSTOM_ELEMENTS_SCHEMA = {\n    name: 'custom-elements'\n};\n/**\n * Defines a schema that allows any property on any element.\n *\n * This schema allows you to ignore the errors related to any unknown elements or properties in a\n * template. The usage of this schema is generally discouraged because it prevents useful validation\n * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.\n *\n * @publicApi\n */\nconst NO_ERRORS_SCHEMA = {\n    name: 'no-errors-schema'\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Disallowed strings in the comment.\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n */\nconst COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g;\n/**\n * Delimiter in the disallowed strings which needs to be wrapped with zero with character.\n */\nconst COMMENT_DELIMITER = /(<|>)/;\nconst COMMENT_DELIMITER_ESCAPED = '\\u200B$1\\u200B';\n/**\n * Escape the content of comment strings so that it can be safely inserted into a comment node.\n *\n * The issue is that HTML does not specify any way to escape comment end text inside the comment.\n * Consider: `<!-- The way you close a comment is with \">\", and \"->\" at the beginning or by \"-->\" or\n * \"--!>\" at the end. -->`. Above the `\"-->\"` is meant to be text not an end to the comment. This\n * can be created programmatically through DOM APIs. (`<!--` are also disallowed.)\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n *\n * ```\n * div.innerHTML = div.innerHTML\n * ```\n *\n * One would expect that the above code would be safe to do, but it turns out that because comment\n * text is not escaped, the comment may contain text which will prematurely close the comment\n * opening up the application for XSS attack. (In SSR we programmatically create comment nodes which\n * may contain such text and expect them to be safe.)\n *\n * This function escapes the comment text by looking for comment delimiters (`<` and `>`) and\n * surrounding them with `_>_` where the `_` is a zero width space `\\u200B`. The result is that if a\n * comment contains any of the comment start/end delimiters (such as `<!--`, `-->` or `--!>`) the\n * text it will render normally but it will not cause the HTML parser to close/open the comment.\n *\n * @param value text to make safe for comment node by escaping the comment open/close character\n *     sequence.\n */\nfunction escapeCommentText(value) {\n    return value.replace(COMMENT_DISALLOWED, (text) => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!\n */\n/**\n * Creates an `Array` construction with a given name. This is useful when\n * looking for memory consumption to see what time of array it is.\n *\n *\n * @param name Name to give to the constructor\n * @returns A subclass of `Array` if possible. This can only be done in\n *          environments which support `class` construct.\n */\nfunction createNamedArrayType(name) {\n    // This should never be called in prod mode, so let's verify that is the case.\n    if (ngDevMode) {\n        try {\n            // If this function were compromised the following could lead to arbitrary\n            // script execution. We bless it with Trusted Types anyway since this\n            // function is stripped out of production binaries.\n            return (newTrustedFunctionForDev('Array', `return class ${name} extends Array{}`))(Array);\n        }\n        catch (e) {\n            // If it does not work just give up and fall back to regular Array.\n            return Array;\n        }\n    }\n    else {\n        throw new Error('Looks like we are in \\'prod mode\\', but we are creating a named Array type, which is wrong! Check your code');\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction normalizeDebugBindingName(name) {\n    // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers\n    name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));\n    return `ng-reflect-${name}`;\n}\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\nfunction camelCaseToDashCase(input) {\n    return input.replace(CAMEL_CASE_REGEXP, (...m) => '-' + m[1].toLowerCase());\n}\nfunction normalizeDebugBindingValue(value) {\n    try {\n        // Limit the size of the value as otherwise the DOM just gets polluted.\n        return value != null ? value.toString().slice(0, 30) : value;\n    }\n    catch (e) {\n        return '[ERROR] Exception while trying to serialize the value';\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0$4 = () => (typeof requestAnimationFrame !== 'undefined' &&\n    requestAnimationFrame || // browser only\n    setTimeout // everything else\n)\n    .bind(_global);\nconst defaultScheduler = (ɵ0$4)();\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveWindow(element) {\n    return element.ownerDocument.defaultView;\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveDocument(element) {\n    return element.ownerDocument;\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveBody(element) {\n    return element.ownerDocument.body;\n}\n/**\n * The special delimiter we use to separate property names, prefixes, and suffixes\n * in property binding metadata. See storeBindingMetadata().\n *\n * We intentionally use the Unicode \"REPLACEMENT CHARACTER\" (U+FFFD) as a delimiter\n * because it is a very uncommon character that is unlikely to be part of a user's\n * property names or interpolation strings. If it is in fact used in a property\n * binding, DebugElement.properties will not return the correct value for that\n * binding. However, there should be no runtime effect for real applications.\n *\n * This character is typically rendered as a question mark inside of a diamond.\n * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)\n *\n */\nconst INTERPOLATION_DELIMITER = `�`;\n/**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\nfunction maybeUnwrapFn(value) {\n    if (value instanceof Function) {\n        return value();\n    }\n    else {\n        return value;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Called when there are multiple component selectors that match a given node */\nfunction throwMultipleComponentError(tNode) {\n    throw new RuntimeError(\"300\" /* MULTIPLE_COMPONENTS_MATCH */, `Multiple components match node with tagname ${tNode.value}`);\n}\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nfunction throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName) {\n    const field = propName ? ` for '${propName}'` : '';\n    let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${field}: '${oldValue}'. Current value: '${currValue}'.`;\n    if (creationMode) {\n        msg +=\n            ` It seems like the view has been created after its parent and its children have been dirty checked.` +\n                ` Has it been created in a change detection hook?`;\n    }\n    // TODO: include debug context, see `viewDebugError` function in\n    // `packages/core/src/view/errors.ts` for reference.\n    throw new RuntimeError(\"100\" /* EXPRESSION_CHANGED_AFTER_CHECKED */, msg);\n}\nfunction constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) {\n    const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER);\n    let oldValue = prefix, newValue = prefix;\n    for (let i = 0; i < chunks.length; i++) {\n        const slotIdx = rootIndex + i;\n        oldValue += `${lView[slotIdx]}${chunks[i]}`;\n        newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`;\n    }\n    return { propName, oldValue, newValue };\n}\n/**\n * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError:\n * - property name (for property bindings or interpolations)\n * - old and new values, enriched using information from metadata\n *\n * More information on the metadata storage format can be found in `storePropertyBindingMetadata`\n * function description.\n */\nfunction getExpressionChangedErrorDetails(lView, bindingIndex, oldValue, newValue) {\n    const tData = lView[TVIEW].data;\n    const metadata = tData[bindingIndex];\n    if (typeof metadata === 'string') {\n        // metadata for property interpolation\n        if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {\n            return constructDetailsForInterpolation(lView, bindingIndex, bindingIndex, metadata, newValue);\n        }\n        // metadata for property binding\n        return { propName: metadata, oldValue, newValue };\n    }\n    // metadata is not available for this expression, check if this expression is a part of the\n    // property interpolation by going from the current binding index left and look for a string that\n    // contains INTERPOLATION_DELIMITER, the layout in tView.data for this case will look like this:\n    // [..., 'id�Prefix � and � suffix', null, null, null, ...]\n    if (metadata === null) {\n        let idx = bindingIndex - 1;\n        while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {\n            idx--;\n        }\n        const meta = tData[idx];\n        if (typeof meta === 'string') {\n            const matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g'));\n            // first interpolation delimiter separates property name from interpolation parts (in case of\n            // property interpolations), so we subtract one from total number of found delimiters\n            if (matches && (matches.length - 1) > bindingIndex - idx) {\n                return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);\n            }\n        }\n    }\n    return { propName: undefined, oldValue, newValue };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\nvar RendererStyleFlags2;\n(function (RendererStyleFlags2) {\n    // TODO(misko): This needs to be refactored into a separate file so that it can be imported from\n    // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails\n    // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.\n    /**\n     * Marks a style as important.\n     */\n    RendererStyleFlags2[RendererStyleFlags2[\"Important\"] = 1] = \"Important\";\n    /**\n     * Marks a style as using dash case naming (this-is-dash-case).\n     */\n    RendererStyleFlags2[RendererStyleFlags2[\"DashCase\"] = 2] = \"DashCase\";\n})(RendererStyleFlags2 || (RendererStyleFlags2 = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet _icuContainerIterate;\n/**\n * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s.\n */\nfunction icuContainerIterate(tIcuContainerNode, lView) {\n    return _icuContainerIterate(tIcuContainerNode, lView);\n}\n/**\n * Ensures that `IcuContainerVisitor`'s implementation is present.\n *\n * This function is invoked when i18n instruction comes across an ICU. The purpose is to allow the\n * bundler to tree shake ICU logic and only load it if ICU instruction is executed.\n */\nfunction ensureIcuContainerVisitorLoaded(loader) {\n    if (_icuContainerIterate === undefined) {\n        // Do not inline this function. We want to keep `ensureIcuContainerVisitorLoaded` light, so it\n        // can be inlined into call-site.\n        _icuContainerIterate = loader();\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$5 = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of\n * that LContainer, which is an LView\n * @param lView the lView whose parent to get\n */\nfunction getLViewParent(lView) {\n    ngDevMode && assertLView(lView);\n    const parent = lView[PARENT];\n    return isLContainer(parent) ? parent[PARENT] : parent;\n}\n/**\n * Retrieve the root view from any component or `LView` by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param componentOrLView any component or `LView`\n */\nfunction getRootView(componentOrLView) {\n    ngDevMode && assertDefined(componentOrLView, 'component');\n    let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);\n    while (lView && !(lView[FLAGS] & 512 /* IsRoot */)) {\n        lView = getLViewParent(lView);\n    }\n    ngDevMode && assertLView(lView);\n    return lView;\n}\n/**\n * Returns the `RootContext` instance that is associated with\n * the application where the target is situated. It does this by walking the parent views until it\n * gets to the root view, then getting the context off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nfunction getRootContext(viewOrComponent) {\n    const rootView = getRootView(viewOrComponent);\n    ngDevMode &&\n        assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n    return rootView[CONTEXT];\n}\n/**\n * Gets the first `LContainer` in the LView or `null` if none exists.\n */\nfunction getFirstLContainer(lView) {\n    return getNearestLContainer(lView[CHILD_HEAD]);\n}\n/**\n * Gets the next `LContainer` that is a sibling of the given container.\n */\nfunction getNextLContainer(container) {\n    return getNearestLContainer(container[NEXT]);\n}\nfunction getNearestLContainer(viewOrContainer) {\n    while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n        viewOrContainer = viewOrContainer[NEXT];\n    }\n    return viewOrContainer;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$2 + unusedValueExportToPlacateAjd;\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\nfunction applyToElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) {\n    // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n    // won't be created until i18nApply() in the update block, so this node should be skipped.\n    // For more info, see \"ICU expressions should work inside an ngTemplateOutlet inside an ngFor\"\n    // in `i18n_spec.ts`.\n    if (lNodeToHandle != null) {\n        let lContainer;\n        let isComponent = false;\n        // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is\n        // wrapped in an array which needs to be unwrapped. We need to know if it is a component and if\n        // it has LContainer so that we can process all of those cases appropriately.\n        if (isLContainer(lNodeToHandle)) {\n            lContainer = lNodeToHandle;\n        }\n        else if (isLView(lNodeToHandle)) {\n            isComponent = true;\n            ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n            lNodeToHandle = lNodeToHandle[HOST];\n        }\n        const rNode = unwrapRNode(lNodeToHandle);\n        ngDevMode && !isProceduralRenderer(renderer) && assertDomNode(rNode);\n        if (action === 0 /* Create */ && parent !== null) {\n            if (beforeNode == null) {\n                nativeAppendChild(renderer, parent, rNode);\n            }\n            else {\n                nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n            }\n        }\n        else if (action === 1 /* Insert */ && parent !== null) {\n            nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n        }\n        else if (action === 2 /* Detach */) {\n            nativeRemoveNode(renderer, rNode, isComponent);\n        }\n        else if (action === 3 /* Destroy */) {\n            ngDevMode && ngDevMode.rendererDestroyNode++;\n            renderer.destroyNode(rNode);\n        }\n        if (lContainer != null) {\n            applyContainer(renderer, action, lContainer, parent, beforeNode);\n        }\n    }\n}\nfunction createTextNode(renderer, value) {\n    ngDevMode && ngDevMode.rendererCreateTextNode++;\n    ngDevMode && ngDevMode.rendererSetText++;\n    return isProceduralRenderer(renderer) ? renderer.createText(value) :\n        renderer.createTextNode(value);\n}\nfunction updateTextNode(renderer, rNode, value) {\n    ngDevMode && ngDevMode.rendererSetText++;\n    isProceduralRenderer(renderer) ? renderer.setValue(rNode, value) : rNode.textContent = value;\n}\nfunction createCommentNode(renderer, value) {\n    ngDevMode && ngDevMode.rendererCreateComment++;\n    // isProceduralRenderer check is not needed because both `Renderer2` and `Renderer3` have the same\n    // method name.\n    return renderer.createComment(escapeCommentText(value));\n}\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param renderer A renderer to use\n * @param name the tag name\n * @param namespace Optional namespace for element.\n * @returns the element created\n */\nfunction createElementNode(renderer, name, namespace) {\n    ngDevMode && ngDevMode.rendererCreateElement++;\n    if (isProceduralRenderer(renderer)) {\n        return renderer.createElement(name, namespace);\n    }\n    else {\n        return namespace === null ? renderer.createElement(name) :\n            renderer.createElementNS(namespace, name);\n    }\n}\n/**\n * Removes all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to remove all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param lView The view from which elements should be added or removed\n */\nfunction removeViewFromContainer(tView, lView) {\n    const renderer = lView[RENDERER];\n    applyView(tView, lView, renderer, 2 /* Detach */, null, null);\n    lView[HOST] = null;\n    lView[T_HOST] = null;\n}\n/**\n * Adds all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to add all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param parentTNode The `TNode` where the `LView` should be attached to.\n * @param renderer Current renderer to use for DOM manipulations.\n * @param lView The view from which elements should be added or removed\n * @param parentNativeNode The parent `RElement` where it should be inserted into.\n * @param beforeNode The node before which elements should be added, if insert mode\n */\nfunction addViewToContainer(tView, parentTNode, renderer, lView, parentNativeNode, beforeNode) {\n    lView[HOST] = parentNativeNode;\n    lView[T_HOST] = parentTNode;\n    applyView(tView, lView, renderer, 1 /* Insert */, parentNativeNode, beforeNode);\n}\n/**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param tView The `TView' of the `LView` to be detached\n * @param lView the `LView` to be detached.\n */\nfunction renderDetachView(tView, lView) {\n    applyView(tView, lView, lView[RENDERER], 2 /* Detach */, null, null);\n}\n/**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n *  - Because it's used for onDestroy calls, it needs to be bottom-up.\n *  - Must process containers instead of their views to avoid splicing\n *  when views are destroyed and re-added.\n *  - Using a while loop because it's faster than recursion\n *  - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n *  @param rootView The view to destroy\n */\nfunction destroyViewTree(rootView) {\n    // If the view has no children, we can clean it up and return early.\n    let lViewOrLContainer = rootView[CHILD_HEAD];\n    if (!lViewOrLContainer) {\n        return cleanUpView(rootView[TVIEW], rootView);\n    }\n    while (lViewOrLContainer) {\n        let next = null;\n        if (isLView(lViewOrLContainer)) {\n            // If LView, traverse down to child.\n            next = lViewOrLContainer[CHILD_HEAD];\n        }\n        else {\n            ngDevMode && assertLContainer(lViewOrLContainer);\n            // If container, traverse down to its first LView.\n            const firstView = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n            if (firstView)\n                next = firstView;\n        }\n        if (!next) {\n            // Only clean up view when moving to the side or up, as destroy hooks\n            // should be called in order from the bottom up.\n            while (lViewOrLContainer && !lViewOrLContainer[NEXT] && lViewOrLContainer !== rootView) {\n                if (isLView(lViewOrLContainer)) {\n                    cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n                }\n                lViewOrLContainer = lViewOrLContainer[PARENT];\n            }\n            if (lViewOrLContainer === null)\n                lViewOrLContainer = rootView;\n            if (isLView(lViewOrLContainer)) {\n                cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n            }\n            next = lViewOrLContainer && lViewOrLContainer[NEXT];\n        }\n        lViewOrLContainer = next;\n    }\n}\n/**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param tView The `TView' of the `LView` to insert\n * @param lView The view to insert\n * @param lContainer The container into which the view should be inserted\n * @param index Which index in the container to insert the child view into\n */\nfunction insertView(tView, lView, lContainer, index) {\n    ngDevMode && assertLView(lView);\n    ngDevMode && assertLContainer(lContainer);\n    const indexInContainer = CONTAINER_HEADER_OFFSET + index;\n    const containerLength = lContainer.length;\n    if (index > 0) {\n        // This is a new view, we need to add it to the children.\n        lContainer[indexInContainer - 1][NEXT] = lView;\n    }\n    if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n        lView[NEXT] = lContainer[indexInContainer];\n        addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);\n    }\n    else {\n        lContainer.push(lView);\n        lView[NEXT] = null;\n    }\n    lView[PARENT] = lContainer;\n    // track views where declaration and insertion points are different\n    const declarationLContainer = lView[DECLARATION_LCONTAINER];\n    if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n        trackMovedView(declarationLContainer, lView);\n    }\n    // notify query that a new view has been added\n    const lQueries = lView[QUERIES];\n    if (lQueries !== null) {\n        lQueries.insertView(tView);\n    }\n    // Sets the attached flag\n    lView[FLAGS] |= 128 /* Attached */;\n}\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer.\n */\nfunction trackMovedView(declarationContainer, lView) {\n    ngDevMode && assertDefined(lView, 'LView required');\n    ngDevMode && assertLContainer(declarationContainer);\n    const movedViews = declarationContainer[MOVED_VIEWS];\n    const insertedLContainer = lView[PARENT];\n    ngDevMode && assertLContainer(insertedLContainer);\n    const insertedComponentLView = insertedLContainer[PARENT][DECLARATION_COMPONENT_VIEW];\n    ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n    const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];\n    ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');\n    if (declaredComponentLView !== insertedComponentLView) {\n        // At this point the declaration-component is not same as insertion-component; this means that\n        // this is a transplanted view. Mark the declared lView as having transplanted views so that\n        // those views can participate in CD.\n        declarationContainer[HAS_TRANSPLANTED_VIEWS] = true;\n    }\n    if (movedViews === null) {\n        declarationContainer[MOVED_VIEWS] = [lView];\n    }\n    else {\n        movedViews.push(lView);\n    }\n}\nfunction detachMovedView(declarationContainer, lView) {\n    ngDevMode && assertLContainer(declarationContainer);\n    ngDevMode &&\n        assertDefined(declarationContainer[MOVED_VIEWS], 'A projected view should belong to a non-empty projected views collection');\n    const movedViews = declarationContainer[MOVED_VIEWS];\n    const declarationViewIndex = movedViews.indexOf(lView);\n    const insertionLContainer = lView[PARENT];\n    ngDevMode && assertLContainer(insertionLContainer);\n    // If the view was marked for refresh but then detached before it was checked (where the flag\n    // would be cleared and the counter decremented), we need to decrement the view counter here\n    // instead.\n    if (lView[FLAGS] & 1024 /* RefreshTransplantedView */) {\n        lView[FLAGS] &= ~1024 /* RefreshTransplantedView */;\n        updateTransplantedViewCount(insertionLContainer, -1);\n    }\n    movedViews.splice(declarationViewIndex, 1);\n}\n/**\n * Detaches a view from a container.\n *\n * This method removes the view from the container's array of active views. It also\n * removes the view's elements from the DOM.\n *\n * @param lContainer The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns Detached LView instance.\n */\nfunction detachView(lContainer, removeIndex) {\n    if (lContainer.length <= CONTAINER_HEADER_OFFSET)\n        return;\n    const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n    const viewToDetach = lContainer[indexInContainer];\n    if (viewToDetach) {\n        const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n        if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n            detachMovedView(declarationLContainer, viewToDetach);\n        }\n        if (removeIndex > 0) {\n            lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];\n        }\n        const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n        removeViewFromContainer(viewToDetach[TVIEW], viewToDetach);\n        // notify query that a view has been removed\n        const lQueries = removedLView[QUERIES];\n        if (lQueries !== null) {\n            lQueries.detachView(removedLView[TVIEW]);\n        }\n        viewToDetach[PARENT] = null;\n        viewToDetach[NEXT] = null;\n        // Unsets the attached flag\n        viewToDetach[FLAGS] &= ~128 /* Attached */;\n    }\n    return viewToDetach;\n}\n/**\n * A standalone function which destroys an LView,\n * conducting clean up (e.g. removing listeners, calling onDestroys).\n *\n * @param tView The `TView' of the `LView` to be destroyed\n * @param lView The view to be destroyed.\n */\nfunction destroyLView(tView, lView) {\n    if (!(lView[FLAGS] & 256 /* Destroyed */)) {\n        const renderer = lView[RENDERER];\n        if (isProceduralRenderer(renderer) && renderer.destroyNode) {\n            applyView(tView, lView, renderer, 3 /* Destroy */, null, null);\n        }\n        destroyViewTree(lView);\n    }\n}\n/**\n * Calls onDestroys hooks for all directives and pipes in a given view and then removes all\n * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks\n * can be propagated to @Output listeners.\n *\n * @param tView `TView` for the `LView` to clean up.\n * @param lView The LView to clean up\n */\nfunction cleanUpView(tView, lView) {\n    if (!(lView[FLAGS] & 256 /* Destroyed */)) {\n        // Usually the Attached flag is removed when the view is detached from its parent, however\n        // if it's a root view, the flag won't be unset hence why we're also removing on destroy.\n        lView[FLAGS] &= ~128 /* Attached */;\n        // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook\n        // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If\n        // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.\n        // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is\n        // really more of an \"afterDestroy\" hook if you think about it.\n        lView[FLAGS] |= 256 /* Destroyed */;\n        executeOnDestroys(tView, lView);\n        processCleanups(tView, lView);\n        // For component views only, the local renderer is destroyed at clean up time.\n        if (lView[TVIEW].type === 1 /* Component */ && isProceduralRenderer(lView[RENDERER])) {\n            ngDevMode && ngDevMode.rendererDestroy++;\n            lView[RENDERER].destroy();\n        }\n        const declarationContainer = lView[DECLARATION_LCONTAINER];\n        // we are dealing with an embedded view that is still inserted into a container\n        if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n            // and this is a projected view\n            if (declarationContainer !== lView[PARENT]) {\n                detachMovedView(declarationContainer, lView);\n            }\n            // For embedded views still attached to a container: remove query result from this view.\n            const lQueries = lView[QUERIES];\n            if (lQueries !== null) {\n                lQueries.detachView(tView);\n            }\n        }\n    }\n}\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction processCleanups(tView, lView) {\n    const tCleanup = tView.cleanup;\n    const lCleanup = lView[CLEANUP];\n    // `LCleanup` contains both share information with `TCleanup` as well as instance specific\n    // information appended at the end. We need to know where the end of the `TCleanup` information\n    // is, and we track this with `lastLCleanupIndex`.\n    let lastLCleanupIndex = -1;\n    if (tCleanup !== null) {\n        for (let i = 0; i < tCleanup.length - 1; i += 2) {\n            if (typeof tCleanup[i] === 'string') {\n                // This is a native DOM listener\n                const idxOrTargetGetter = tCleanup[i + 1];\n                const target = typeof idxOrTargetGetter === 'function' ?\n                    idxOrTargetGetter(lView) :\n                    unwrapRNode(lView[idxOrTargetGetter]);\n                const listener = lCleanup[lastLCleanupIndex = tCleanup[i + 2]];\n                const useCaptureOrSubIdx = tCleanup[i + 3];\n                if (typeof useCaptureOrSubIdx === 'boolean') {\n                    // native DOM listener registered with Renderer3\n                    target.removeEventListener(tCleanup[i], listener, useCaptureOrSubIdx);\n                }\n                else {\n                    if (useCaptureOrSubIdx >= 0) {\n                        // unregister\n                        lCleanup[lastLCleanupIndex = useCaptureOrSubIdx]();\n                    }\n                    else {\n                        // Subscription\n                        lCleanup[lastLCleanupIndex = -useCaptureOrSubIdx].unsubscribe();\n                    }\n                }\n                i += 2;\n            }\n            else {\n                // This is a cleanup function that is grouped with the index of its context\n                const context = lCleanup[lastLCleanupIndex = tCleanup[i + 1]];\n                tCleanup[i].call(context);\n            }\n        }\n    }\n    if (lCleanup !== null) {\n        for (let i = lastLCleanupIndex + 1; i < lCleanup.length; i++) {\n            const instanceCleanupFn = lCleanup[i];\n            ngDevMode && assertFunction(instanceCleanupFn, 'Expecting instance cleanup function.');\n            instanceCleanupFn();\n        }\n        lView[CLEANUP] = null;\n    }\n}\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(tView, lView) {\n    let destroyHooks;\n    if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n        for (let i = 0; i < destroyHooks.length; i += 2) {\n            const context = lView[destroyHooks[i]];\n            // Only call the destroy hook if the context has been requested.\n            if (!(context instanceof NodeInjectorFactory)) {\n                const toCall = destroyHooks[i + 1];\n                if (Array.isArray(toCall)) {\n                    for (let j = 0; j < toCall.length; j += 2) {\n                        const callContext = context[toCall[j]];\n                        const hook = toCall[j + 1];\n                        profiler(4 /* LifecycleHookStart */, callContext, hook);\n                        try {\n                            hook.call(callContext);\n                        }\n                        finally {\n                            profiler(5 /* LifecycleHookEnd */, callContext, hook);\n                        }\n                    }\n                }\n                else {\n                    profiler(4 /* LifecycleHookStart */, context, toCall);\n                    try {\n                        toCall.call(context);\n                    }\n                    finally {\n                        profiler(5 /* LifecycleHookEnd */, context, toCall);\n                    }\n                }\n            }\n        }\n    }\n}\n/**\n * Returns a native element if a node can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n *   insertion because the content of a component will be projected.\n *   `<component><content>delayed due to projection</content></component>`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n *   parent container, which itself is disconnected. For example the parent container is part\n *   of a View which has not be inserted or is made for projection but has not been inserted\n *   into destination.\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve render parent.\n * @param lView: Current `LView`.\n */\nfunction getParentRElement(tView, tNode, lView) {\n    return getClosestRElement(tView, tNode.parent, lView);\n}\n/**\n * Get closest `RElement` or `null` if it can't be found.\n *\n * If `TNode` is `TNodeType.Element` => return `RElement` at `LView[tNode.index]` location.\n * If `TNode` is `TNodeType.ElementContainer|IcuContain` => return the parent (recursively).\n * If `TNode` is `null` then return host `RElement`:\n *   - return `null` if projection\n *   - return `null` if parent container is disconnected (we have no parent.)\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve `RElement` (or `null` if host element is\n *     needed).\n * @param lView: Current `LView`.\n * @returns `null` if the `RElement` can't be determined at this time (no parent / projection)\n */\nfunction getClosestRElement(tView, tNode, lView) {\n    let parentTNode = tNode;\n    // Skip over element and ICU containers as those are represented by a comment node and\n    // can't be used as a render parent.\n    while (parentTNode !== null &&\n        (parentTNode.type & (8 /* ElementContainer */ | 32 /* Icu */))) {\n        tNode = parentTNode;\n        parentTNode = tNode.parent;\n    }\n    // If the parent tNode is null, then we are inserting across views: either into an embedded view\n    // or a component view.\n    if (parentTNode === null) {\n        // We are inserting a root element of the component view into the component host element and\n        // it should always be eager.\n        return lView[HOST];\n    }\n    else {\n        ngDevMode && assertTNodeType(parentTNode, 3 /* AnyRNode */ | 4 /* Container */);\n        if (parentTNode.flags & 2 /* isComponentHost */) {\n            ngDevMode && assertTNodeForLView(parentTNode, lView);\n            const encapsulation = tView.data[parentTNode.directiveStart].encapsulation;\n            // We've got a parent which is an element in the current view. We just need to verify if the\n            // parent element is not a component. Component's content nodes are not inserted immediately\n            // because they will be projected, and so doing insert at this point would be wasteful.\n            // Since the projection would then move it to its final destination. Note that we can't\n            // make this assumption when using the Shadow DOM, because the native projection placeholders\n            // (<content> or <slot>) have to be in place as elements are being inserted.\n            if (encapsulation === ViewEncapsulation.None ||\n                encapsulation === ViewEncapsulation.Emulated) {\n                return null;\n            }\n        }\n        return getNativeByTNode(parentTNode, lView);\n    }\n}\n/**\n * Inserts a native node before another native node for a given parent using {@link Renderer3}.\n * This is a utility function that can be used when native nodes were determined - it abstracts an\n * actual renderer being used.\n */\nfunction nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {\n    ngDevMode && ngDevMode.rendererInsertBefore++;\n    if (isProceduralRenderer(renderer)) {\n        renderer.insertBefore(parent, child, beforeNode, isMove);\n    }\n    else {\n        parent.insertBefore(child, beforeNode, isMove);\n    }\n}\nfunction nativeAppendChild(renderer, parent, child) {\n    ngDevMode && ngDevMode.rendererAppendChild++;\n    ngDevMode && assertDefined(parent, 'parent node must be defined');\n    if (isProceduralRenderer(renderer)) {\n        renderer.appendChild(parent, child);\n    }\n    else {\n        parent.appendChild(child);\n    }\n}\nfunction nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {\n    if (beforeNode !== null) {\n        nativeInsertBefore(renderer, parent, child, beforeNode, isMove);\n    }\n    else {\n        nativeAppendChild(renderer, parent, child);\n    }\n}\n/** Removes a node from the DOM given its native parent. */\nfunction nativeRemoveChild(renderer, parent, child, isHostElement) {\n    if (isProceduralRenderer(renderer)) {\n        renderer.removeChild(parent, child, isHostElement);\n    }\n    else {\n        parent.removeChild(child);\n    }\n}\n/**\n * Returns a native parent of a given native node.\n */\nfunction nativeParentNode(renderer, node) {\n    return (isProceduralRenderer(renderer) ? renderer.parentNode(node) : node.parentNode);\n}\n/**\n * Returns a native sibling of a given native node.\n */\nfunction nativeNextSibling(renderer, node) {\n    return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling;\n}\n/**\n * Find a node in front of which `currentTNode` should be inserted.\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account if i18n code has been invoked.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNode(parentTNode, currentTNode, lView) {\n    return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView);\n}\n/**\n * Find a node in front of which `currentTNode` should be inserted. (Does not take i18n into\n * account)\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * does not take `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView) {\n    if (parentTNode.type & (8 /* ElementContainer */ | 32 /* Icu */)) {\n        return getNativeByTNode(parentTNode, lView);\n    }\n    return null;\n}\n/**\n * Tree shakable boundary for `getInsertInFrontOfRNodeWithI18n` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithNoI18n;\n/**\n * Tree shakable boundary for `processI18nInsertBefore` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _processI18nInsertBefore;\nfunction setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore) {\n    _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n;\n    _processI18nInsertBefore = processI18nInsertBefore;\n}\n/**\n * Appends the `child` native node (or a collection of nodes) to the `parent`.\n *\n * @param tView The `TView' to be appended\n * @param lView The current LView\n * @param childRNode The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n */\nfunction appendChild(tView, lView, childRNode, childTNode) {\n    const parentRNode = getParentRElement(tView, childTNode, lView);\n    const renderer = lView[RENDERER];\n    const parentTNode = childTNode.parent || lView[T_HOST];\n    const anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView);\n    if (parentRNode != null) {\n        if (Array.isArray(childRNode)) {\n            for (let i = 0; i < childRNode.length; i++) {\n                nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false);\n            }\n        }\n        else {\n            nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false);\n        }\n    }\n    _processI18nInsertBefore !== undefined &&\n        _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode);\n}\n/**\n * Returns the first native node for a given LView, starting from the provided TNode.\n *\n * Native nodes are returned in the order in which those appear in the native tree (DOM).\n */\nfunction getFirstNativeNode(lView, tNode) {\n    if (tNode !== null) {\n        ngDevMode &&\n            assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */ | 32 /* Icu */ | 16 /* Projection */);\n        const tNodeType = tNode.type;\n        if (tNodeType & 3 /* AnyRNode */) {\n            return getNativeByTNode(tNode, lView);\n        }\n        else if (tNodeType & 4 /* Container */) {\n            return getBeforeNodeForView(-1, lView[tNode.index]);\n        }\n        else if (tNodeType & 8 /* ElementContainer */) {\n            const elIcuContainerChild = tNode.child;\n            if (elIcuContainerChild !== null) {\n                return getFirstNativeNode(lView, elIcuContainerChild);\n            }\n            else {\n                const rNodeOrLContainer = lView[tNode.index];\n                if (isLContainer(rNodeOrLContainer)) {\n                    return getBeforeNodeForView(-1, rNodeOrLContainer);\n                }\n                else {\n                    return unwrapRNode(rNodeOrLContainer);\n                }\n            }\n        }\n        else if (tNodeType & 32 /* Icu */) {\n            let nextRNode = icuContainerIterate(tNode, lView);\n            let rNode = nextRNode();\n            // If the ICU container has no nodes, than we use the ICU anchor as the node.\n            return rNode || unwrapRNode(lView[tNode.index]);\n        }\n        else {\n            const projectionNodes = getProjectionNodes(lView, tNode);\n            if (projectionNodes !== null) {\n                if (Array.isArray(projectionNodes)) {\n                    return projectionNodes[0];\n                }\n                const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n                ngDevMode && assertParentView(parentView);\n                return getFirstNativeNode(parentView, projectionNodes);\n            }\n            else {\n                return getFirstNativeNode(lView, tNode.next);\n            }\n        }\n    }\n    return null;\n}\nfunction getProjectionNodes(lView, tNode) {\n    if (tNode !== null) {\n        const componentView = lView[DECLARATION_COMPONENT_VIEW];\n        const componentHost = componentView[T_HOST];\n        const slotIdx = tNode.projection;\n        ngDevMode && assertProjectionSlots(lView);\n        return componentHost.projection[slotIdx];\n    }\n    return null;\n}\nfunction getBeforeNodeForView(viewIndexInContainer, lContainer) {\n    const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n    if (nextViewIndex < lContainer.length) {\n        const lView = lContainer[nextViewIndex];\n        const firstTNodeOfView = lView[TVIEW].firstChild;\n        if (firstTNodeOfView !== null) {\n            return getFirstNativeNode(lView, firstTNodeOfView);\n        }\n    }\n    return lContainer[NATIVE];\n}\n/**\n * Removes a native node itself using a given renderer. To remove the node we are looking up its\n * parent from the native tree as not all platforms / browsers support the equivalent of\n * node.remove().\n *\n * @param renderer A renderer to be used\n * @param rNode The native node that should be removed\n * @param isHostElement A flag indicating if a node to be removed is a host of a component.\n */\nfunction nativeRemoveNode(renderer, rNode, isHostElement) {\n    ngDevMode && ngDevMode.rendererRemoveNode++;\n    const nativeParent = nativeParentNode(renderer, rNode);\n    if (nativeParent) {\n        nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);\n    }\n}\n/**\n * Performs the operation of `action` on the node. Typically this involves inserting or removing\n * nodes on the LView or projection boundary.\n */\nfunction applyNodes(renderer, action, tNode, lView, parentRElement, beforeNode, isProjection) {\n    while (tNode != null) {\n        ngDevMode && assertTNodeForLView(tNode, lView);\n        ngDevMode &&\n            assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */ | 16 /* Projection */ | 32 /* Icu */);\n        const rawSlotValue = lView[tNode.index];\n        const tNodeType = tNode.type;\n        if (isProjection) {\n            if (action === 0 /* Create */) {\n                rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n                tNode.flags |= 4 /* isProjected */;\n            }\n        }\n        if ((tNode.flags & 64 /* isDetached */) !== 64 /* isDetached */) {\n            if (tNodeType & 8 /* ElementContainer */) {\n                applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);\n                applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n            }\n            else if (tNodeType & 32 /* Icu */) {\n                const nextRNode = icuContainerIterate(tNode, lView);\n                let rNode;\n                while (rNode = nextRNode()) {\n                    applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n                }\n                applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n            }\n            else if (tNodeType & 16 /* Projection */) {\n                applyProjectionRecursive(renderer, action, lView, tNode, parentRElement, beforeNode);\n            }\n            else {\n                ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 4 /* Container */);\n                applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n            }\n        }\n        tNode = isProjection ? tNode.projectionNext : tNode.next;\n    }\n}\nfunction applyView(tView, lView, renderer, action, parentRElement, beforeNode) {\n    applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false);\n}\n/**\n * `applyProjection` performs operation on the projection.\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param tView The `TView` of `LView` which needs to be inserted, detached, destroyed\n * @param lView The `LView` which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n */\nfunction applyProjection(tView, lView, tProjectionNode) {\n    const renderer = lView[RENDERER];\n    const parentRNode = getParentRElement(tView, tProjectionNode, lView);\n    const parentTNode = tProjectionNode.parent || lView[T_HOST];\n    let beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView);\n    applyProjectionRecursive(renderer, 0 /* Create */, lView, tProjectionNode, parentRNode, beforeNode);\n}\n/**\n * `applyProjectionRecursive` performs operation on the projection specified by `action` (insert,\n * detach, destroy)\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param renderer Render to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyProjectionRecursive(renderer, action, lView, tProjectionNode, parentRElement, beforeNode) {\n    const componentLView = lView[DECLARATION_COMPONENT_VIEW];\n    const componentNode = componentLView[T_HOST];\n    ngDevMode &&\n        assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index');\n    const nodeToProjectOrRNodes = componentNode.projection[tProjectionNode.projection];\n    if (Array.isArray(nodeToProjectOrRNodes)) {\n        // This should not exist, it is a bit of a hack. When we bootstrap a top level node and we\n        // need to support passing projectable nodes, so we cheat and put them in the TNode\n        // of the Host TView. (Yes we put instance info at the T Level). We can get away with it\n        // because we know that that TView is not shared and therefore it will not be a problem.\n        // This should be refactored and cleaned up.\n        for (let i = 0; i < nodeToProjectOrRNodes.length; i++) {\n            const rNode = nodeToProjectOrRNodes[i];\n            applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n        }\n    }\n    else {\n        let nodeToProject = nodeToProjectOrRNodes;\n        const projectedComponentLView = componentLView[PARENT];\n        applyNodes(renderer, action, nodeToProject, projectedComponentLView, parentRElement, beforeNode, true);\n    }\n}\n/**\n * `applyContainer` performs an operation on the container and its views as specified by\n * `action` (insert, detach, destroy)\n *\n * Inserting a Container is complicated by the fact that the container may have Views which\n * themselves have containers or projections.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lContainer The LContainer which needs to be inserted, detached, destroyed.\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyContainer(renderer, action, lContainer, parentRElement, beforeNode) {\n    ngDevMode && assertLContainer(lContainer);\n    const anchor = lContainer[NATIVE]; // LContainer has its own before node.\n    const native = unwrapRNode(lContainer);\n    // An LContainer can be created dynamically on any node by injecting ViewContainerRef.\n    // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor\n    // node (comment in the DOM) that will be different from the LContainer's host node. In this\n    // particular case we need to execute action on 2 nodes:\n    // - container's host node (this is done in the executeActionOnElementOrContainer)\n    // - container's host node (this is done here)\n    if (anchor !== native) {\n        // This is very strange to me (Misko). I would expect that the native is same as anchor. I\n        // don't see a reason why they should be different, but they are.\n        //\n        // If they are we need to process the second anchor as well.\n        applyToElementOrContainer(action, renderer, parentRElement, anchor, beforeNode);\n    }\n    for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n        const lView = lContainer[i];\n        applyView(lView[TVIEW], lView, renderer, action, parentRElement, anchor);\n    }\n}\n/**\n * Writes class/style to element.\n *\n * @param renderer Renderer to use.\n * @param isClassBased `true` if it should be written to `class` (`false` to write to `style`)\n * @param rNode The Node to write to.\n * @param prop Property to write to. This would be the class/style name.\n * @param value Value to write. If `null`/`undefined`/`false` this is considered a remove (set/add\n *        otherwise).\n */\nfunction applyStyling(renderer, isClassBased, rNode, prop, value) {\n    const isProcedural = isProceduralRenderer(renderer);\n    if (isClassBased) {\n        // We actually want JS true/false here because any truthy value should add the class\n        if (!value) {\n            ngDevMode && ngDevMode.rendererRemoveClass++;\n            if (isProcedural) {\n                renderer.removeClass(rNode, prop);\n            }\n            else {\n                rNode.classList.remove(prop);\n            }\n        }\n        else {\n            ngDevMode && ngDevMode.rendererAddClass++;\n            if (isProcedural) {\n                renderer.addClass(rNode, prop);\n            }\n            else {\n                ngDevMode && assertDefined(rNode.classList, 'HTMLElement expected');\n                rNode.classList.add(prop);\n            }\n        }\n    }\n    else {\n        let flags = prop.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase;\n        if (value == null /** || value === undefined */) {\n            ngDevMode && ngDevMode.rendererRemoveStyle++;\n            if (isProcedural) {\n                renderer.removeStyle(rNode, prop, flags);\n            }\n            else {\n                rNode.style.removeProperty(prop);\n            }\n        }\n        else {\n            // A value is important if it ends with `!important`. The style\n            // parser strips any semicolons at the end of the value.\n            const isImportant = typeof value === 'string' ? value.endsWith('!important') : false;\n            if (isImportant) {\n                // !important has to be stripped from the value for it to be valid.\n                value = value.slice(0, -10);\n                flags |= RendererStyleFlags2.Important;\n            }\n            ngDevMode && ngDevMode.rendererSetStyle++;\n            if (isProcedural) {\n                renderer.setStyle(rNode, prop, value, flags);\n            }\n            else {\n                ngDevMode && assertDefined(rNode.style, 'HTMLElement expected');\n                rNode.style.setProperty(prop, value, isImportant ? 'important' : '');\n            }\n        }\n    }\n}\n/**\n * Write `cssText` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nfunction writeDirectStyle(renderer, element, newValue) {\n    ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n    if (isProceduralRenderer(renderer)) {\n        renderer.setAttribute(element, 'style', newValue);\n    }\n    else {\n        element.style.cssText = newValue;\n    }\n    ngDevMode && ngDevMode.rendererSetStyle++;\n}\n/**\n * Write `className` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nfunction writeDirectClass(renderer, element, newValue) {\n    ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n    if (isProceduralRenderer(renderer)) {\n        if (newValue === '') {\n            // There are tests in `google3` which expect `element.getAttribute('class')` to be `null`.\n            renderer.removeAttribute(element, 'class');\n        }\n        else {\n            renderer.setAttribute(element, 'class', newValue);\n        }\n    }\n    else {\n        element.className = newValue;\n    }\n    ngDevMode && ngDevMode.rendererSetClassName++;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Returns an index of `classToSearch` in `className` taking token boundaries into account.\n *\n * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`)\n *\n * @param className A string containing classes (whitespace separated)\n * @param classToSearch A class name to locate\n * @param startingIndex Starting location of search\n * @returns an index of the located class (or -1 if not found)\n */\nfunction classIndexOf(className, classToSearch, startingIndex) {\n    ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n    let end = className.length;\n    while (true) {\n        const foundIndex = className.indexOf(classToSearch, startingIndex);\n        if (foundIndex === -1)\n            return foundIndex;\n        if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32 /* SPACE */) {\n            // Ensure that it has leading whitespace\n            const length = classToSearch.length;\n            if (foundIndex + length === end ||\n                className.charCodeAt(foundIndex + length) <= 32 /* SPACE */) {\n                // Ensure that it has trailing whitespace\n                return foundIndex;\n            }\n        }\n        // False positive, keep searching from where we left off.\n        startingIndex = foundIndex + 1;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst unusedValueToPlacateAjd$1 = unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5;\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n/**\n * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)\n *\n * @param attrs `TAttributes` to search through.\n * @param cssClassToMatch class to match (lowercase)\n * @param isProjectionMode Whether or not class matching should look into the attribute `class` in\n *    addition to the `AttributeMarker.Classes`.\n */\nfunction isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {\n    // TODO(misko): The fact that this function needs to know about `isProjectionMode` seems suspect.\n    // It is strange to me that sometimes the class information comes in form of `class` attribute\n    // and sometimes in form of `AttributeMarker.Classes`. Some investigation is needed to determine\n    // if that is the right behavior.\n    ngDevMode &&\n        assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');\n    let i = 0;\n    while (i < attrs.length) {\n        let item = attrs[i++];\n        if (isProjectionMode && item === 'class') {\n            item = attrs[i];\n            if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) {\n                return true;\n            }\n        }\n        else if (item === 1 /* Classes */) {\n            // We found the classes section. Start searching for the class.\n            while (i < attrs.length && typeof (item = attrs[i++]) == 'string') {\n                // while we have strings\n                if (item.toLowerCase() === cssClassToMatch)\n                    return true;\n            }\n            return false;\n        }\n    }\n    return false;\n}\n/**\n * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).\n *\n * @param tNode current TNode\n */\nfunction isInlineTemplate(tNode) {\n    return tNode.type === 4 /* Container */ && tNode.value !== NG_TEMPLATE_SELECTOR;\n}\n/**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\nfunction hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {\n    const tagNameToCompare = tNode.type === 4 /* Container */ && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;\n    return currentSelector === tagNameToCompare;\n}\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\nfunction isNodeMatchingSelector(tNode, selector, isProjectionMode) {\n    ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n    let mode = 4 /* ELEMENT */;\n    const nodeAttrs = tNode.attrs || [];\n    // Find the index of first attribute that has no value, only a name.\n    const nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs);\n    // When processing \":not\" selectors, we skip to the next \":not\" if the\n    // current one doesn't match\n    let skipToNextSelector = false;\n    for (let i = 0; i < selector.length; i++) {\n        const current = selector[i];\n        if (typeof current === 'number') {\n            // If we finish processing a :not selector and it hasn't failed, return false\n            if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n                return false;\n            }\n            // If we are skipping to the next :not() and this mode flag is positive,\n            // it's a part of the current :not() selector, and we should keep skipping\n            if (skipToNextSelector && isPositive(current))\n                continue;\n            skipToNextSelector = false;\n            mode = current | (mode & 1 /* NOT */);\n            continue;\n        }\n        if (skipToNextSelector)\n            continue;\n        if (mode & 4 /* ELEMENT */) {\n            mode = 2 /* ATTRIBUTE */ | mode & 1 /* NOT */;\n            if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) ||\n                current === '' && selector.length === 1) {\n                if (isPositive(mode))\n                    return false;\n                skipToNextSelector = true;\n            }\n        }\n        else {\n            const selectorAttrValue = mode & 8 /* CLASS */ ? current : selector[++i];\n            // special case for matching against classes when a tNode has been instantiated with\n            // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo'])\n            if ((mode & 8 /* CLASS */) && tNode.attrs !== null) {\n                if (!isCssClassMatching(tNode.attrs, selectorAttrValue, isProjectionMode)) {\n                    if (isPositive(mode))\n                        return false;\n                    skipToNextSelector = true;\n                }\n                continue;\n            }\n            const attrName = (mode & 8 /* CLASS */) ? 'class' : current;\n            const attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate(tNode), isProjectionMode);\n            if (attrIndexInNode === -1) {\n                if (isPositive(mode))\n                    return false;\n                skipToNextSelector = true;\n                continue;\n            }\n            if (selectorAttrValue !== '') {\n                let nodeAttrValue;\n                if (attrIndexInNode > nameOnlyMarkerIdx) {\n                    nodeAttrValue = '';\n                }\n                else {\n                    ngDevMode &&\n                        assertNotEqual(nodeAttrs[attrIndexInNode], 0 /* NamespaceURI */, 'We do not match directives on namespaced attributes');\n                    // we lowercase the attribute value to be able to match\n                    // selectors without case-sensitivity\n                    // (selectors are already in lowercase when generated)\n                    nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase();\n                }\n                const compareAgainstClassName = mode & 8 /* CLASS */ ? nodeAttrValue : null;\n                if (compareAgainstClassName &&\n                    classIndexOf(compareAgainstClassName, selectorAttrValue, 0) !== -1 ||\n                    mode & 2 /* ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) {\n                    if (isPositive(mode))\n                        return false;\n                    skipToNextSelector = true;\n                }\n            }\n        }\n    }\n    return isPositive(mode) || skipToNextSelector;\n}\nfunction isPositive(mode) {\n    return (mode & 1 /* NOT */) === 0;\n}\n/**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes                   | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection     | YES               | YES                 | NO                  | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive      | NO                | NO                  | YES                 | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES               | YES                 | NO                  | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive  | YES               | YES                 | NO                  | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g `<ng-template>`).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\nfunction findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) {\n    if (attrs === null)\n        return -1;\n    let i = 0;\n    if (isProjectionMode || !isInlineTemplate) {\n        let bindingsMode = false;\n        while (i < attrs.length) {\n            const maybeAttrName = attrs[i];\n            if (maybeAttrName === name) {\n                return i;\n            }\n            else if (maybeAttrName === 3 /* Bindings */ || maybeAttrName === 6 /* I18n */) {\n                bindingsMode = true;\n            }\n            else if (maybeAttrName === 1 /* Classes */ || maybeAttrName === 2 /* Styles */) {\n                let value = attrs[++i];\n                // We should skip classes here because we have a separate mechanism for\n                // matching classes in projection mode.\n                while (typeof value === 'string') {\n                    value = attrs[++i];\n                }\n                continue;\n            }\n            else if (maybeAttrName === 4 /* Template */) {\n                // We do not care about Template attributes in this scenario.\n                break;\n            }\n            else if (maybeAttrName === 0 /* NamespaceURI */) {\n                // Skip the whole namespaced attribute and value. This is by design.\n                i += 4;\n                continue;\n            }\n            // In binding mode there are only names, rather than name-value pairs.\n            i += bindingsMode ? 1 : 2;\n        }\n        // We did not match the attribute\n        return -1;\n    }\n    else {\n        return matchTemplateAttribute(attrs, name);\n    }\n}\nfunction isNodeMatchingSelectorList(tNode, selector, isProjectionMode = false) {\n    for (let i = 0; i < selector.length; i++) {\n        if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction getProjectAsAttrValue(tNode) {\n    const nodeAttrs = tNode.attrs;\n    if (nodeAttrs != null) {\n        const ngProjectAsAttrIdx = nodeAttrs.indexOf(5 /* ProjectAs */);\n        // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n        // (attribute names are stored at even indexes)\n        if ((ngProjectAsAttrIdx & 1) === 0) {\n            return nodeAttrs[ngProjectAsAttrIdx + 1];\n        }\n    }\n    return null;\n}\nfunction getNameOnlyMarkerIndex(nodeAttrs) {\n    for (let i = 0; i < nodeAttrs.length; i++) {\n        const nodeAttr = nodeAttrs[i];\n        if (isNameOnlyAttributeMarker(nodeAttr)) {\n            return i;\n        }\n    }\n    return nodeAttrs.length;\n}\nfunction matchTemplateAttribute(attrs, name) {\n    let i = attrs.indexOf(4 /* Template */);\n    if (i > -1) {\n        i++;\n        while (i < attrs.length) {\n            const attr = attrs[i];\n            // Return in case we checked all template attrs and are switching to the next section in the\n            // attrs array (that starts with a number that represents an attribute marker).\n            if (typeof attr === 'number')\n                return -1;\n            if (attr === name)\n                return i;\n            i++;\n        }\n    }\n    return -1;\n}\n/**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\nfunction isSelectorInSelectorList(selector, list) {\n    selectorListLoop: for (let i = 0; i < list.length; i++) {\n        const currentSelectorInList = list[i];\n        if (selector.length !== currentSelectorInList.length) {\n            continue;\n        }\n        for (let j = 0; j < selector.length; j++) {\n            if (selector[j] !== currentSelectorInList[j]) {\n                continue selectorListLoop;\n            }\n        }\n        return true;\n    }\n    return false;\n}\nfunction maybeWrapInNotSelector(isNegativeMode, chunk) {\n    return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\nfunction stringifyCSSSelector(selector) {\n    let result = selector[0];\n    let i = 1;\n    let mode = 2 /* ATTRIBUTE */;\n    let currentChunk = '';\n    let isNegativeMode = false;\n    while (i < selector.length) {\n        let valueOrMarker = selector[i];\n        if (typeof valueOrMarker === 'string') {\n            if (mode & 2 /* ATTRIBUTE */) {\n                const attrValue = selector[++i];\n                currentChunk +=\n                    '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n            }\n            else if (mode & 8 /* CLASS */) {\n                currentChunk += '.' + valueOrMarker;\n            }\n            else if (mode & 4 /* ELEMENT */) {\n                currentChunk += ' ' + valueOrMarker;\n            }\n        }\n        else {\n            //\n            // Append current chunk to the final result in case we come across SelectorFlag, which\n            // indicates that the previous section of a selector is over. We need to accumulate content\n            // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g.\n            // ```\n            //  ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC']\n            // ```\n            // should be transformed to `.classA :not(.classB .classC)`.\n            //\n            // Note: for negative selector part, we accumulate content between flags until we find the\n            // next negative flag. This is needed to support a case where `:not()` rule contains more than\n            // one chunk, e.g. the following selector:\n            // ```\n            //  ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar']\n            // ```\n            // should be stringified to `:not(p.foo) :not(.bar)`\n            //\n            if (currentChunk !== '' && !isPositive(valueOrMarker)) {\n                result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n                currentChunk = '';\n            }\n            mode = valueOrMarker;\n            // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n            // mode is maintained for remaining chunks of a selector.\n            isNegativeMode = isNegativeMode || !isPositive(mode);\n        }\n        i++;\n    }\n    if (currentChunk !== '') {\n        result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n    }\n    return result;\n}\n/**\n * Generates string representation of CSS selector in parsed form.\n *\n * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing\n * additional parsing at runtime (for example, for directive matching). However in some cases (for\n * example, while bootstrapping a component), a string version of the selector is required to query\n * for the host element on the page. This function takes the parsed form of a selector and returns\n * its string representation.\n *\n * @param selectorList selector in parsed form\n * @returns string representation of a given selector\n */\nfunction stringifyCSSSelectorList(selectorList) {\n    return selectorList.map(stringifyCSSSelector).join(',');\n}\n/**\n * Extracts attributes and classes information from a given CSS selector.\n *\n * This function is used while creating a component dynamically. In this case, the host element\n * (that is created dynamically) should contain attributes and classes specified in component's CSS\n * selector.\n *\n * @param selector CSS selector in parsed form (in a form of array)\n * @returns object with `attrs` and `classes` fields that contain extracted information\n */\nfunction extractAttrsAndClassesFromSelector(selector) {\n    const attrs = [];\n    const classes = [];\n    let i = 1;\n    let mode = 2 /* ATTRIBUTE */;\n    while (i < selector.length) {\n        let valueOrMarker = selector[i];\n        if (typeof valueOrMarker === 'string') {\n            if (mode === 2 /* ATTRIBUTE */) {\n                if (valueOrMarker !== '') {\n                    attrs.push(valueOrMarker, selector[++i]);\n                }\n            }\n            else if (mode === 8 /* CLASS */) {\n                classes.push(valueOrMarker);\n            }\n        }\n        else {\n            // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n            // mode is maintained for remaining chunks of a selector. Since attributes and classes are\n            // extracted only for \"positive\" part of the selector, we can stop here.\n            if (!isPositive(mode))\n                break;\n            mode = valueOrMarker;\n        }\n        i++;\n    }\n    return { attrs, classes };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** A special value which designates that a value has not changed. */\nconst NO_CHANGE = (typeof ngDevMode === 'undefined' || ngDevMode) ? { __brand__: 'NO_CHANGE' } : {};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Advances to an element for later binding instructions.\n *\n * Used in conjunction with instructions like {@link property} to act on elements with specified\n * indices, for example those created with {@link element} or {@link elementStart}.\n *\n * ```ts\n * (rf: RenderFlags, ctx: any) => {\n *   if (rf & 1) {\n *     text(0, 'Hello');\n *     text(1, 'Goodbye')\n *     element(2, 'div');\n *   }\n *   if (rf & 2) {\n *     advance(2); // Advance twice to the <div>.\n *     property('title', 'test');\n *   }\n *  }\n * ```\n * @param delta Number of elements to advance forwards by.\n *\n * @codeGenApi\n */\nfunction ɵɵadvance(delta) {\n    ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');\n    selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, isInCheckNoChangesMode());\n}\nfunction selectIndexInternal(tView, lView, index, checkNoChangesMode) {\n    ngDevMode && assertIndexInDeclRange(lView, index);\n    // Flush the initial hooks for elements in the view that have been added up to this point.\n    // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n    if (!checkNoChangesMode) {\n        const hooksInitPhaseCompleted = (lView[FLAGS] & 3 /* InitPhaseStateMask */) === 3 /* InitPhaseCompleted */;\n        if (hooksInitPhaseCompleted) {\n            const preOrderCheckHooks = tView.preOrderCheckHooks;\n            if (preOrderCheckHooks !== null) {\n                executeCheckHooks(lView, preOrderCheckHooks, index);\n            }\n        }\n        else {\n            const preOrderHooks = tView.preOrderHooks;\n            if (preOrderHooks !== null) {\n                executeInitAndCheckHooks(lView, preOrderHooks, 0 /* OnInitHooksToBeRun */, index);\n            }\n        }\n    }\n    // We must set the selected index *after* running the hooks, because hooks may have side-effects\n    // that cause other template functions to run, thus updating the selected index, which is global\n    // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index\n    // will be altered by the time we leave the `ɵɵadvance` instruction.\n    setSelectedIndex(index);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction toTStylingRange(prev, next) {\n    ngDevMode && assertNumberInRange(prev, 0, 32767 /* UNSIGNED_MASK */);\n    ngDevMode && assertNumberInRange(next, 0, 32767 /* UNSIGNED_MASK */);\n    return (prev << 17 /* PREV_SHIFT */ | next << 2 /* NEXT_SHIFT */);\n}\nfunction getTStylingRangePrev(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange >> 17 /* PREV_SHIFT */) & 32767 /* UNSIGNED_MASK */;\n}\nfunction getTStylingRangePrevDuplicate(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange & 2 /* PREV_DUPLICATE */) ==\n        2 /* PREV_DUPLICATE */;\n}\nfunction setTStylingRangePrev(tStylingRange, previous) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    ngDevMode && assertNumberInRange(previous, 0, 32767 /* UNSIGNED_MASK */);\n    return ((tStylingRange & ~4294836224 /* PREV_MASK */) |\n        (previous << 17 /* PREV_SHIFT */));\n}\nfunction setTStylingRangePrevDuplicate(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange | 2 /* PREV_DUPLICATE */);\n}\nfunction getTStylingRangeNext(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange & 131068 /* NEXT_MASK */) >> 2 /* NEXT_SHIFT */;\n}\nfunction setTStylingRangeNext(tStylingRange, next) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    ngDevMode && assertNumberInRange(next, 0, 32767 /* UNSIGNED_MASK */);\n    return ((tStylingRange & ~131068 /* NEXT_MASK */) | //\n        next << 2 /* NEXT_SHIFT */);\n}\nfunction getTStylingRangeNextDuplicate(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange & 1 /* NEXT_DUPLICATE */) ===\n        1 /* NEXT_DUPLICATE */;\n}\nfunction setTStylingRangeNextDuplicate(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange | 1 /* NEXT_DUPLICATE */);\n}\nfunction getTStylingRangeTail(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    const next = getTStylingRangeNext(tStylingRange);\n    return next === 0 ? getTStylingRangePrev(tStylingRange) : next;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Patch a `debug` property on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debug Value to patch\n */\nfunction attachDebugObject(obj, debug) {\n    if (ngDevMode) {\n        Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });\n    }\n    else {\n        throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\n    }\n}\n/**\n * Patch a `debug` property getter on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debugGetter Getter returning a value to patch\n */\nfunction attachDebugGetter(obj, debugGetter) {\n    if (ngDevMode) {\n        Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });\n    }\n    else {\n        throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE = ((typeof ngDevMode === 'undefined' || !!ngDevMode) && initNgDevMode());\n/*\n * This file contains conditionally attached classes which provide human readable (debug) level\n * information for `LView`, `LContainer` and other internal data structures. These data structures\n * are stored internally as array which makes it very difficult during debugging to reason about the\n * current state of the system.\n *\n * Patching the array with extra property does change the array's hidden class' but it does not\n * change the cost of access, therefore this patching should not have significant if any impact in\n * `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)\n *\n * So instead of seeing:\n * ```\n * Array(30) [Object, 659, null, …]\n * ```\n *\n * You get to see:\n * ```\n * LViewDebug {\n *   views: [...],\n *   flags: {attached: true, ...}\n *   nodes: [\n *     {html: '<div id=\"123\">', ..., nodes: [\n *       {html: '<span>', ..., nodes: null}\n *     ]}\n *   ]\n * }\n * ```\n */\nlet LVIEW_COMPONENT_CACHE;\nlet LVIEW_EMBEDDED_CACHE;\nlet LVIEW_ROOT;\n/**\n * This function clones a blueprint and creates LView.\n *\n * Simple slice will keep the same type, and we need it to be LView\n */\nfunction cloneToLViewFromTViewBlueprint(tView) {\n    const debugTView = tView;\n    const lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);\n    return lView.concat(tView.blueprint);\n}\nfunction getLViewToClone(type, name) {\n    switch (type) {\n        case 0 /* Root */:\n            if (LVIEW_ROOT === undefined)\n                LVIEW_ROOT = new (createNamedArrayType('LRootView'))();\n            return LVIEW_ROOT;\n        case 1 /* Component */:\n            if (LVIEW_COMPONENT_CACHE === undefined)\n                LVIEW_COMPONENT_CACHE = new Map();\n            let componentArray = LVIEW_COMPONENT_CACHE.get(name);\n            if (componentArray === undefined) {\n                componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();\n                LVIEW_COMPONENT_CACHE.set(name, componentArray);\n            }\n            return componentArray;\n        case 2 /* Embedded */:\n            if (LVIEW_EMBEDDED_CACHE === undefined)\n                LVIEW_EMBEDDED_CACHE = new Map();\n            let embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);\n            if (embeddedArray === undefined) {\n                embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();\n                LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);\n            }\n            return embeddedArray;\n    }\n}\nfunction nameSuffix(text) {\n    if (text == null)\n        return '';\n    const index = text.lastIndexOf('_Template');\n    return '_' + (index === -1 ? text : text.substr(0, index));\n}\n/**\n * This class is a debug version of Object literal so that we can have constructor name show up\n * in\n * debug tools in ngDevMode.\n */\nconst TViewConstructor = class TView {\n    constructor(type, blueprint, template, queries, viewQuery, declTNode, data, bindingStartIndex, expandoStartIndex, hostBindingOpCodes, firstCreatePass, firstUpdatePass, staticViewQueries, staticContentQueries, preOrderHooks, preOrderCheckHooks, contentHooks, contentCheckHooks, viewHooks, viewCheckHooks, destroyHooks, cleanup, contentQueries, components, directiveRegistry, pipeRegistry, firstChild, schemas, consts, incompleteFirstPass, _decls, _vars) {\n        this.type = type;\n        this.blueprint = blueprint;\n        this.template = template;\n        this.queries = queries;\n        this.viewQuery = viewQuery;\n        this.declTNode = declTNode;\n        this.data = data;\n        this.bindingStartIndex = bindingStartIndex;\n        this.expandoStartIndex = expandoStartIndex;\n        this.hostBindingOpCodes = hostBindingOpCodes;\n        this.firstCreatePass = firstCreatePass;\n        this.firstUpdatePass = firstUpdatePass;\n        this.staticViewQueries = staticViewQueries;\n        this.staticContentQueries = staticContentQueries;\n        this.preOrderHooks = preOrderHooks;\n        this.preOrderCheckHooks = preOrderCheckHooks;\n        this.contentHooks = contentHooks;\n        this.contentCheckHooks = contentCheckHooks;\n        this.viewHooks = viewHooks;\n        this.viewCheckHooks = viewCheckHooks;\n        this.destroyHooks = destroyHooks;\n        this.cleanup = cleanup;\n        this.contentQueries = contentQueries;\n        this.components = components;\n        this.directiveRegistry = directiveRegistry;\n        this.pipeRegistry = pipeRegistry;\n        this.firstChild = firstChild;\n        this.schemas = schemas;\n        this.consts = consts;\n        this.incompleteFirstPass = incompleteFirstPass;\n        this._decls = _decls;\n        this._vars = _vars;\n    }\n    get template_() {\n        const buf = [];\n        processTNodeChildren(this.firstChild, buf);\n        return buf.join('');\n    }\n    get type_() {\n        return TViewTypeAsString[this.type] || `TViewType.?${this.type}?`;\n    }\n};\nclass TNode {\n    constructor(tView_, //\n    type, //\n    index, //\n    insertBeforeIndex, //\n    injectorIndex, //\n    directiveStart, //\n    directiveEnd, //\n    directiveStylingLast, //\n    propertyBindings, //\n    flags, //\n    providerIndexes, //\n    value, //\n    attrs, //\n    mergedAttrs, //\n    localNames, //\n    initialInputs, //\n    inputs, //\n    outputs, //\n    tViews, //\n    next, //\n    projectionNext, //\n    child, //\n    parent, //\n    projection, //\n    styles, //\n    stylesWithoutHost, //\n    residualStyles, //\n    classes, //\n    classesWithoutHost, //\n    residualClasses, //\n    classBindings, //\n    styleBindings) {\n        this.tView_ = tView_;\n        this.type = type;\n        this.index = index;\n        this.insertBeforeIndex = insertBeforeIndex;\n        this.injectorIndex = injectorIndex;\n        this.directiveStart = directiveStart;\n        this.directiveEnd = directiveEnd;\n        this.directiveStylingLast = directiveStylingLast;\n        this.propertyBindings = propertyBindings;\n        this.flags = flags;\n        this.providerIndexes = providerIndexes;\n        this.value = value;\n        this.attrs = attrs;\n        this.mergedAttrs = mergedAttrs;\n        this.localNames = localNames;\n        this.initialInputs = initialInputs;\n        this.inputs = inputs;\n        this.outputs = outputs;\n        this.tViews = tViews;\n        this.next = next;\n        this.projectionNext = projectionNext;\n        this.child = child;\n        this.parent = parent;\n        this.projection = projection;\n        this.styles = styles;\n        this.stylesWithoutHost = stylesWithoutHost;\n        this.residualStyles = residualStyles;\n        this.classes = classes;\n        this.classesWithoutHost = classesWithoutHost;\n        this.residualClasses = residualClasses;\n        this.classBindings = classBindings;\n        this.styleBindings = styleBindings;\n    }\n    /**\n     * Return a human debug version of the set of `NodeInjector`s which will be consulted when\n     * resolving tokens from this `TNode`.\n     *\n     * When debugging applications, it is often difficult to determine which `NodeInjector`s will be\n     * consulted. This method shows a list of `DebugNode`s representing the `TNode`s which will be\n     * consulted in order when resolving a token starting at this `TNode`.\n     *\n     * The original data is stored in `LView` and `TView` with a lot of offset indexes, and so it is\n     * difficult to reason about.\n     *\n     * @param lView The `LView` instance for this `TNode`.\n     */\n    debugNodeInjectorPath(lView) {\n        const path = [];\n        let injectorIndex = getInjectorIndex(this, lView);\n        if (injectorIndex === -1) {\n            // Looks like the current `TNode` does not have `NodeInjector` associated with it => look for\n            // parent NodeInjector.\n            const parentLocation = getParentInjectorLocation(this, lView);\n            if (parentLocation !== NO_PARENT_INJECTOR) {\n                // We found a parent, so start searching from the parent location.\n                injectorIndex = getParentInjectorIndex(parentLocation);\n                lView = getParentInjectorView(parentLocation, lView);\n            }\n            else {\n                // No parents have been found, so there are no `NodeInjector`s to consult.\n            }\n        }\n        while (injectorIndex !== -1) {\n            ngDevMode && assertNodeInjector(lView, injectorIndex);\n            const tNode = lView[TVIEW].data[injectorIndex + 8 /* TNODE */];\n            path.push(buildDebugNode(tNode, lView));\n            const parentLocation = lView[injectorIndex + 8 /* PARENT */];\n            if (parentLocation === NO_PARENT_INJECTOR) {\n                injectorIndex = -1;\n            }\n            else {\n                injectorIndex = getParentInjectorIndex(parentLocation);\n                lView = getParentInjectorView(parentLocation, lView);\n            }\n        }\n        return path;\n    }\n    get type_() {\n        return toTNodeTypeAsString(this.type) || `TNodeType.?${this.type}?`;\n    }\n    get flags_() {\n        const flags = [];\n        if (this.flags & 16 /* hasClassInput */)\n            flags.push('TNodeFlags.hasClassInput');\n        if (this.flags & 8 /* hasContentQuery */)\n            flags.push('TNodeFlags.hasContentQuery');\n        if (this.flags & 32 /* hasStyleInput */)\n            flags.push('TNodeFlags.hasStyleInput');\n        if (this.flags & 128 /* hasHostBindings */)\n            flags.push('TNodeFlags.hasHostBindings');\n        if (this.flags & 2 /* isComponentHost */)\n            flags.push('TNodeFlags.isComponentHost');\n        if (this.flags & 1 /* isDirectiveHost */)\n            flags.push('TNodeFlags.isDirectiveHost');\n        if (this.flags & 64 /* isDetached */)\n            flags.push('TNodeFlags.isDetached');\n        if (this.flags & 4 /* isProjected */)\n            flags.push('TNodeFlags.isProjected');\n        return flags.join('|');\n    }\n    get template_() {\n        if (this.type & 1 /* Text */)\n            return this.value;\n        const buf = [];\n        const tagName = typeof this.value === 'string' && this.value || this.type_;\n        buf.push('<', tagName);\n        if (this.flags) {\n            buf.push(' ', this.flags_);\n        }\n        if (this.attrs) {\n            for (let i = 0; i < this.attrs.length;) {\n                const attrName = this.attrs[i++];\n                if (typeof attrName == 'number') {\n                    break;\n                }\n                const attrValue = this.attrs[i++];\n                buf.push(' ', attrName, '=\"', attrValue, '\"');\n            }\n        }\n        buf.push('>');\n        processTNodeChildren(this.child, buf);\n        buf.push('</', tagName, '>');\n        return buf.join('');\n    }\n    get styleBindings_() {\n        return toDebugStyleBinding(this, false);\n    }\n    get classBindings_() {\n        return toDebugStyleBinding(this, true);\n    }\n    get providerIndexStart_() {\n        return this.providerIndexes & 1048575 /* ProvidersStartIndexMask */;\n    }\n    get providerIndexEnd_() {\n        return this.providerIndexStart_ +\n            (this.providerIndexes >>> 20 /* CptViewProvidersCountShift */);\n    }\n}\nconst TNodeDebug = TNode;\nfunction toDebugStyleBinding(tNode, isClassBased) {\n    const tData = tNode.tView_.data;\n    const bindings = [];\n    const range = isClassBased ? tNode.classBindings : tNode.styleBindings;\n    const prev = getTStylingRangePrev(range);\n    const next = getTStylingRangeNext(range);\n    let isTemplate = next !== 0;\n    let cursor = isTemplate ? next : prev;\n    while (cursor !== 0) {\n        const itemKey = tData[cursor];\n        const itemRange = tData[cursor + 1];\n        bindings.unshift({\n            key: itemKey,\n            index: cursor,\n            isTemplate: isTemplate,\n            prevDuplicate: getTStylingRangePrevDuplicate(itemRange),\n            nextDuplicate: getTStylingRangeNextDuplicate(itemRange),\n            nextIndex: getTStylingRangeNext(itemRange),\n            prevIndex: getTStylingRangePrev(itemRange),\n        });\n        if (cursor === prev)\n            isTemplate = false;\n        cursor = getTStylingRangePrev(itemRange);\n    }\n    bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null);\n    return bindings;\n}\nfunction processTNodeChildren(tNode, buf) {\n    while (tNode) {\n        buf.push(tNode.template_);\n        tNode = tNode.next;\n    }\n}\nconst TViewData = NG_DEV_MODE && createNamedArrayType('TViewData') || null;\nlet TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because\n// `LView` constructor could have side-effects.\n/**\n * This function clones a blueprint and creates TData.\n *\n * Simple slice will keep the same type, and we need it to be TData\n */\nfunction cloneToTViewData(list) {\n    if (TVIEWDATA_EMPTY === undefined)\n        TVIEWDATA_EMPTY = new TViewData();\n    return TVIEWDATA_EMPTY.concat(list);\n}\nconst LViewBlueprint = NG_DEV_MODE && createNamedArrayType('LViewBlueprint') || null;\nconst MatchesArray = NG_DEV_MODE && createNamedArrayType('MatchesArray') || null;\nconst TViewComponents = NG_DEV_MODE && createNamedArrayType('TViewComponents') || null;\nconst TNodeLocalNames = NG_DEV_MODE && createNamedArrayType('TNodeLocalNames') || null;\nconst TNodeInitialInputs = NG_DEV_MODE && createNamedArrayType('TNodeInitialInputs') || null;\nconst TNodeInitialData = NG_DEV_MODE && createNamedArrayType('TNodeInitialData') || null;\nconst LCleanup = NG_DEV_MODE && createNamedArrayType('LCleanup') || null;\nconst TCleanup = NG_DEV_MODE && createNamedArrayType('TCleanup') || null;\nfunction attachLViewDebug(lView) {\n    attachDebugObject(lView, new LViewDebug(lView));\n}\nfunction attachLContainerDebug(lContainer) {\n    attachDebugObject(lContainer, new LContainerDebug(lContainer));\n}\nfunction toDebug(obj) {\n    if (obj) {\n        const debug = obj.debug;\n        assertDefined(debug, 'Object does not have a debug representation.');\n        return debug;\n    }\n    else {\n        return obj;\n    }\n}\n/**\n * Use this method to unwrap a native element in `LView` and convert it into HTML for easier\n * reading.\n *\n * @param value possibly wrapped native DOM node.\n * @param includeChildren If `true` then the serialized HTML form will include child elements\n * (same\n * as `outerHTML`). If `false` then the serialized HTML form will only contain the element\n * itself\n * (will not serialize child elements).\n */\nfunction toHtml(value, includeChildren = false) {\n    const node = unwrapRNode(value);\n    if (node) {\n        switch (node.nodeType) {\n            case Node.TEXT_NODE:\n                return node.textContent;\n            case Node.COMMENT_NODE:\n                return `<!--${node.textContent}-->`;\n            case Node.ELEMENT_NODE:\n                const outerHTML = node.outerHTML;\n                if (includeChildren) {\n                    return outerHTML;\n                }\n                else {\n                    const innerHTML = '>' + node.innerHTML + '<';\n                    return (outerHTML.split(innerHTML)[0]) + '>';\n                }\n        }\n    }\n    return null;\n}\nclass LViewDebug {\n    constructor(_raw_lView) {\n        this._raw_lView = _raw_lView;\n    }\n    /**\n     * Flags associated with the `LView` unpacked into a more readable state.\n     */\n    get flags() {\n        const flags = this._raw_lView[FLAGS];\n        return {\n            __raw__flags__: flags,\n            initPhaseState: flags & 3 /* InitPhaseStateMask */,\n            creationMode: !!(flags & 4 /* CreationMode */),\n            firstViewPass: !!(flags & 8 /* FirstLViewPass */),\n            checkAlways: !!(flags & 16 /* CheckAlways */),\n            dirty: !!(flags & 64 /* Dirty */),\n            attached: !!(flags & 128 /* Attached */),\n            destroyed: !!(flags & 256 /* Destroyed */),\n            isRoot: !!(flags & 512 /* IsRoot */),\n            indexWithinInitPhase: flags >> 11 /* IndexWithinInitPhaseShift */,\n        };\n    }\n    get parent() {\n        return toDebug(this._raw_lView[PARENT]);\n    }\n    get hostHTML() {\n        return toHtml(this._raw_lView[HOST], true);\n    }\n    get html() {\n        return (this.nodes || []).map(mapToHTML).join('');\n    }\n    get context() {\n        return this._raw_lView[CONTEXT];\n    }\n    /**\n     * The tree of nodes associated with the current `LView`. The nodes have been normalized into\n     * a tree structure with relevant details pulled out for readability.\n     */\n    get nodes() {\n        const lView = this._raw_lView;\n        const tNode = lView[TVIEW].firstChild;\n        return toDebugNodes(tNode, lView);\n    }\n    get template() {\n        return this.tView.template_;\n    }\n    get tView() {\n        return this._raw_lView[TVIEW];\n    }\n    get cleanup() {\n        return this._raw_lView[CLEANUP];\n    }\n    get injector() {\n        return this._raw_lView[INJECTOR];\n    }\n    get rendererFactory() {\n        return this._raw_lView[RENDERER_FACTORY];\n    }\n    get renderer() {\n        return this._raw_lView[RENDERER];\n    }\n    get sanitizer() {\n        return this._raw_lView[SANITIZER];\n    }\n    get childHead() {\n        return toDebug(this._raw_lView[CHILD_HEAD]);\n    }\n    get next() {\n        return toDebug(this._raw_lView[NEXT]);\n    }\n    get childTail() {\n        return toDebug(this._raw_lView[CHILD_TAIL]);\n    }\n    get declarationView() {\n        return toDebug(this._raw_lView[DECLARATION_VIEW]);\n    }\n    get queries() {\n        return this._raw_lView[QUERIES];\n    }\n    get tHost() {\n        return this._raw_lView[T_HOST];\n    }\n    get decls() {\n        return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);\n    }\n    get vars() {\n        return toLViewRange(this.tView, this._raw_lView, this.tView.bindingStartIndex, this.tView.expandoStartIndex);\n    }\n    get expando() {\n        return toLViewRange(this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length);\n    }\n    /**\n     * Normalized view of child views (and containers) attached at this location.\n     */\n    get childViews() {\n        const childViews = [];\n        let child = this.childHead;\n        while (child) {\n            childViews.push(child);\n            child = child.next;\n        }\n        return childViews;\n    }\n}\nfunction mapToHTML(node) {\n    if (node.type === 'ElementContainer') {\n        return (node.children || []).map(mapToHTML).join('');\n    }\n    else if (node.type === 'IcuContainer') {\n        throw new Error('Not implemented');\n    }\n    else {\n        return toHtml(node.native, true) || '';\n    }\n}\nfunction toLViewRange(tView, lView, start, end) {\n    let content = [];\n    for (let index = start; index < end; index++) {\n        content.push({ index: index, t: tView.data[index], l: lView[index] });\n    }\n    return { start: start, end: end, length: end - start, content: content };\n}\n/**\n * Turns a flat list of nodes into a tree by walking the associated `TNode` tree.\n *\n * @param tNode\n * @param lView\n */\nfunction toDebugNodes(tNode, lView) {\n    if (tNode) {\n        const debugNodes = [];\n        let tNodeCursor = tNode;\n        while (tNodeCursor) {\n            debugNodes.push(buildDebugNode(tNodeCursor, lView));\n            tNodeCursor = tNodeCursor.next;\n        }\n        return debugNodes;\n    }\n    else {\n        return [];\n    }\n}\nfunction buildDebugNode(tNode, lView) {\n    const rawValue = lView[tNode.index];\n    const native = unwrapRNode(rawValue);\n    const factories = [];\n    const instances = [];\n    const tView = lView[TVIEW];\n    for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n        const def = tView.data[i];\n        factories.push(def.type);\n        instances.push(lView[i]);\n    }\n    return {\n        html: toHtml(native),\n        type: toTNodeTypeAsString(tNode.type),\n        tNode,\n        native: native,\n        children: toDebugNodes(tNode.child, lView),\n        factories,\n        instances,\n        injector: buildNodeInjectorDebug(tNode, tView, lView),\n        get injectorResolutionPath() {\n            return tNode.debugNodeInjectorPath(lView);\n        },\n    };\n}\nfunction buildNodeInjectorDebug(tNode, tView, lView) {\n    const viewProviders = [];\n    for (let i = tNode.providerIndexStart_; i < tNode.providerIndexEnd_; i++) {\n        viewProviders.push(tView.data[i]);\n    }\n    const providers = [];\n    for (let i = tNode.providerIndexEnd_; i < tNode.directiveEnd; i++) {\n        providers.push(tView.data[i]);\n    }\n    const nodeInjectorDebug = {\n        bloom: toBloom(lView, tNode.injectorIndex),\n        cumulativeBloom: toBloom(tView.data, tNode.injectorIndex),\n        providers,\n        viewProviders,\n        parentInjectorIndex: lView[tNode.providerIndexStart_ - 1],\n    };\n    return nodeInjectorDebug;\n}\n/**\n * Convert a number at `idx` location in `array` into binary representation.\n *\n * @param array\n * @param idx\n */\nfunction binary(array, idx) {\n    const value = array[idx];\n    // If not a number we print 8 `?` to retain alignment but let user know that it was called on\n    // wrong type.\n    if (typeof value !== 'number')\n        return '????????';\n    // We prefix 0s so that we have constant length number\n    const text = '00000000' + value.toString(2);\n    return text.substring(text.length - 8);\n}\n/**\n * Convert a bloom filter at location `idx` in `array` into binary representation.\n *\n * @param array\n * @param idx\n */\nfunction toBloom(array, idx) {\n    if (idx < 0) {\n        return 'NO_NODE_INJECTOR';\n    }\n    return `${binary(array, idx + 7)}_${binary(array, idx + 6)}_${binary(array, idx + 5)}_${binary(array, idx + 4)}_${binary(array, idx + 3)}_${binary(array, idx + 2)}_${binary(array, idx + 1)}_${binary(array, idx + 0)}`;\n}\nclass LContainerDebug {\n    constructor(_raw_lContainer) {\n        this._raw_lContainer = _raw_lContainer;\n    }\n    get hasTransplantedViews() {\n        return this._raw_lContainer[HAS_TRANSPLANTED_VIEWS];\n    }\n    get views() {\n        return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET)\n            .map(toDebug);\n    }\n    get parent() {\n        return toDebug(this._raw_lContainer[PARENT]);\n    }\n    get movedViews() {\n        return this._raw_lContainer[MOVED_VIEWS];\n    }\n    get host() {\n        return this._raw_lContainer[HOST];\n    }\n    get native() {\n        return this._raw_lContainer[NATIVE];\n    }\n    get next() {\n        return toDebug(this._raw_lContainer[NEXT]);\n    }\n}\n\nconst ɵ0$5 = () => Promise.resolve(null);\n/**\n * A permanent marker promise which signifies that the current CD tree is\n * clean.\n */\nconst _CLEAN_PROMISE = (ɵ0$5)();\n/**\n * Invoke `HostBindingsFunction`s for view.\n *\n * This methods executes `TView.hostBindingOpCodes`. It is used to execute the\n * `HostBindingsFunction`s associated with the current `LView`.\n *\n * @param tView Current `TView`.\n * @param lView Current `LView`.\n */\nfunction processHostBindingOpCodes(tView, lView) {\n    const hostBindingOpCodes = tView.hostBindingOpCodes;\n    if (hostBindingOpCodes === null)\n        return;\n    try {\n        for (let i = 0; i < hostBindingOpCodes.length; i++) {\n            const opCode = hostBindingOpCodes[i];\n            if (opCode < 0) {\n                // Negative numbers are element indexes.\n                setSelectedIndex(~opCode);\n            }\n            else {\n                // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.\n                const directiveIdx = opCode;\n                const bindingRootIndx = hostBindingOpCodes[++i];\n                const hostBindingFn = hostBindingOpCodes[++i];\n                setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n                const context = lView[directiveIdx];\n                hostBindingFn(2 /* Update */, context);\n            }\n        }\n    }\n    finally {\n        setSelectedIndex(-1);\n    }\n}\n/** Refreshes all content queries declared by directives in a given view */\nfunction refreshContentQueries(tView, lView) {\n    const contentQueries = tView.contentQueries;\n    if (contentQueries !== null) {\n        for (let i = 0; i < contentQueries.length; i += 2) {\n            const queryStartIdx = contentQueries[i];\n            const directiveDefIdx = contentQueries[i + 1];\n            if (directiveDefIdx !== -1) {\n                const directiveDef = tView.data[directiveDefIdx];\n                ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n                ngDevMode &&\n                    assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n                setCurrentQueryIndex(queryStartIdx);\n                directiveDef.contentQueries(2 /* Update */, lView[directiveDefIdx], directiveDefIdx);\n            }\n        }\n    }\n}\n/** Refreshes child components in the current view (update mode). */\nfunction refreshChildComponents(hostLView, components) {\n    for (let i = 0; i < components.length; i++) {\n        refreshComponent(hostLView, components[i]);\n    }\n}\n/** Renders child components in the current view (creation mode). */\nfunction renderChildComponents(hostLView, components) {\n    for (let i = 0; i < components.length; i++) {\n        renderComponent(hostLView, components[i]);\n    }\n}\nfunction createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector) {\n    const lView = ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice();\n    lView[HOST] = host;\n    lView[FLAGS] = flags | 4 /* CreationMode */ | 128 /* Attached */ | 8 /* FirstLViewPass */;\n    resetPreOrderHookFlags(lView);\n    ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);\n    lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;\n    lView[CONTEXT] = context;\n    lView[RENDERER_FACTORY] = (rendererFactory || parentLView && parentLView[RENDERER_FACTORY]);\n    ngDevMode && assertDefined(lView[RENDERER_FACTORY], 'RendererFactory is required');\n    lView[RENDERER] = (renderer || parentLView && parentLView[RENDERER]);\n    ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');\n    lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null;\n    lView[INJECTOR] = injector || parentLView && parentLView[INJECTOR] || null;\n    lView[T_HOST] = tHostNode;\n    ngDevMode &&\n        assertEqual(tView.type == 2 /* Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');\n    lView[DECLARATION_COMPONENT_VIEW] =\n        tView.type == 2 /* Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;\n    ngDevMode && attachLViewDebug(lView);\n    return lView;\n}\nfunction getOrCreateTNode(tView, index, type, name, attrs) {\n    ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n        // `view_engine_compatibility` for additional context.\n        assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\\'t be in the LView header.');\n    // Keep this function short, so that the VM will inline it.\n    ngDevMode && assertPureTNodeType(type);\n    let tNode = tView.data[index];\n    if (tNode === null) {\n        tNode = createTNodeAtIndex(tView, index, type, name, attrs);\n        if (isInI18nBlock()) {\n            // If we are in i18n block then all elements should be pre declared through `Placeholder`\n            // See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n            // If the `TNode` was not pre-declared than it means it was not mentioned which means it was\n            // removed, so we mark it as detached.\n            tNode.flags |= 64 /* isDetached */;\n        }\n    }\n    else if (tNode.type & 64 /* Placeholder */) {\n        tNode.type = type;\n        tNode.value = name;\n        tNode.attrs = attrs;\n        const parent = getCurrentParentTNode();\n        tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex;\n        ngDevMode && assertTNodeForTView(tNode, tView);\n        ngDevMode && assertEqual(index, tNode.index, 'Expecting same index');\n    }\n    setCurrentTNode(tNode, true);\n    return tNode;\n}\nfunction createTNodeAtIndex(tView, index, type, name, attrs) {\n    const currentTNode = getCurrentTNodePlaceholderOk();\n    const isParent = isCurrentTNodeParent();\n    const parent = isParent ? currentTNode : currentTNode && currentTNode.parent;\n    // Parents cannot cross component boundaries because components will be used in multiple places.\n    const tNode = tView.data[index] =\n        createTNode(tView, parent, type, index, name, attrs);\n    // Assign a pointer to the first child node of a given view. The first node is not always the one\n    // at index 0, in case of i18n, index 0 can be the instruction `i18nStart` and the first node has\n    // the index 1 or more, so we can't just check node index.\n    if (tView.firstChild === null) {\n        tView.firstChild = tNode;\n    }\n    if (currentTNode !== null) {\n        if (isParent) {\n            // FIXME(misko): This logic looks unnecessarily complicated. Could we simplify?\n            if (currentTNode.child == null && tNode.parent !== null) {\n                // We are in the same view, which means we are adding content node to the parent view.\n                currentTNode.child = tNode;\n            }\n        }\n        else {\n            if (currentTNode.next === null) {\n                // In the case of i18n the `currentTNode` may already be linked, in which case we don't want\n                // to break the links which i18n created.\n                currentTNode.next = tNode;\n            }\n        }\n    }\n    return tNode;\n}\n/**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply()), we need to adjust the blueprint for future\n * template passes.\n *\n * @param tView `TView` associated with `LView`\n * @param lView The `LView` containing the blueprint to adjust\n * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0\n * @param initialValue Initial value to store in blueprint\n */\nfunction allocExpando(tView, lView, numSlotsToAlloc, initialValue) {\n    if (numSlotsToAlloc === 0)\n        return -1;\n    if (ngDevMode) {\n        assertFirstCreatePass(tView);\n        assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');\n        assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView');\n        assertEqual(tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView');\n        assertFirstUpdatePass(tView);\n    }\n    const allocIdx = lView.length;\n    for (let i = 0; i < numSlotsToAlloc; i++) {\n        lView.push(initialValue);\n        tView.blueprint.push(initialValue);\n        tView.data.push(null);\n    }\n    return allocIdx;\n}\n//////////////////////////\n//// Render\n//////////////////////////\n/**\n * Processes a view in the creation mode. This includes a number of steps in a specific order:\n * - creating view query functions (if any);\n * - executing a template function in the creation mode;\n * - updating static queries (if any);\n * - creating child components defined in a given view.\n */\nfunction renderView(tView, lView, context) {\n    ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode');\n    enterView(lView);\n    try {\n        const viewQuery = tView.viewQuery;\n        if (viewQuery !== null) {\n            executeViewQueryFn(1 /* Create */, viewQuery, context);\n        }\n        // Execute a template associated with this view, if it exists. A template function might not be\n        // defined for the root component views.\n        const templateFn = tView.template;\n        if (templateFn !== null) {\n            executeTemplate(tView, lView, templateFn, 1 /* Create */, context);\n        }\n        // This needs to be set before children are processed to support recursive components.\n        // This must be set to false immediately after the first creation run because in an\n        // ngFor loop, all the views will be created together before update mode runs and turns\n        // off firstCreatePass. If we don't set it here, instances will perform directive\n        // matching, etc again and again.\n        if (tView.firstCreatePass) {\n            tView.firstCreatePass = false;\n        }\n        // We resolve content queries specifically marked as `static` in creation mode. Dynamic\n        // content queries are resolved during change detection (i.e. update mode), after embedded\n        // views are refreshed (see block above).\n        if (tView.staticContentQueries) {\n            refreshContentQueries(tView, lView);\n        }\n        // We must materialize query results before child components are processed\n        // in case a child component has projected a container. The LContainer needs\n        // to exist so the embedded views are properly attached by the container.\n        if (tView.staticViewQueries) {\n            executeViewQueryFn(2 /* Update */, tView.viewQuery, context);\n        }\n        // Render child component views.\n        const components = tView.components;\n        if (components !== null) {\n            renderChildComponents(lView, components);\n        }\n    }\n    catch (error) {\n        // If we didn't manage to get past the first template pass due to\n        // an error, mark the view as corrupted so we can try to recover.\n        if (tView.firstCreatePass) {\n            tView.incompleteFirstPass = true;\n            tView.firstCreatePass = false;\n        }\n        throw error;\n    }\n    finally {\n        lView[FLAGS] &= ~4 /* CreationMode */;\n        leaveView();\n    }\n}\n/**\n * Processes a view in update mode. This includes a number of steps in a specific order:\n * - executing a template function in update mode;\n * - executing hooks;\n * - refreshing queries;\n * - setting host bindings;\n * - refreshing child (embedded and component) views.\n */\nfunction refreshView(tView, lView, templateFn, context) {\n    ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');\n    const flags = lView[FLAGS];\n    if ((flags & 256 /* Destroyed */) === 256 /* Destroyed */)\n        return;\n    enterView(lView);\n    // Check no changes mode is a dev only mode used to verify that bindings have not changed\n    // since they were assigned. We do not want to execute lifecycle hooks in that mode.\n    const isInCheckNoChangesPass = isInCheckNoChangesMode();\n    try {\n        resetPreOrderHookFlags(lView);\n        setBindingIndex(tView.bindingStartIndex);\n        if (templateFn !== null) {\n            executeTemplate(tView, lView, templateFn, 2 /* Update */, context);\n        }\n        const hooksInitPhaseCompleted = (flags & 3 /* InitPhaseStateMask */) === 3 /* InitPhaseCompleted */;\n        // execute pre-order hooks (OnInit, OnChanges, DoCheck)\n        // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n        if (!isInCheckNoChangesPass) {\n            if (hooksInitPhaseCompleted) {\n                const preOrderCheckHooks = tView.preOrderCheckHooks;\n                if (preOrderCheckHooks !== null) {\n                    executeCheckHooks(lView, preOrderCheckHooks, null);\n                }\n            }\n            else {\n                const preOrderHooks = tView.preOrderHooks;\n                if (preOrderHooks !== null) {\n                    executeInitAndCheckHooks(lView, preOrderHooks, 0 /* OnInitHooksToBeRun */, null);\n                }\n                incrementInitPhaseFlags(lView, 0 /* OnInitHooksToBeRun */);\n            }\n        }\n        // First mark transplanted views that are declared in this lView as needing a refresh at their\n        // insertion points. This is needed to avoid the situation where the template is defined in this\n        // `LView` but its declaration appears after the insertion component.\n        markTransplantedViewsForRefresh(lView);\n        refreshEmbeddedViews(lView);\n        // Content query results must be refreshed before content hooks are called.\n        if (tView.contentQueries !== null) {\n            refreshContentQueries(tView, lView);\n        }\n        // execute content hooks (AfterContentInit, AfterContentChecked)\n        // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n        if (!isInCheckNoChangesPass) {\n            if (hooksInitPhaseCompleted) {\n                const contentCheckHooks = tView.contentCheckHooks;\n                if (contentCheckHooks !== null) {\n                    executeCheckHooks(lView, contentCheckHooks);\n                }\n            }\n            else {\n                const contentHooks = tView.contentHooks;\n                if (contentHooks !== null) {\n                    executeInitAndCheckHooks(lView, contentHooks, 1 /* AfterContentInitHooksToBeRun */);\n                }\n                incrementInitPhaseFlags(lView, 1 /* AfterContentInitHooksToBeRun */);\n            }\n        }\n        processHostBindingOpCodes(tView, lView);\n        // Refresh child component views.\n        const components = tView.components;\n        if (components !== null) {\n            refreshChildComponents(lView, components);\n        }\n        // View queries must execute after refreshing child components because a template in this view\n        // could be inserted in a child component. If the view query executes before child component\n        // refresh, the template might not yet be inserted.\n        const viewQuery = tView.viewQuery;\n        if (viewQuery !== null) {\n            executeViewQueryFn(2 /* Update */, viewQuery, context);\n        }\n        // execute view hooks (AfterViewInit, AfterViewChecked)\n        // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n        if (!isInCheckNoChangesPass) {\n            if (hooksInitPhaseCompleted) {\n                const viewCheckHooks = tView.viewCheckHooks;\n                if (viewCheckHooks !== null) {\n                    executeCheckHooks(lView, viewCheckHooks);\n                }\n            }\n            else {\n                const viewHooks = tView.viewHooks;\n                if (viewHooks !== null) {\n                    executeInitAndCheckHooks(lView, viewHooks, 2 /* AfterViewInitHooksToBeRun */);\n                }\n                incrementInitPhaseFlags(lView, 2 /* AfterViewInitHooksToBeRun */);\n            }\n        }\n        if (tView.firstUpdatePass === true) {\n            // We need to make sure that we only flip the flag on successful `refreshView` only\n            // Don't do this in `finally` block.\n            // If we did this in `finally` block then an exception could block the execution of styling\n            // instructions which in turn would be unable to insert themselves into the styling linked\n            // list. The result of this would be that if the exception would not be throw on subsequent CD\n            // the styling would be unable to process it data and reflect to the DOM.\n            tView.firstUpdatePass = false;\n        }\n        // Do not reset the dirty state when running in check no changes mode. We don't want components\n        // to behave differently depending on whether check no changes is enabled or not. For example:\n        // Marking an OnPush component as dirty from within the `ngAfterViewInit` hook in order to\n        // refresh a `NgClass` binding should work. If we would reset the dirty state in the check\n        // no changes cycle, the component would be not be dirty for the next update pass. This would\n        // be different in production mode where the component dirty state is not reset.\n        if (!isInCheckNoChangesPass) {\n            lView[FLAGS] &= ~(64 /* Dirty */ | 8 /* FirstLViewPass */);\n        }\n        if (lView[FLAGS] & 1024 /* RefreshTransplantedView */) {\n            lView[FLAGS] &= ~1024 /* RefreshTransplantedView */;\n            updateTransplantedViewCount(lView[PARENT], -1);\n        }\n    }\n    finally {\n        leaveView();\n    }\n}\nfunction renderComponentOrTemplate(tView, lView, templateFn, context) {\n    const rendererFactory = lView[RENDERER_FACTORY];\n    const normalExecutionPath = !isInCheckNoChangesMode();\n    const creationModeIsActive = isCreationMode(lView);\n    try {\n        if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {\n            rendererFactory.begin();\n        }\n        if (creationModeIsActive) {\n            renderView(tView, lView, context);\n        }\n        refreshView(tView, lView, templateFn, context);\n    }\n    finally {\n        if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) {\n            rendererFactory.end();\n        }\n    }\n}\nfunction executeTemplate(tView, lView, templateFn, rf, context) {\n    const prevSelectedIndex = getSelectedIndex();\n    const isUpdatePhase = rf & 2 /* Update */;\n    try {\n        setSelectedIndex(-1);\n        if (isUpdatePhase && lView.length > HEADER_OFFSET) {\n            // When we're updating, inherently select 0 so we don't\n            // have to generate that instruction for most update blocks.\n            selectIndexInternal(tView, lView, HEADER_OFFSET, isInCheckNoChangesMode());\n        }\n        const preHookType = isUpdatePhase ? 2 /* TemplateUpdateStart */ : 0 /* TemplateCreateStart */;\n        profiler(preHookType, context);\n        templateFn(rf, context);\n    }\n    finally {\n        setSelectedIndex(prevSelectedIndex);\n        const postHookType = isUpdatePhase ? 3 /* TemplateUpdateEnd */ : 1 /* TemplateCreateEnd */;\n        profiler(postHookType, context);\n    }\n}\n//////////////////////////\n//// Element\n//////////////////////////\nfunction executeContentQueries(tView, tNode, lView) {\n    if (isContentQueryHost(tNode)) {\n        const start = tNode.directiveStart;\n        const end = tNode.directiveEnd;\n        for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n            const def = tView.data[directiveIndex];\n            if (def.contentQueries) {\n                def.contentQueries(1 /* Create */, lView[directiveIndex], directiveIndex);\n            }\n        }\n    }\n}\n/**\n * Creates directive instances.\n */\nfunction createDirectivesInstances(tView, lView, tNode) {\n    if (!getBindingsEnabled())\n        return;\n    instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView));\n    if ((tNode.flags & 128 /* hasHostBindings */) === 128 /* hasHostBindings */) {\n        invokeDirectivesHostBindings(tView, lView, tNode);\n    }\n}\n/**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to LView in the same order as they are loaded in the template with load().\n */\nfunction saveResolvedLocalsInData(viewData, tNode, localRefExtractor = getNativeByTNode) {\n    const localNames = tNode.localNames;\n    if (localNames !== null) {\n        let localIndex = tNode.index + 1;\n        for (let i = 0; i < localNames.length; i += 2) {\n            const index = localNames[i + 1];\n            const value = index === -1 ?\n                localRefExtractor(tNode, viewData) :\n                viewData[index];\n            viewData[localIndex++] = value;\n        }\n    }\n}\n/**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param def ComponentDef\n * @returns TView\n */\nfunction getOrCreateTComponentView(def) {\n    const tView = def.tView;\n    // Create a TView if there isn't one, or recreate it if the first create pass didn't\n    // complete successfully since we can't know for sure whether it's in a usable shape.\n    if (tView === null || tView.incompleteFirstPass) {\n        // Declaration node here is null since this function is called when we dynamically create a\n        // component and hence there is no declaration.\n        const declTNode = null;\n        return def.tView = createTView(1 /* Component */, declTNode, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts);\n    }\n    return tView;\n}\n/**\n * Creates a TView instance\n *\n * @param type Type of `TView`.\n * @param declTNode Declaration location of this `TView`.\n * @param templateFn Template function\n * @param decls The number of nodes, local refs, and pipes in this template\n * @param directives Registry of directives for this view\n * @param pipes Registry of pipes for this view\n * @param viewQuery View queries for this view\n * @param schemas Schemas for this view\n * @param consts Constants for this view\n */\nfunction createTView(type, declTNode, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory) {\n    ngDevMode && ngDevMode.tView++;\n    const bindingStartIndex = HEADER_OFFSET + decls;\n    // This length does not yet contain host bindings from child directives because at this point,\n    // we don't know which directives are active on this template. As soon as a directive is matched\n    // that has a host binding, we will update the blueprint with that def's hostVars count.\n    const initialViewLength = bindingStartIndex + vars;\n    const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n    const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;\n    const tView = blueprint[TVIEW] = ngDevMode ?\n        new TViewConstructor(type, // type: TViewType,\n        blueprint, // blueprint: LView,\n        templateFn, // template: ComponentTemplate<{}>|null,\n        null, // queries: TQueries|null\n        viewQuery, // viewQuery: ViewQueriesFunction<{}>|null,\n        declTNode, // declTNode: TNode|null,\n        cloneToTViewData(blueprint).fill(null, bindingStartIndex), // data: TData,\n        bindingStartIndex, // bindingStartIndex: number,\n        initialViewLength, // expandoStartIndex: number,\n        null, // hostBindingOpCodes: HostBindingOpCodes,\n        true, // firstCreatePass: boolean,\n        true, // firstUpdatePass: boolean,\n        false, // staticViewQueries: boolean,\n        false, // staticContentQueries: boolean,\n        null, // preOrderHooks: HookData|null,\n        null, // preOrderCheckHooks: HookData|null,\n        null, // contentHooks: HookData|null,\n        null, // contentCheckHooks: HookData|null,\n        null, // viewHooks: HookData|null,\n        null, // viewCheckHooks: HookData|null,\n        null, // destroyHooks: DestroyHookData|null,\n        null, // cleanup: any[]|null,\n        null, // contentQueries: number[]|null,\n        null, // components: number[]|null,\n        typeof directives === 'function' ? //\n            directives() : //\n            directives, // directiveRegistry: DirectiveDefList|null,\n        typeof pipes === 'function' ? pipes() : pipes, // pipeRegistry: PipeDefList|null,\n        null, // firstChild: TNode|null,\n        schemas, // schemas: SchemaMetadata[]|null,\n        consts, // consts: TConstants|null\n        false, // incompleteFirstPass: boolean\n        decls, // ngDevMode only: decls\n        vars) :\n        {\n            type: type,\n            blueprint: blueprint,\n            template: templateFn,\n            queries: null,\n            viewQuery: viewQuery,\n            declTNode: declTNode,\n            data: blueprint.slice().fill(null, bindingStartIndex),\n            bindingStartIndex: bindingStartIndex,\n            expandoStartIndex: initialViewLength,\n            hostBindingOpCodes: null,\n            firstCreatePass: true,\n            firstUpdatePass: true,\n            staticViewQueries: false,\n            staticContentQueries: false,\n            preOrderHooks: null,\n            preOrderCheckHooks: null,\n            contentHooks: null,\n            contentCheckHooks: null,\n            viewHooks: null,\n            viewCheckHooks: null,\n            destroyHooks: null,\n            cleanup: null,\n            contentQueries: null,\n            components: null,\n            directiveRegistry: typeof directives === 'function' ? directives() : directives,\n            pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n            firstChild: null,\n            schemas: schemas,\n            consts: consts,\n            incompleteFirstPass: false\n        };\n    if (ngDevMode) {\n        // For performance reasons it is important that the tView retains the same shape during runtime.\n        // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n        // prevent class transitions.\n        Object.seal(tView);\n    }\n    return tView;\n}\nfunction createViewBlueprint(bindingStartIndex, initialViewLength) {\n    const blueprint = ngDevMode ? new LViewBlueprint() : [];\n    for (let i = 0; i < initialViewLength; i++) {\n        blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);\n    }\n    return blueprint;\n}\nfunction createError(text, token) {\n    return new Error(`Renderer: ${text} [${stringifyForError(token)}]`);\n}\nfunction assertHostNodeExists(rElement, elementOrSelector) {\n    if (!rElement) {\n        if (typeof elementOrSelector === 'string') {\n            throw createError('Host node with selector not found:', elementOrSelector);\n        }\n        else {\n            throw createError('Host node is required:', elementOrSelector);\n        }\n    }\n}\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param rendererFactory Factory function to create renderer instance.\n * @param elementOrSelector Render element or CSS selector to locate the element.\n * @param encapsulation View Encapsulation defined for component that requests host element.\n */\nfunction locateHostElement(renderer, elementOrSelector, encapsulation) {\n    if (isProceduralRenderer(renderer)) {\n        // When using native Shadow DOM, do not clear host element to allow native slot projection\n        const preserveContent = encapsulation === ViewEncapsulation.ShadowDom;\n        return renderer.selectRootElement(elementOrSelector, preserveContent);\n    }\n    let rElement = typeof elementOrSelector === 'string' ?\n        renderer.querySelector(elementOrSelector) :\n        elementOrSelector;\n    ngDevMode && assertHostNodeExists(rElement, elementOrSelector);\n    // Always clear host element's content when Renderer3 is in use. For procedural renderer case we\n    // make it depend on whether ShadowDom encapsulation is used (in which case the content should be\n    // preserved to allow native slot projection). ShadowDom encapsulation requires procedural\n    // renderer, and procedural renderer case is handled above.\n    rElement.textContent = '';\n    return rElement;\n}\n/**\n * Saves context for this cleanup function in LView.cleanupInstances.\n *\n * On the first template pass, saves in TView:\n * - Cleanup function\n * - Index of context we just saved in LView.cleanupInstances\n *\n * This function can also be used to store instance specific cleanup fns. In that case the `context`\n * is `null` and the function is store in `LView` (rather than it `TView`).\n */\nfunction storeCleanupWithContext(tView, lView, context, cleanupFn) {\n    const lCleanup = getOrCreateLViewCleanup(lView);\n    if (context === null) {\n        // If context is null that this is instance specific callback. These callbacks can only be\n        // inserted after template shared instances. For this reason in ngDevMode we freeze the TView.\n        if (ngDevMode) {\n            Object.freeze(getOrCreateTViewCleanup(tView));\n        }\n        lCleanup.push(cleanupFn);\n    }\n    else {\n        lCleanup.push(context);\n        if (tView.firstCreatePass) {\n            getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);\n        }\n    }\n}\nfunction createTNode(tView, tParent, type, index, value, attrs) {\n    ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n        // `view_engine_compatibility` for additional context.\n        assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\\'t be in the LView header.');\n    ngDevMode && assertNotSame(attrs, undefined, '\\'undefined\\' is not valid value for \\'attrs\\'');\n    ngDevMode && ngDevMode.tNode++;\n    ngDevMode && tParent && assertTNodeForTView(tParent, tView);\n    let injectorIndex = tParent ? tParent.injectorIndex : -1;\n    const tNode = ngDevMode ?\n        new TNodeDebug(tView, // tView_: TView\n        type, // type: TNodeType\n        index, // index: number\n        null, // insertBeforeIndex: null|-1|number|number[]\n        injectorIndex, // injectorIndex: number\n        -1, // directiveStart: number\n        -1, // directiveEnd: number\n        -1, // directiveStylingLast: number\n        null, // propertyBindings: number[]|null\n        0, // flags: TNodeFlags\n        0, // providerIndexes: TNodeProviderIndexes\n        value, // value: string|null\n        attrs, // attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null\n        null, // mergedAttrs\n        null, // localNames: (string|number)[]|null\n        undefined, // initialInputs: (string[]|null)[]|null|undefined\n        null, // inputs: PropertyAliases|null\n        null, // outputs: PropertyAliases|null\n        null, // tViews: ITView|ITView[]|null\n        null, // next: ITNode|null\n        null, // projectionNext: ITNode|null\n        null, // child: ITNode|null\n        tParent, // parent: TElementNode|TContainerNode|null\n        null, // projection: number|(ITNode|RNode[])[]|null\n        null, // styles: string|null\n        null, // stylesWithoutHost: string|null\n        undefined, // residualStyles: string|null\n        null, // classes: string|null\n        null, // classesWithoutHost: string|null\n        undefined, // residualClasses: string|null\n        0, // classBindings: TStylingRange;\n        0) :\n        {\n            type,\n            index,\n            insertBeforeIndex: null,\n            injectorIndex,\n            directiveStart: -1,\n            directiveEnd: -1,\n            directiveStylingLast: -1,\n            propertyBindings: null,\n            flags: 0,\n            providerIndexes: 0,\n            value: value,\n            attrs: attrs,\n            mergedAttrs: null,\n            localNames: null,\n            initialInputs: undefined,\n            inputs: null,\n            outputs: null,\n            tViews: null,\n            next: null,\n            projectionNext: null,\n            child: null,\n            parent: tParent,\n            projection: null,\n            styles: null,\n            stylesWithoutHost: null,\n            residualStyles: undefined,\n            classes: null,\n            classesWithoutHost: null,\n            residualClasses: undefined,\n            classBindings: 0,\n            styleBindings: 0,\n        };\n    if (ngDevMode) {\n        // For performance reasons it is important that the tNode retains the same shape during runtime.\n        // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n        // prevent class transitions.\n        Object.seal(tNode);\n    }\n    return tNode;\n}\nfunction generatePropertyAliases(inputAliasMap, directiveDefIdx, propStore) {\n    for (let publicName in inputAliasMap) {\n        if (inputAliasMap.hasOwnProperty(publicName)) {\n            propStore = propStore === null ? {} : propStore;\n            const internalName = inputAliasMap[publicName];\n            if (propStore.hasOwnProperty(publicName)) {\n                propStore[publicName].push(directiveDefIdx, internalName);\n            }\n            else {\n                (propStore[publicName] = [directiveDefIdx, internalName]);\n            }\n        }\n    }\n    return propStore;\n}\n/**\n * Initializes data structures required to work with directive inputs and outputs.\n * Initialization is done for all directives matched on a given TNode.\n */\nfunction initializeInputAndOutputAliases(tView, tNode) {\n    ngDevMode && assertFirstCreatePass(tView);\n    const start = tNode.directiveStart;\n    const end = tNode.directiveEnd;\n    const tViewData = tView.data;\n    const tNodeAttrs = tNode.attrs;\n    const inputsFromAttrs = ngDevMode ? new TNodeInitialInputs() : [];\n    let inputsStore = null;\n    let outputsStore = null;\n    for (let i = start; i < end; i++) {\n        const directiveDef = tViewData[i];\n        const directiveInputs = directiveDef.inputs;\n        // Do not use unbound attributes as inputs to structural directives, since structural\n        // directive inputs can only be set using microsyntax (e.g. `<div *dir=\"exp\">`).\n        // TODO(FW-1930): microsyntax expressions may also contain unbound/static attributes, which\n        // should be set for inline templates.\n        const initialInputs = (tNodeAttrs !== null && !isInlineTemplate(tNode)) ?\n            generateInitialInputs(directiveInputs, tNodeAttrs) :\n            null;\n        inputsFromAttrs.push(initialInputs);\n        inputsStore = generatePropertyAliases(directiveInputs, i, inputsStore);\n        outputsStore = generatePropertyAliases(directiveDef.outputs, i, outputsStore);\n    }\n    if (inputsStore !== null) {\n        if (inputsStore.hasOwnProperty('class')) {\n            tNode.flags |= 16 /* hasClassInput */;\n        }\n        if (inputsStore.hasOwnProperty('style')) {\n            tNode.flags |= 32 /* hasStyleInput */;\n        }\n    }\n    tNode.initialInputs = inputsFromAttrs;\n    tNode.inputs = inputsStore;\n    tNode.outputs = outputsStore;\n}\n/**\n * Mapping between attributes names that don't correspond to their element property names.\n *\n * Performance note: this function is written as a series of if checks (instead of, say, a property\n * object lookup) for performance reasons - the series of `if` checks seems to be the fastest way of\n * mapping property names. Do NOT change without benchmarking.\n *\n * Note: this mapping has to be kept in sync with the equally named mapping in the template\n * type-checking machinery of ngtsc.\n */\nfunction mapPropName(name) {\n    if (name === 'class')\n        return 'className';\n    if (name === 'for')\n        return 'htmlFor';\n    if (name === 'formaction')\n        return 'formAction';\n    if (name === 'innerHtml')\n        return 'innerHTML';\n    if (name === 'readonly')\n        return 'readOnly';\n    if (name === 'tabindex')\n        return 'tabIndex';\n    return name;\n}\nfunction elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, nativeOnly) {\n    ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n    const element = getNativeByTNode(tNode, lView);\n    let inputData = tNode.inputs;\n    let dataValue;\n    if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) {\n        setInputsForProperty(tView, lView, dataValue, propName, value);\n        if (isComponentHost(tNode))\n            markDirtyIfOnPush(lView, tNode.index);\n        if (ngDevMode) {\n            setNgReflectProperties(lView, element, tNode.type, dataValue, value);\n        }\n    }\n    else if (tNode.type & 3 /* AnyRNode */) {\n        propName = mapPropName(propName);\n        if (ngDevMode) {\n            validateAgainstEventProperties(propName);\n            if (!validateProperty(tView, element, propName, tNode)) {\n                // Return here since we only log warnings for unknown properties.\n                logUnknownPropertyError(propName, tNode);\n                return;\n            }\n            ngDevMode.rendererSetProperty++;\n        }\n        // It is assumed that the sanitizer is only added when the compiler determines that the\n        // property is risky, so sanitization can be done without further checks.\n        value = sanitizer != null ? sanitizer(value, tNode.value || '', propName) : value;\n        if (isProceduralRenderer(renderer)) {\n            renderer.setProperty(element, propName, value);\n        }\n        else if (!isAnimationProp(propName)) {\n            element.setProperty ? element.setProperty(propName, value) :\n                element[propName] = value;\n        }\n    }\n    else if (tNode.type & 12 /* AnyContainer */) {\n        // If the node is a container and the property didn't\n        // match any of the inputs or schemas we should throw.\n        if (ngDevMode && !matchingSchemas(tView, tNode.value)) {\n            logUnknownPropertyError(propName, tNode);\n        }\n    }\n}\n/** If node is an OnPush component, marks its LView dirty. */\nfunction markDirtyIfOnPush(lView, viewIndex) {\n    ngDevMode && assertLView(lView);\n    const childComponentLView = getComponentLViewByIndex(viewIndex, lView);\n    if (!(childComponentLView[FLAGS] & 16 /* CheckAlways */)) {\n        childComponentLView[FLAGS] |= 64 /* Dirty */;\n    }\n}\nfunction setNgReflectProperty(lView, element, type, attrName, value) {\n    const renderer = lView[RENDERER];\n    attrName = normalizeDebugBindingName(attrName);\n    const debugValue = normalizeDebugBindingValue(value);\n    if (type & 3 /* AnyRNode */) {\n        if (value == null) {\n            isProceduralRenderer(renderer) ? renderer.removeAttribute(element, attrName) :\n                element.removeAttribute(attrName);\n        }\n        else {\n            isProceduralRenderer(renderer) ?\n                renderer.setAttribute(element, attrName, debugValue) :\n                element.setAttribute(attrName, debugValue);\n        }\n    }\n    else {\n        const textContent = escapeCommentText(`bindings=${JSON.stringify({ [attrName]: debugValue }, null, 2)}`);\n        if (isProceduralRenderer(renderer)) {\n            renderer.setValue(element, textContent);\n        }\n        else {\n            element.textContent = textContent;\n        }\n    }\n}\nfunction setNgReflectProperties(lView, element, type, dataValue, value) {\n    if (type & (3 /* AnyRNode */ | 4 /* Container */)) {\n        /**\n         * dataValue is an array containing runtime input or output names for the directives:\n         * i+0: directive instance index\n         * i+1: privateName\n         *\n         * e.g. [0, 'change', 'change-minified']\n         * we want to set the reflected property with the privateName: dataValue[i+1]\n         */\n        for (let i = 0; i < dataValue.length; i += 2) {\n            setNgReflectProperty(lView, element, type, dataValue[i + 1], value);\n        }\n    }\n}\nfunction validateProperty(tView, element, propName, tNode) {\n    // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n    // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n    // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n    // execute the check below.\n    if (tView.schemas === null)\n        return true;\n    // The property is considered valid if the element matches the schema, it exists on the element\n    // or it is synthetic, and we are in a browser context (web worker nodes should be skipped).\n    if (matchingSchemas(tView, tNode.value) || propName in element || isAnimationProp(propName)) {\n        return true;\n    }\n    // Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we\n    // need to account for both here, while being careful for `typeof null` also returning 'object'.\n    return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\nfunction matchingSchemas(tView, tagName) {\n    const schemas = tView.schemas;\n    if (schemas !== null) {\n        for (let i = 0; i < schemas.length; i++) {\n            const schema = schemas[i];\n            if (schema === NO_ERRORS_SCHEMA ||\n                schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\n/**\n * Logs an error that a property is not supported on an element.\n * @param propName Name of the invalid property.\n * @param tNode Node on which we encountered the property.\n */\nfunction logUnknownPropertyError(propName, tNode) {\n    let message = `Can't bind to '${propName}' since it isn't a known property of '${tNode.value}'.`;\n    console.error(formatRuntimeError(\"303\" /* UNKNOWN_BINDING */, message));\n}\n/**\n * Instantiate a root component.\n */\nfunction instantiateRootComponent(tView, lView, def) {\n    const rootTNode = getCurrentTNode();\n    if (tView.firstCreatePass) {\n        if (def.providersResolver)\n            def.providersResolver(def);\n        const directiveIndex = allocExpando(tView, lView, 1, null);\n        ngDevMode &&\n            assertEqual(directiveIndex, rootTNode.directiveStart, 'Because this is a root component the allocated expando should match the TNode component.');\n        configureViewWithDirective(tView, rootTNode, lView, directiveIndex, def);\n    }\n    const directive = getNodeInjectable(lView, tView, rootTNode.directiveStart, rootTNode);\n    attachPatchData(directive, lView);\n    const native = getNativeByTNode(rootTNode, lView);\n    if (native) {\n        attachPatchData(native, lView);\n    }\n    return directive;\n}\n/**\n * Resolve the matched directives on a node.\n */\nfunction resolveDirectives(tView, lView, tNode, localRefs) {\n    // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n    // tsickle.\n    ngDevMode && assertFirstCreatePass(tView);\n    let hasDirectives = false;\n    if (getBindingsEnabled()) {\n        const directiveDefs = findDirectiveDefMatches(tView, lView, tNode);\n        const exportsMap = localRefs === null ? null : { '': -1 };\n        if (directiveDefs !== null) {\n            hasDirectives = true;\n            initTNodeFlags(tNode, tView.data.length, directiveDefs.length);\n            // When the same token is provided by several directives on the same node, some rules apply in\n            // the viewEngine:\n            // - viewProviders have priority over providers\n            // - the last directive in NgModule.declarations has priority over the previous one\n            // So to match these rules, the order in which providers are added in the arrays is very\n            // important.\n            for (let i = 0; i < directiveDefs.length; i++) {\n                const def = directiveDefs[i];\n                if (def.providersResolver)\n                    def.providersResolver(def);\n            }\n            let preOrderHooksFound = false;\n            let preOrderCheckHooksFound = false;\n            let directiveIdx = allocExpando(tView, lView, directiveDefs.length, null);\n            ngDevMode &&\n                assertSame(directiveIdx, tNode.directiveStart, 'TNode.directiveStart should point to just allocated space');\n            for (let i = 0; i < directiveDefs.length; i++) {\n                const def = directiveDefs[i];\n                // Merge the attrs in the order of matches. This assumes that the first directive is the\n                // component itself, so that the component has the least priority.\n                tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n                configureViewWithDirective(tView, tNode, lView, directiveIdx, def);\n                saveNameToExportMap(directiveIdx, def, exportsMap);\n                if (def.contentQueries !== null)\n                    tNode.flags |= 8 /* hasContentQuery */;\n                if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0)\n                    tNode.flags |= 128 /* hasHostBindings */;\n                const lifeCycleHooks = def.type.prototype;\n                // Only push a node index into the preOrderHooks array if this is the first\n                // pre-order hook found on this node.\n                if (!preOrderHooksFound &&\n                    (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) {\n                    // We will push the actual hook function into this array later during dir instantiation.\n                    // We cannot do it now because we must ensure hooks are registered in the same\n                    // order that directives are created (i.e. injection order).\n                    (tView.preOrderHooks || (tView.preOrderHooks = [])).push(tNode.index);\n                    preOrderHooksFound = true;\n                }\n                if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {\n                    (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(tNode.index);\n                    preOrderCheckHooksFound = true;\n                }\n                directiveIdx++;\n            }\n            initializeInputAndOutputAliases(tView, tNode);\n        }\n        if (exportsMap)\n            cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n    }\n    // Merge the template attrs last so that they have the highest priority.\n    tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n    return hasDirectives;\n}\n/**\n * Add `hostBindings` to the `TView.hostBindingOpCodes`.\n *\n * @param tView `TView` to which the `hostBindings` should be added.\n * @param tNode `TNode` the element which contains the directive\n * @param lView `LView` current `LView`\n * @param directiveIdx Directive index in view.\n * @param directiveVarsIdx Where will the directive's vars be stored\n * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add.\n */\nfunction registerHostBindingOpCodes(tView, tNode, lView, directiveIdx, directiveVarsIdx, def) {\n    ngDevMode && assertFirstCreatePass(tView);\n    const hostBindings = def.hostBindings;\n    if (hostBindings) {\n        let hostBindingOpCodes = tView.hostBindingOpCodes;\n        if (hostBindingOpCodes === null) {\n            hostBindingOpCodes = tView.hostBindingOpCodes = [];\n        }\n        const elementIndx = ~tNode.index;\n        if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) {\n            // Conditionally add select element so that we are more efficient in execution.\n            // NOTE: this is strictly not necessary and it trades code size for runtime perf.\n            // (We could just always add it.)\n            hostBindingOpCodes.push(elementIndx);\n        }\n        hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings);\n    }\n}\n/**\n * Returns the last selected element index in the `HostBindingOpCodes`\n *\n * For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only\n * if it changes. This method returns the last index (or '0' if not found.)\n *\n * Selected element index are only the ones which are negative.\n */\nfunction lastSelectedElementIdx(hostBindingOpCodes) {\n    let i = hostBindingOpCodes.length;\n    while (i > 0) {\n        const value = hostBindingOpCodes[--i];\n        if (typeof value === 'number' && value < 0) {\n            return value;\n        }\n    }\n    return 0;\n}\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\nfunction instantiateAllDirectives(tView, lView, tNode, native) {\n    const start = tNode.directiveStart;\n    const end = tNode.directiveEnd;\n    if (!tView.firstCreatePass) {\n        getOrCreateNodeInjectorForNode(tNode, lView);\n    }\n    attachPatchData(native, lView);\n    const initialInputs = tNode.initialInputs;\n    for (let i = start; i < end; i++) {\n        const def = tView.data[i];\n        const isComponent = isComponentDef(def);\n        if (isComponent) {\n            ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */);\n            addComponentLogic(lView, tNode, def);\n        }\n        const directive = getNodeInjectable(lView, tView, i, tNode);\n        attachPatchData(directive, lView);\n        if (initialInputs !== null) {\n            setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);\n        }\n        if (isComponent) {\n            const componentView = getComponentLViewByIndex(tNode.index, lView);\n            componentView[CONTEXT] = directive;\n        }\n    }\n}\nfunction invokeDirectivesHostBindings(tView, lView, tNode) {\n    const start = tNode.directiveStart;\n    const end = tNode.directiveEnd;\n    const firstCreatePass = tView.firstCreatePass;\n    const elementIndex = tNode.index;\n    const currentDirectiveIndex = getCurrentDirectiveIndex();\n    try {\n        setSelectedIndex(elementIndex);\n        for (let dirIndex = start; dirIndex < end; dirIndex++) {\n            const def = tView.data[dirIndex];\n            const directive = lView[dirIndex];\n            setCurrentDirectiveIndex(dirIndex);\n            if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {\n                invokeHostBindingsInCreationMode(def, directive);\n            }\n        }\n    }\n    finally {\n        setSelectedIndex(-1);\n        setCurrentDirectiveIndex(currentDirectiveIndex);\n    }\n}\n/**\n * Invoke the host bindings in creation mode.\n *\n * @param def `DirectiveDef` which may contain the `hostBindings` function.\n * @param directive Instance of directive.\n */\nfunction invokeHostBindingsInCreationMode(def, directive) {\n    if (def.hostBindings !== null) {\n        def.hostBindings(1 /* Create */, directive);\n    }\n}\n/**\n * Matches the current node against all available selectors.\n * If a component is matched (at most one), it is returned in first position in the array.\n */\nfunction findDirectiveDefMatches(tView, viewData, tNode) {\n    ngDevMode && assertFirstCreatePass(tView);\n    ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */);\n    const registry = tView.directiveRegistry;\n    let matches = null;\n    if (registry) {\n        for (let i = 0; i < registry.length; i++) {\n            const def = registry[i];\n            if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {\n                matches || (matches = ngDevMode ? new MatchesArray() : []);\n                diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, viewData), tView, def.type);\n                if (isComponentDef(def)) {\n                    if (ngDevMode) {\n                        assertTNodeType(tNode, 2 /* Element */, `\"${tNode.value}\" tags cannot be used as component hosts. ` +\n                            `Please use a different tag to activate the ${stringify(def.type)} component.`);\n                        if (tNode.flags & 2 /* isComponentHost */)\n                            throwMultipleComponentError(tNode);\n                    }\n                    markAsComponentHost(tView, tNode);\n                    // The component is always stored first with directives after.\n                    matches.unshift(def);\n                }\n                else {\n                    matches.push(def);\n                }\n            }\n        }\n    }\n    return matches;\n}\n/**\n * Marks a given TNode as a component's host. This consists of:\n * - setting appropriate TNode flags;\n * - storing index of component's host element so it will be queued for view refresh during CD.\n */\nfunction markAsComponentHost(tView, hostTNode) {\n    ngDevMode && assertFirstCreatePass(tView);\n    hostTNode.flags |= 2 /* isComponentHost */;\n    (tView.components || (tView.components = ngDevMode ? new TViewComponents() : []))\n        .push(hostTNode.index);\n}\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(tNode, localRefs, exportsMap) {\n    if (localRefs) {\n        const localNames = tNode.localNames = ngDevMode ? new TNodeLocalNames() : [];\n        // Local names must be stored in tNode in the same order that localRefs are defined\n        // in the template to ensure the data is loaded in the same slots as their refs\n        // in the template (for template queries).\n        for (let i = 0; i < localRefs.length; i += 2) {\n            const index = exportsMap[localRefs[i + 1]];\n            if (index == null)\n                throw new RuntimeError(\"301\" /* EXPORT_NOT_FOUND */, `Export of name '${localRefs[i + 1]}' not found!`);\n            localNames.push(localRefs[i], index);\n        }\n    }\n}\n/**\n * Builds up an export map as directives are created, so local refs can be quickly mapped\n * to their directive instances.\n */\nfunction saveNameToExportMap(directiveIdx, def, exportsMap) {\n    if (exportsMap) {\n        if (def.exportAs) {\n            for (let i = 0; i < def.exportAs.length; i++) {\n                exportsMap[def.exportAs[i]] = directiveIdx;\n            }\n        }\n        if (isComponentDef(def))\n            exportsMap[''] = directiveIdx;\n    }\n}\n/**\n * Initializes the flags on the current node, setting all indices to the initial index,\n * the directive count to 0, and adding the isComponent flag.\n * @param index the initial index\n */\nfunction initTNodeFlags(tNode, index, numberOfDirectives) {\n    ngDevMode &&\n        assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, 'Reached the max number of directives');\n    tNode.flags |= 1 /* isDirectiveHost */;\n    // When the first directive is created on a node, save the index\n    tNode.directiveStart = index;\n    tNode.directiveEnd = index + numberOfDirectives;\n    tNode.providerIndexes = index;\n}\n/**\n * Setup directive for instantiation.\n *\n * We need to create a `NodeInjectorFactory` which is then inserted in both the `Blueprint` as well\n * as `LView`. `TView` gets the `DirectiveDef`.\n *\n * @param tView `TView`\n * @param tNode `TNode`\n * @param lView `LView`\n * @param directiveIndex Index where the directive will be stored in the Expando.\n * @param def `DirectiveDef`\n */\nfunction configureViewWithDirective(tView, tNode, lView, directiveIndex, def) {\n    ngDevMode &&\n        assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section');\n    tView.data[directiveIndex] = def;\n    const directiveFactory = def.factory || (def.factory = getFactoryDef(def.type, true));\n    const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), null);\n    tView.blueprint[directiveIndex] = nodeInjectorFactory;\n    lView[directiveIndex] = nodeInjectorFactory;\n    registerHostBindingOpCodes(tView, tNode, lView, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE), def);\n}\nfunction addComponentLogic(lView, hostTNode, def) {\n    const native = getNativeByTNode(hostTNode, lView);\n    const tView = getOrCreateTComponentView(def);\n    // Only component views should be added to the view tree directly. Embedded views are\n    // accessed through their containers because they may be removed / re-added later.\n    const rendererFactory = lView[RENDERER_FACTORY];\n    const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null));\n    // Component view will always be created before any injected LContainers,\n    // so this is a regular element, wrap it with the component view\n    lView[hostTNode.index] = componentView;\n}\nfunction elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) {\n    if (ngDevMode) {\n        assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n        validateAgainstEventAttributes(name);\n        assertTNodeType(tNode, 2 /* Element */, `Attempted to set attribute \\`${name}\\` on a container node. ` +\n            `Host bindings are not valid on ng-container or ng-template.`);\n    }\n    const element = getNativeByTNode(tNode, lView);\n    setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer);\n}\nfunction setElementAttribute(renderer, element, namespace, tagName, name, value, sanitizer) {\n    if (value == null) {\n        ngDevMode && ngDevMode.rendererRemoveAttribute++;\n        isProceduralRenderer(renderer) ? renderer.removeAttribute(element, name, namespace) :\n            element.removeAttribute(name);\n    }\n    else {\n        ngDevMode && ngDevMode.rendererSetAttribute++;\n        const strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name);\n        if (isProceduralRenderer(renderer)) {\n            renderer.setAttribute(element, name, strValue, namespace);\n        }\n        else {\n            namespace ? element.setAttributeNS(namespace, name, strValue) :\n                element.setAttribute(name, strValue);\n        }\n    }\n}\n/**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param lView Current LView that is being processed.\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param def The directive def that contains the list of inputs\n * @param tNode The static data for this node\n */\nfunction setInputsFromAttrs(lView, directiveIndex, instance, def, tNode, initialInputData) {\n    const initialInputs = initialInputData[directiveIndex];\n    if (initialInputs !== null) {\n        const setInput = def.setInput;\n        for (let i = 0; i < initialInputs.length;) {\n            const publicName = initialInputs[i++];\n            const privateName = initialInputs[i++];\n            const value = initialInputs[i++];\n            if (setInput !== null) {\n                def.setInput(instance, value, publicName, privateName);\n            }\n            else {\n                instance[privateName] = value;\n            }\n            if (ngDevMode) {\n                const nativeElement = getNativeByTNode(tNode, lView);\n                setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);\n            }\n        }\n    }\n}\n/**\n * Generates initialInputData for a node and stores it in the template's static storage\n * so subsequent template invocations don't have to recalculate it.\n *\n * initialInputData is an array containing values that need to be set as input properties\n * for directives on this node, but only once on creation. We need this array to support\n * the case where you set an @Input property of a directive using attribute-like syntax.\n * e.g. if you have a `name` @Input, you can set it once like this:\n *\n * <my-component name=\"Bess\"></my-component>\n *\n * @param inputs The list of inputs from the directive def\n * @param attrs The static attrs on this node\n */\nfunction generateInitialInputs(inputs, attrs) {\n    let inputsToStore = null;\n    let i = 0;\n    while (i < attrs.length) {\n        const attrName = attrs[i];\n        if (attrName === 0 /* NamespaceURI */) {\n            // We do not allow inputs on namespaced attributes.\n            i += 4;\n            continue;\n        }\n        else if (attrName === 5 /* ProjectAs */) {\n            // Skip over the `ngProjectAs` value.\n            i += 2;\n            continue;\n        }\n        // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.\n        if (typeof attrName === 'number')\n            break;\n        if (inputs.hasOwnProperty(attrName)) {\n            if (inputsToStore === null)\n                inputsToStore = [];\n            inputsToStore.push(attrName, inputs[attrName], attrs[i + 1]);\n        }\n        i += 2;\n    }\n    return inputsToStore;\n}\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\n// Not sure why I need to do `any` here but TS complains later.\nconst LContainerArray = ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) &&\n    createNamedArrayType('LContainer');\n/**\n * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.\n *\n * @param hostNative The host element for the LContainer\n * @param hostTNode The host TNode for the LContainer\n * @param currentView The parent view of the LContainer\n * @param native The native comment element\n * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case\n * @returns LContainer\n */\nfunction createLContainer(hostNative, currentView, native, tNode) {\n    ngDevMode && assertLView(currentView);\n    ngDevMode && !isProceduralRenderer(currentView[RENDERER]) && assertDomNode(native);\n    // https://jsperf.com/array-literal-vs-new-array-really\n    const lContainer = new (ngDevMode ? LContainerArray : Array)(hostNative, // host native\n    true, // Boolean `true` in this position signifies that this is an `LContainer`\n    false, // has transplanted views\n    currentView, // parent\n    null, // next\n    0, // transplanted views to refresh count\n    tNode, // t_host\n    native, // native,\n    null, // view refs\n    null);\n    ngDevMode &&\n        assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');\n    ngDevMode && attachLContainerDebug(lContainer);\n    return lContainer;\n}\n/**\n * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them by executing an associated template function.\n */\nfunction refreshEmbeddedViews(lView) {\n    for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n        for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n            const embeddedLView = lContainer[i];\n            const embeddedTView = embeddedLView[TVIEW];\n            ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n            if (viewAttachedToChangeDetector(embeddedLView)) {\n                refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);\n            }\n        }\n    }\n}\n/**\n * Mark transplanted views as needing to be refreshed at their insertion points.\n *\n * @param lView The `LView` that may have transplanted views.\n */\nfunction markTransplantedViewsForRefresh(lView) {\n    for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n        if (!lContainer[HAS_TRANSPLANTED_VIEWS])\n            continue;\n        const movedViews = lContainer[MOVED_VIEWS];\n        ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');\n        for (let i = 0; i < movedViews.length; i++) {\n            const movedLView = movedViews[i];\n            const insertionLContainer = movedLView[PARENT];\n            ngDevMode && assertLContainer(insertionLContainer);\n            // We don't want to increment the counter if the moved LView was already marked for\n            // refresh.\n            if ((movedLView[FLAGS] & 1024 /* RefreshTransplantedView */) === 0) {\n                updateTransplantedViewCount(insertionLContainer, 1);\n            }\n            // Note, it is possible that the `movedViews` is tracking views that are transplanted *and*\n            // those that aren't (declaration component === insertion component). In the latter case,\n            // it's fine to add the flag, as we will clear it immediately in\n            // `refreshEmbeddedViews` for the view currently being refreshed.\n            movedLView[FLAGS] |= 1024 /* RefreshTransplantedView */;\n        }\n    }\n}\n/////////////\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param componentHostIdx  Element index in LView[] (adjusted for HEADER_OFFSET)\n */\nfunction refreshComponent(hostLView, componentHostIdx) {\n    ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');\n    const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n    // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n    if (viewAttachedToChangeDetector(componentView)) {\n        const tView = componentView[TVIEW];\n        if (componentView[FLAGS] & (16 /* CheckAlways */ | 64 /* Dirty */)) {\n            refreshView(tView, componentView, tView.template, componentView[CONTEXT]);\n        }\n        else if (componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n            // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n            refreshContainsDirtyView(componentView);\n        }\n    }\n}\n/**\n * Refreshes all transplanted views marked with `LViewFlags.RefreshTransplantedView` that are\n * children or descendants of the given lView.\n *\n * @param lView The lView which contains descendant transplanted views that need to be refreshed.\n */\nfunction refreshContainsDirtyView(lView) {\n    for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n        for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n            const embeddedLView = lContainer[i];\n            if (embeddedLView[FLAGS] & 1024 /* RefreshTransplantedView */) {\n                const embeddedTView = embeddedLView[TVIEW];\n                ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n                refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);\n            }\n            else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n                refreshContainsDirtyView(embeddedLView);\n            }\n        }\n    }\n    const tView = lView[TVIEW];\n    // Refresh child component views.\n    const components = tView.components;\n    if (components !== null) {\n        for (let i = 0; i < components.length; i++) {\n            const componentView = getComponentLViewByIndex(components[i], lView);\n            // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n            if (viewAttachedToChangeDetector(componentView) &&\n                componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n                refreshContainsDirtyView(componentView);\n            }\n        }\n    }\n}\nfunction renderComponent(hostLView, componentHostIdx) {\n    ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');\n    const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n    const componentTView = componentView[TVIEW];\n    syncViewWithBlueprint(componentTView, componentView);\n    renderView(componentTView, componentView, componentView[CONTEXT]);\n}\n/**\n * Syncs an LView instance with its blueprint if they have gotten out of sync.\n *\n * Typically, blueprints and their view instances should always be in sync, so the loop here\n * will be skipped. However, consider this case of two components side-by-side:\n *\n * App template:\n * ```\n * <comp></comp>\n * <comp></comp>\n * ```\n *\n * The following will happen:\n * 1. App template begins processing.\n * 2. First <comp> is matched as a component and its LView is created.\n * 3. Second <comp> is matched as a component and its LView is created.\n * 4. App template completes processing, so it's time to check child templates.\n * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint.\n * 6. Second <comp> template is checked. Its blueprint has been updated by the first\n * <comp> template, but its LView was created before this update, so it is out of sync.\n *\n * Note that embedded views inside ngFor loops will never be out of sync because these views\n * are processed as soon as they are created.\n *\n * @param tView The `TView` that contains the blueprint for syncing\n * @param lView The view to sync\n */\nfunction syncViewWithBlueprint(tView, lView) {\n    for (let i = lView.length; i < tView.blueprint.length; i++) {\n        lView.push(tView.blueprint[i]);\n    }\n}\n/**\n * Adds LView or LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param lView The view where LView or LContainer should be added\n * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header\n * @param lViewOrLContainer The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\nfunction addToViewTree(lView, lViewOrLContainer) {\n    // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n    // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n    // of order, the change detection will run out of order, as the act of retrieving the the\n    // LContainer from the RNode is what adds it to the queue.\n    if (lView[CHILD_HEAD]) {\n        lView[CHILD_TAIL][NEXT] = lViewOrLContainer;\n    }\n    else {\n        lView[CHILD_HEAD] = lViewOrLContainer;\n    }\n    lView[CHILD_TAIL] = lViewOrLContainer;\n    return lViewOrLContainer;\n}\n///////////////////////////////\n//// Change detection\n///////////////////////////////\n/**\n * Marks current view and all ancestors dirty.\n *\n * Returns the root view because it is found as a byproduct of marking the view tree\n * dirty, and can be used by methods that consume markViewDirty() to easily schedule\n * change detection. Otherwise, such methods would need to traverse up the view tree\n * an additional time to get the root view and schedule a tick on it.\n *\n * @param lView The starting LView to mark dirty\n * @returns the root LView\n */\nfunction markViewDirty(lView) {\n    while (lView) {\n        lView[FLAGS] |= 64 /* Dirty */;\n        const parent = getLViewParent(lView);\n        // Stop traversing up as soon as you find a root view that wasn't attached to any container\n        if (isRootView(lView) && !parent) {\n            return lView;\n        }\n        // continue otherwise\n        lView = parent;\n    }\n    return null;\n}\n/**\n * Used to schedule change detection on the whole application.\n *\n * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run.\n * It is usually called indirectly by calling `markDirty` when the view needs to be\n * re-rendered.\n *\n * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple\n * `scheduleTick` requests. The scheduling function can be overridden in\n * `renderComponent`'s `scheduler` option.\n */\nfunction scheduleTick(rootContext, flags) {\n    const nothingScheduled = rootContext.flags === 0 /* Empty */;\n    if (nothingScheduled && rootContext.clean == _CLEAN_PROMISE) {\n        // https://github.com/angular/angular/issues/39296\n        // should only attach the flags when really scheduling a tick\n        rootContext.flags |= flags;\n        let res;\n        rootContext.clean = new Promise((r) => res = r);\n        rootContext.scheduler(() => {\n            if (rootContext.flags & 1 /* DetectChanges */) {\n                rootContext.flags &= ~1 /* DetectChanges */;\n                tickRootContext(rootContext);\n            }\n            if (rootContext.flags & 2 /* FlushPlayers */) {\n                rootContext.flags &= ~2 /* FlushPlayers */;\n                const playerHandler = rootContext.playerHandler;\n                if (playerHandler) {\n                    playerHandler.flushPlayers();\n                }\n            }\n            rootContext.clean = _CLEAN_PROMISE;\n            res(null);\n        });\n    }\n}\nfunction tickRootContext(rootContext) {\n    for (let i = 0; i < rootContext.components.length; i++) {\n        const rootComponent = rootContext.components[i];\n        const lView = readPatchedLView(rootComponent);\n        const tView = lView[TVIEW];\n        renderComponentOrTemplate(tView, lView, tView.template, rootComponent);\n    }\n}\nfunction detectChangesInternal(tView, lView, context) {\n    const rendererFactory = lView[RENDERER_FACTORY];\n    if (rendererFactory.begin)\n        rendererFactory.begin();\n    try {\n        refreshView(tView, lView, tView.template, context);\n    }\n    catch (error) {\n        handleError(lView, error);\n        throw error;\n    }\n    finally {\n        if (rendererFactory.end)\n            rendererFactory.end();\n    }\n}\n/**\n * Synchronously perform change detection on a root view and its components.\n *\n * @param lView The view which the change detection should be performed on.\n */\nfunction detectChangesInRootView(lView) {\n    tickRootContext(lView[CONTEXT]);\n}\nfunction checkNoChangesInternal(tView, view, context) {\n    setIsInCheckNoChangesMode(true);\n    try {\n        detectChangesInternal(tView, view, context);\n    }\n    finally {\n        setIsInCheckNoChangesMode(false);\n    }\n}\n/**\n * Checks the change detector on a root view and its components, and throws if any changes are\n * detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n *\n * @param lView The view which the change detection should be checked on.\n */\nfunction checkNoChangesInRootView(lView) {\n    setIsInCheckNoChangesMode(true);\n    try {\n        detectChangesInRootView(lView);\n    }\n    finally {\n        setIsInCheckNoChangesMode(false);\n    }\n}\nfunction executeViewQueryFn(flags, viewQueryFn, component) {\n    ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');\n    setCurrentQueryIndex(0);\n    viewQueryFn(flags, component);\n}\n///////////////////////////////\n//// Bindings & interpolations\n///////////////////////////////\n/**\n * Stores meta-data for a property binding to be used by TestBed's `DebugElement.properties`.\n *\n * In order to support TestBed's `DebugElement.properties` we need to save, for each binding:\n * - a bound property name;\n * - a static parts of interpolated strings;\n *\n * A given property metadata is saved at the binding's index in the `TView.data` (in other words, a\n * property binding metadata will be stored in `TView.data` at the same index as a bound value in\n * `LView`). Metadata are represented as `INTERPOLATION_DELIMITER`-delimited string with the\n * following format:\n * - `propertyName` for bound properties;\n * - `propertyName�prefix�interpolation_static_part1�..interpolation_static_partN�suffix` for\n * interpolated properties.\n *\n * @param tData `TData` where meta-data will be saved;\n * @param tNode `TNode` that is a target of the binding;\n * @param propertyName bound property name;\n * @param bindingIndex binding index in `LView`\n * @param interpolationParts static interpolation parts (for property interpolations)\n */\nfunction storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex, ...interpolationParts) {\n    // Binding meta-data are stored only the first time a given property instruction is processed.\n    // Since we don't have a concept of the \"first update pass\" we need to check for presence of the\n    // binding meta-data to decide if one should be stored (or if was stored already).\n    if (tData[bindingIndex] === null) {\n        if (tNode.inputs == null || !tNode.inputs[propertyName]) {\n            const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);\n            propBindingIdxs.push(bindingIndex);\n            let bindingMetadata = propertyName;\n            if (interpolationParts.length > 0) {\n                bindingMetadata +=\n                    INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);\n            }\n            tData[bindingIndex] = bindingMetadata;\n        }\n    }\n}\nconst CLEAN_PROMISE = _CLEAN_PROMISE;\nfunction getOrCreateLViewCleanup(view) {\n    // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n    return view[CLEANUP] || (view[CLEANUP] = ngDevMode ? new LCleanup() : []);\n}\nfunction getOrCreateTViewCleanup(tView) {\n    return tView.cleanup || (tView.cleanup = ngDevMode ? new TCleanup() : []);\n}\n/**\n * There are cases where the sub component's renderer needs to be included\n * instead of the current renderer (see the componentSyntheticHost* instructions).\n */\nfunction loadComponentRenderer(currentDef, tNode, lView) {\n    // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root\n    // component (see packages/core/src/render3/component.ts). This is not consistent with the process\n    // of creating inner components, when current directive index is available in the state. In order\n    // to avoid relying on current def being `null` (thus special-casing root component creation), the\n    // process of creating root component should be unified with the process of creating inner\n    // components.\n    if (currentDef === null || isComponentDef(currentDef)) {\n        lView = unwrapLView(lView[tNode.index]);\n    }\n    return lView[RENDERER];\n}\n/** Handles an error thrown in an LView. */\nfunction handleError(lView, error) {\n    const injector = lView[INJECTOR];\n    const errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n    errorHandler && errorHandler.handleError(error);\n}\n/**\n * Set the inputs of directives at the current node to corresponding value.\n *\n * @param tView The current TView\n * @param lView the `LView` which contains the directives.\n * @param inputs mapping between the public \"input\" name and privately-known,\n *        possibly minified, property names to write to.\n * @param value Value to set.\n */\nfunction setInputsForProperty(tView, lView, inputs, publicName, value) {\n    for (let i = 0; i < inputs.length;) {\n        const index = inputs[i++];\n        const privateName = inputs[i++];\n        const instance = lView[index];\n        ngDevMode && assertIndexInRange(lView, index);\n        const def = tView.data[index];\n        if (def.setInput !== null) {\n            def.setInput(instance, value, publicName, privateName);\n        }\n        else {\n            instance[privateName] = value;\n        }\n    }\n}\n/**\n * Updates a text binding at a given index in a given LView.\n */\nfunction textBindingInternal(lView, index, value) {\n    ngDevMode && assertString(value, 'Value should be a string');\n    ngDevMode && assertNotSame(value, NO_CHANGE, 'value should not be NO_CHANGE');\n    ngDevMode && assertIndexInRange(lView, index);\n    const element = getNativeByIndex(index, lView);\n    ngDevMode && assertDefined(element, 'native element should exist');\n    updateTextNode(lView[RENDERER], element, value);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Compute the static styling (class/style) from `TAttributes`.\n *\n * This function should be called during `firstCreatePass` only.\n *\n * @param tNode The `TNode` into which the styling information should be loaded.\n * @param attrs `TAttributes` containing the styling information.\n * @param writeToHost Where should the resulting static styles be written?\n *   - `false` Write to `TNode.stylesWithoutHost` / `TNode.classesWithoutHost`\n *   - `true` Write to `TNode.styles` / `TNode.classes`\n */\nfunction computeStaticStyling(tNode, attrs, writeToHost) {\n    ngDevMode &&\n        assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only');\n    let styles = writeToHost ? tNode.styles : null;\n    let classes = writeToHost ? tNode.classes : null;\n    let mode = 0;\n    if (attrs !== null) {\n        for (let i = 0; i < attrs.length; i++) {\n            const value = attrs[i];\n            if (typeof value === 'number') {\n                mode = value;\n            }\n            else if (mode == 1 /* Classes */) {\n                classes = concatStringsWithSpace(classes, value);\n            }\n            else if (mode == 2 /* Styles */) {\n                const style = value;\n                const styleValue = attrs[++i];\n                styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';');\n            }\n        }\n    }\n    writeToHost ? tNode.styles = styles : tNode.stylesWithoutHost = styles;\n    writeToHost ? tNode.classes = classes : tNode.classesWithoutHost = classes;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Synchronously perform change detection on a component (and possibly its sub-components).\n *\n * This function triggers change detection in a synchronous way on a component.\n *\n * @param component The component which the change detection should be performed on.\n */\nfunction detectChanges(component) {\n    const view = getComponentViewByInstance(component);\n    detectChangesInternal(view[TVIEW], view, component);\n}\n/**\n * Marks the component as dirty (needing change detection). Marking a component dirty will\n * schedule a change detection on it at some point in the future.\n *\n * Marking an already dirty component as dirty won't do anything. Only one outstanding change\n * detection can be scheduled per component tree.\n *\n * @param component Component to mark as dirty.\n */\nfunction markDirty(component) {\n    ngDevMode && assertDefined(component, 'component');\n    const rootView = markViewDirty(getComponentViewByInstance(component));\n    ngDevMode && assertDefined(rootView[CONTEXT], 'rootContext should be defined');\n    scheduleTick(rootView[CONTEXT], 1 /* DetectChanges */);\n}\n/**\n * Used to perform change detection on the whole application.\n *\n * This is equivalent to `detectChanges`, but invoked on root component. Additionally, `tick`\n * executes lifecycle hooks and conditionally checks components based on their\n * `ChangeDetectionStrategy` and dirtiness.\n *\n * The preferred way to trigger change detection is to call `markDirty`. `markDirty` internally\n * schedules `tick` using a scheduler in order to coalesce multiple `markDirty` calls into a\n * single change detection run. By default, the scheduler is `requestAnimationFrame`, but can\n * be changed when calling `renderComponent` and providing the `scheduler` option.\n */\nfunction tick(component) {\n    const rootView = getRootView(component);\n    const rootContext = rootView[CONTEXT];\n    tickRootContext(rootContext);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\nconst INJECTOR$1 = new InjectionToken('INJECTOR', \n// Dissable tslint because this is const enum which gets inlined not top level prop access.\n// tslint:disable-next-line: no-toplevel-property-access\n-1 /* Injector */);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass NullInjector {\n    get(token, notFoundValue = THROW_IF_NOT_FOUND) {\n        if (notFoundValue === THROW_IF_NOT_FOUND) {\n            const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`);\n            error.name = 'NullInjectorError';\n            throw error;\n        }\n        return notFoundValue;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\nconst INJECTOR_SCOPE = new InjectionToken('Set Injector scope.');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst NOT_YET = {};\n/**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\nconst CIRCULAR = {};\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR = undefined;\nfunction getNullInjector() {\n    if (NULL_INJECTOR === undefined) {\n        NULL_INJECTOR = new NullInjector();\n    }\n    return NULL_INJECTOR;\n}\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n *\n * @publicApi\n */\nfunction createInjector(defType, parent = null, additionalProviders = null, name) {\n    const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n    injector._resolveInjectorDefTypes();\n    return injector;\n}\n/**\n * Creates a new injector without eagerly resolving its injector types. Can be used in places\n * where resolving the injector types immediately can lead to an infinite loop. The injector types\n * should be resolved at a later point by calling `_resolveInjectorDefTypes`.\n */\nfunction createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name) {\n    return new R3Injector(defType, additionalProviders, parent || getNullInjector(), name);\n}\nclass R3Injector {\n    constructor(def, additionalProviders, parent, source = null) {\n        this.parent = parent;\n        /**\n         * Map of tokens to records which contain the instances of those tokens.\n         * - `null` value implies that we don't have the record. Used by tree-shakable injectors\n         * to prevent further searches.\n         */\n        this.records = new Map();\n        /**\n         * The transitive set of `InjectorType`s which define this injector.\n         */\n        this.injectorDefTypes = new Set();\n        /**\n         * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n         */\n        this.onDestroy = new Set();\n        this._destroyed = false;\n        const dedupStack = [];\n        // Start off by creating Records for every provider declared in every InjectorType\n        // included transitively in additional providers then do the same for `def`. This order is\n        // important because `def` may include providers that override ones in additionalProviders.\n        additionalProviders &&\n            deepForEach(additionalProviders, provider => this.processProvider(provider, def, additionalProviders));\n        deepForEach([def], injectorDef => this.processInjectorType(injectorDef, [], dedupStack));\n        // Make sure the INJECTOR token provides this injector.\n        this.records.set(INJECTOR$1, makeRecord(undefined, this));\n        // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n        // any injectable scoped to APP_ROOT_SCOPE.\n        const record = this.records.get(INJECTOR_SCOPE);\n        this.scope = record != null ? record.value : null;\n        // Source name, used for debugging\n        this.source = source || (typeof def === 'object' ? null : stringify(def));\n    }\n    /**\n     * Flag indicating that this injector was previously destroyed.\n     */\n    get destroyed() {\n        return this._destroyed;\n    }\n    /**\n     * Destroy the injector and release references to every instance or provider associated with it.\n     *\n     * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n     * hook was found.\n     */\n    destroy() {\n        this.assertNotDestroyed();\n        // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n        this._destroyed = true;\n        try {\n            // Call all the lifecycle hooks.\n            this.onDestroy.forEach(service => service.ngOnDestroy());\n        }\n        finally {\n            // Release all references.\n            this.records.clear();\n            this.onDestroy.clear();\n            this.injectorDefTypes.clear();\n        }\n    }\n    get(token, notFoundValue = THROW_IF_NOT_FOUND, flags = InjectFlags.Default) {\n        this.assertNotDestroyed();\n        // Set the injection context.\n        const previousInjector = setCurrentInjector(this);\n        const previousInjectImplementation = setInjectImplementation(undefined);\n        try {\n            // Check for the SkipSelf flag.\n            if (!(flags & InjectFlags.SkipSelf)) {\n                // SkipSelf isn't set, check if the record belongs to this injector.\n                let record = this.records.get(token);\n                if (record === undefined) {\n                    // No record, but maybe the token is scoped to this injector. Look for an injectable\n                    // def with a scope matching this injector.\n                    const def = couldBeInjectableType(token) && getInjectableDef(token);\n                    if (def && this.injectableDefInScope(def)) {\n                        // Found an injectable def and it's scoped to this injector. Pretend as if it was here\n                        // all along.\n                        record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n                    }\n                    else {\n                        record = null;\n                    }\n                    this.records.set(token, record);\n                }\n                // If a record was found, get the instance for it and return it.\n                if (record != null /* NOT null || undefined */) {\n                    return this.hydrate(token, record);\n                }\n            }\n            // Select the next injector based on the Self flag - if self is set, the next injector is\n            // the NullInjector, otherwise it's the parent.\n            const nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector();\n            // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue\n            // is undefined, the value is null, otherwise it's the notFoundValue.\n            notFoundValue = (flags & InjectFlags.Optional) && notFoundValue === THROW_IF_NOT_FOUND ?\n                null :\n                notFoundValue;\n            return nextInjector.get(token, notFoundValue);\n        }\n        catch (e) {\n            if (e.name === 'NullInjectorError') {\n                const path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n                path.unshift(stringify(token));\n                if (previousInjector) {\n                    // We still have a parent injector, keep throwing\n                    throw e;\n                }\n                else {\n                    // Format & throw the final error message when we don't have any previous injector\n                    return catchInjectorError(e, token, 'R3InjectorError', this.source);\n                }\n            }\n            else {\n                throw e;\n            }\n        }\n        finally {\n            // Lastly, restore the previous injection context.\n            setInjectImplementation(previousInjectImplementation);\n            setCurrentInjector(previousInjector);\n        }\n    }\n    /** @internal */\n    _resolveInjectorDefTypes() {\n        this.injectorDefTypes.forEach(defType => this.get(defType));\n    }\n    toString() {\n        const tokens = [], records = this.records;\n        records.forEach((v, token) => tokens.push(stringify(token)));\n        return `R3Injector[${tokens.join(', ')}]`;\n    }\n    assertNotDestroyed() {\n        if (this._destroyed) {\n            throw new Error('Injector has already been destroyed.');\n        }\n    }\n    /**\n     * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers\n     * to this injector.\n     *\n     * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,\n     * the function will return \"true\" to indicate that the providers of the type definition need\n     * to be processed. This allows us to process providers of injector types after all imports of\n     * an injector definition are processed. (following View Engine semantics: see FW-1349)\n     */\n    processInjectorType(defOrWrappedDef, parents, dedupStack) {\n        defOrWrappedDef = resolveForwardRef(defOrWrappedDef);\n        if (!defOrWrappedDef)\n            return false;\n        // Either the defOrWrappedDef is an InjectorType (with injector def) or an\n        // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic\n        // read, so care is taken to only do the read once.\n        // First attempt to read the injector def (`ɵinj`).\n        let def = getInjectorDef(defOrWrappedDef);\n        // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.\n        const ngModule = (def == null) && defOrWrappedDef.ngModule || undefined;\n        // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,\n        // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type\n        // is the `ngModule`.\n        const defType = (ngModule === undefined) ? defOrWrappedDef : ngModule;\n        // Check for circular dependencies.\n        if (ngDevMode && parents.indexOf(defType) !== -1) {\n            const defName = stringify(defType);\n            const path = parents.map(stringify);\n            throwCyclicDependencyError(defName, path);\n        }\n        // Check for multiple imports of the same module\n        const isDuplicate = dedupStack.indexOf(defType) !== -1;\n        // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual\n        // `InjectorDef` is on its `ngModule`.\n        if (ngModule !== undefined) {\n            def = getInjectorDef(ngModule);\n        }\n        // If no definition was found, it might be from exports. Remove it.\n        if (def == null) {\n            return false;\n        }\n        // Add providers in the same way that @NgModule resolution did:\n        // First, include providers from any imports.\n        if (def.imports != null && !isDuplicate) {\n            // Before processing defType's imports, add it to the set of parents. This way, if it ends\n            // up deeply importing itself, this can be detected.\n            ngDevMode && parents.push(defType);\n            // Add it to the set of dedups. This way we can detect multiple imports of the same module\n            dedupStack.push(defType);\n            let importTypesWithProviders;\n            try {\n                deepForEach(def.imports, imported => {\n                    if (this.processInjectorType(imported, parents, dedupStack)) {\n                        if (importTypesWithProviders === undefined)\n                            importTypesWithProviders = [];\n                        // If the processed import is an injector type with providers, we store it in the\n                        // list of import types with providers, so that we can process those afterwards.\n                        importTypesWithProviders.push(imported);\n                    }\n                });\n            }\n            finally {\n                // Remove it from the parents set when finished.\n                ngDevMode && parents.pop();\n            }\n            // Imports which are declared with providers (TypeWithProviders) need to be processed\n            // after all imported modules are processed. This is similar to how View Engine\n            // processes/merges module imports in the metadata resolver. See: FW-1349.\n            if (importTypesWithProviders !== undefined) {\n                for (let i = 0; i < importTypesWithProviders.length; i++) {\n                    const { ngModule, providers } = importTypesWithProviders[i];\n                    deepForEach(providers, provider => this.processProvider(provider, ngModule, providers || EMPTY_ARRAY));\n                }\n            }\n        }\n        // Track the InjectorType and add a provider for it. It's important that this is done after the\n        // def's imports.\n        this.injectorDefTypes.add(defType);\n        const factory = getFactoryDef(defType) || (() => new defType());\n        this.records.set(defType, makeRecord(factory, NOT_YET));\n        // Next, include providers listed on the definition itself.\n        const defProviders = def.providers;\n        if (defProviders != null && !isDuplicate) {\n            const injectorType = defOrWrappedDef;\n            deepForEach(defProviders, provider => this.processProvider(provider, injectorType, defProviders));\n        }\n        return (ngModule !== undefined &&\n            defOrWrappedDef.providers !== undefined);\n    }\n    /**\n     * Process a `SingleProvider` and add it.\n     */\n    processProvider(provider, ngModuleType, providers) {\n        // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n        // property.\n        provider = resolveForwardRef(provider);\n        let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n        // Construct a `Record` for the provider.\n        const record = providerToRecord(provider, ngModuleType, providers);\n        if (!isTypeProvider(provider) && provider.multi === true) {\n            // If the provider indicates that it's a multi-provider, process it specially.\n            // First check whether it's been defined already.\n            let multiRecord = this.records.get(token);\n            if (multiRecord) {\n                // It has. Throw a nice error if\n                if (ngDevMode && multiRecord.multi === undefined) {\n                    throwMixedMultiProviderError();\n                }\n            }\n            else {\n                multiRecord = makeRecord(undefined, NOT_YET, true);\n                multiRecord.factory = () => injectArgs(multiRecord.multi);\n                this.records.set(token, multiRecord);\n            }\n            token = provider;\n            multiRecord.multi.push(provider);\n        }\n        else {\n            const existing = this.records.get(token);\n            if (ngDevMode && existing && existing.multi !== undefined) {\n                throwMixedMultiProviderError();\n            }\n        }\n        this.records.set(token, record);\n    }\n    hydrate(token, record) {\n        if (ngDevMode && record.value === CIRCULAR) {\n            throwCyclicDependencyError(stringify(token));\n        }\n        else if (record.value === NOT_YET) {\n            record.value = CIRCULAR;\n            record.value = record.factory();\n        }\n        if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n            this.onDestroy.add(record.value);\n        }\n        return record.value;\n    }\n    injectableDefInScope(def) {\n        if (!def.providedIn) {\n            return false;\n        }\n        const providedIn = resolveForwardRef(def.providedIn);\n        if (typeof providedIn === 'string') {\n            return providedIn === 'any' || (providedIn === this.scope);\n        }\n        else {\n            return this.injectorDefTypes.has(providedIn);\n        }\n    }\n}\nfunction injectableDefOrInjectorDefFactory(token) {\n    // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n    const injectableDef = getInjectableDef(token);\n    const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n    if (factory !== null) {\n        return factory;\n    }\n    // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.\n    // If it's missing that, it's an error.\n    if (token instanceof InjectionToken) {\n        throw new Error(`Token ${stringify(token)} is missing a ɵprov definition.`);\n    }\n    // Undecorated types can sometimes be created if they have no constructor arguments.\n    if (token instanceof Function) {\n        return getUndecoratedInjectableFactory(token);\n    }\n    // There was no way to resolve a factory for this token.\n    throw new Error('unreachable');\n}\nfunction getUndecoratedInjectableFactory(token) {\n    // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n    const paramLength = token.length;\n    if (paramLength > 0) {\n        const args = newArray(paramLength, '?');\n        throw new Error(`Can't resolve all parameters for ${stringify(token)}: (${args.join(', ')}).`);\n    }\n    // The constructor function appears to have no parameters.\n    // This might be because it inherits from a super-class. In which case, use an injectable\n    // def from an ancestor if there is one.\n    // Otherwise this really is a simple class with no dependencies, so return a factory that\n    // just instantiates the zero-arg constructor.\n    const inheritedInjectableDef = getInheritedInjectableDef(token);\n    if (inheritedInjectableDef !== null) {\n        return () => inheritedInjectableDef.factory(token);\n    }\n    else {\n        return () => new token();\n    }\n}\nfunction providerToRecord(provider, ngModuleType, providers) {\n    if (isValueProvider(provider)) {\n        return makeRecord(undefined, provider.useValue);\n    }\n    else {\n        const factory = providerToFactory(provider, ngModuleType, providers);\n        return makeRecord(factory, NOT_YET);\n    }\n}\n/**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\nfunction providerToFactory(provider, ngModuleType, providers) {\n    let factory = undefined;\n    if (isTypeProvider(provider)) {\n        const unwrappedProvider = resolveForwardRef(provider);\n        return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n    }\n    else {\n        if (isValueProvider(provider)) {\n            factory = () => resolveForwardRef(provider.useValue);\n        }\n        else if (isFactoryProvider(provider)) {\n            factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n        }\n        else if (isExistingProvider(provider)) {\n            factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n        }\n        else {\n            const classRef = resolveForwardRef(provider &&\n                (provider.useClass || provider.provide));\n            if (ngDevMode && !classRef) {\n                throwInvalidProviderError(ngModuleType, providers, provider);\n            }\n            if (hasDeps(provider)) {\n                factory = () => new (classRef)(...injectArgs(provider.deps));\n            }\n            else {\n                return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n            }\n        }\n    }\n    return factory;\n}\nfunction makeRecord(factory, value, multi = false) {\n    return {\n        factory: factory,\n        value: value,\n        multi: multi ? [] : undefined,\n    };\n}\nfunction isValueProvider(value) {\n    return value !== null && typeof value == 'object' && USE_VALUE in value;\n}\nfunction isExistingProvider(value) {\n    return !!(value && value.useExisting);\n}\nfunction isFactoryProvider(value) {\n    return !!(value && value.useFactory);\n}\nfunction isTypeProvider(value) {\n    return typeof value === 'function';\n}\nfunction isClassProvider(value) {\n    return !!value.useClass;\n}\nfunction hasDeps(value) {\n    return !!value.deps;\n}\nfunction hasOnDestroy(value) {\n    return value !== null && typeof value === 'object' &&\n        typeof value.ngOnDestroy === 'function';\n}\nfunction couldBeInjectableType(value) {\n    return (typeof value === 'function') ||\n        (typeof value === 'object' && value instanceof InjectionToken);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction INJECTOR_IMPL__PRE_R3__(providers, parent, name) {\n    return new StaticInjector(providers, parent, name);\n}\nfunction INJECTOR_IMPL__POST_R3__(providers, parent, name) {\n    return createInjector({ name: name }, parent, providers, name);\n}\nconst INJECTOR_IMPL = INJECTOR_IMPL__POST_R3__;\n/**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/glossary#provider) that associate\n * dependencies of various types with [injection tokens](guide/glossary#di-token).\n *\n * @see [\"DI Providers\"](guide/dependency-injection-providers).\n * @see `StaticProvider`\n *\n * @usageNotes\n *\n *  The following example creates a service injector instance.\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Usage example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @publicApi\n */\nclass Injector {\n    static create(options, parent) {\n        if (Array.isArray(options)) {\n            return INJECTOR_IMPL(options, parent, '');\n        }\n        else {\n            return INJECTOR_IMPL(options.providers, options.parent, options.name || '');\n        }\n    }\n}\nInjector.THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\nInjector.NULL = new NullInjector();\n/** @nocollapse */\nInjector.ɵprov = ɵɵdefineInjectable({\n    token: Injector,\n    providedIn: 'any',\n    factory: () => ɵɵinject(INJECTOR$1),\n});\n/**\n * @internal\n * @nocollapse\n */\nInjector.__NG_ELEMENT_ID__ = -1 /* Injector */;\nconst IDENT = function (value) {\n    return value;\n};\nconst ɵ0$6 = IDENT;\nconst EMPTY = [];\nconst CIRCULAR$1 = IDENT;\nconst MULTI_PROVIDER_FN = function () {\n    return Array.prototype.slice.call(arguments);\n};\nconst ɵ1$1 = MULTI_PROVIDER_FN;\nconst NO_NEW_LINE$1 = 'ɵ';\nclass StaticInjector {\n    constructor(providers, parent = Injector.NULL, source = null) {\n        this.parent = parent;\n        this.source = source;\n        const records = this._records = new Map();\n        records.set(Injector, { token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false });\n        records.set(INJECTOR$1, { token: INJECTOR$1, fn: IDENT, deps: EMPTY, value: this, useNew: false });\n        this.scope = recursivelyProcessProviders(records, providers);\n    }\n    get(token, notFoundValue, flags = InjectFlags.Default) {\n        const records = this._records;\n        let record = records.get(token);\n        if (record === undefined) {\n            // This means we have never seen this record, see if it is tree shakable provider.\n            const injectableDef = getInjectableDef(token);\n            if (injectableDef) {\n                const providedIn = injectableDef && resolveForwardRef(injectableDef.providedIn);\n                if (providedIn === 'any' || providedIn != null && providedIn === this.scope) {\n                    records.set(token, record = resolveProvider({ provide: token, useFactory: injectableDef.factory, deps: EMPTY }));\n                }\n            }\n            if (record === undefined) {\n                // Set record to null to make sure that we don't go through expensive lookup above again.\n                records.set(token, null);\n            }\n        }\n        let lastInjector = setCurrentInjector(this);\n        try {\n            return tryResolveToken(token, record, records, this.parent, notFoundValue, flags);\n        }\n        catch (e) {\n            return catchInjectorError(e, token, 'StaticInjectorError', this.source);\n        }\n        finally {\n            setCurrentInjector(lastInjector);\n        }\n    }\n    toString() {\n        const tokens = [], records = this._records;\n        records.forEach((v, token) => tokens.push(stringify(token)));\n        return `StaticInjector[${tokens.join(', ')}]`;\n    }\n}\nfunction resolveProvider(provider) {\n    const deps = computeDeps(provider);\n    let fn = IDENT;\n    let value = EMPTY;\n    let useNew = false;\n    let provide = resolveForwardRef(provider.provide);\n    if (USE_VALUE in provider) {\n        // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined.\n        value = provider.useValue;\n    }\n    else if (provider.useFactory) {\n        fn = provider.useFactory;\n    }\n    else if (provider.useExisting) {\n        // Just use IDENT\n    }\n    else if (provider.useClass) {\n        useNew = true;\n        fn = resolveForwardRef(provider.useClass);\n    }\n    else if (typeof provide == 'function') {\n        useNew = true;\n        fn = provide;\n    }\n    else {\n        throw staticError('StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable', provider);\n    }\n    return { deps, fn, useNew, value };\n}\nfunction multiProviderMixError(token) {\n    return staticError('Cannot mix multi providers and regular providers', token);\n}\nfunction recursivelyProcessProviders(records, provider) {\n    let scope = null;\n    if (provider) {\n        provider = resolveForwardRef(provider);\n        if (Array.isArray(provider)) {\n            // if we have an array recurse into the array\n            for (let i = 0; i < provider.length; i++) {\n                scope = recursivelyProcessProviders(records, provider[i]) || scope;\n            }\n        }\n        else if (typeof provider === 'function') {\n            // Functions were supported in ReflectiveInjector, but are not here. For safety give useful\n            // error messages\n            throw staticError('Function/Class not supported', provider);\n        }\n        else if (provider && typeof provider === 'object' && provider.provide) {\n            // At this point we have what looks like a provider: {provide: ?, ....}\n            let token = resolveForwardRef(provider.provide);\n            const resolvedProvider = resolveProvider(provider);\n            if (provider.multi === true) {\n                // This is a multi provider.\n                let multiProvider = records.get(token);\n                if (multiProvider) {\n                    if (multiProvider.fn !== MULTI_PROVIDER_FN) {\n                        throw multiProviderMixError(token);\n                    }\n                }\n                else {\n                    // Create a placeholder factory which will look up the constituents of the multi provider.\n                    records.set(token, multiProvider = {\n                        token: provider.provide,\n                        deps: [],\n                        useNew: false,\n                        fn: MULTI_PROVIDER_FN,\n                        value: EMPTY\n                    });\n                }\n                // Treat the provider as the token.\n                token = provider;\n                multiProvider.deps.push({ token, options: 6 /* Default */ });\n            }\n            const record = records.get(token);\n            if (record && record.fn == MULTI_PROVIDER_FN) {\n                throw multiProviderMixError(token);\n            }\n            if (token === INJECTOR_SCOPE) {\n                scope = resolvedProvider.value;\n            }\n            records.set(token, resolvedProvider);\n        }\n        else {\n            throw staticError('Unexpected provider', provider);\n        }\n    }\n    return scope;\n}\nfunction tryResolveToken(token, record, records, parent, notFoundValue, flags) {\n    try {\n        return resolveToken(token, record, records, parent, notFoundValue, flags);\n    }\n    catch (e) {\n        // ensure that 'e' is of type Error.\n        if (!(e instanceof Error)) {\n            e = new Error(e);\n        }\n        const path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n        path.unshift(token);\n        if (record && record.value == CIRCULAR$1) {\n            // Reset the Circular flag.\n            record.value = EMPTY;\n        }\n        throw e;\n    }\n}\nfunction resolveToken(token, record, records, parent, notFoundValue, flags) {\n    let value;\n    if (record && !(flags & InjectFlags.SkipSelf)) {\n        // If we don't have a record, this implies that we don't own the provider hence don't know how\n        // to resolve it.\n        value = record.value;\n        if (value == CIRCULAR$1) {\n            throw Error(NO_NEW_LINE$1 + 'Circular dependency');\n        }\n        else if (value === EMPTY) {\n            record.value = CIRCULAR$1;\n            let obj = undefined;\n            let useNew = record.useNew;\n            let fn = record.fn;\n            let depRecords = record.deps;\n            let deps = EMPTY;\n            if (depRecords.length) {\n                deps = [];\n                for (let i = 0; i < depRecords.length; i++) {\n                    const depRecord = depRecords[i];\n                    const options = depRecord.options;\n                    const childRecord = options & 2 /* CheckSelf */ ? records.get(depRecord.token) : undefined;\n                    deps.push(tryResolveToken(\n                    // Current Token to resolve\n                    depRecord.token, \n                    // A record which describes how to resolve the token.\n                    // If undefined, this means we don't have such a record\n                    childRecord, \n                    // Other records we know about.\n                    records, \n                    // If we don't know how to resolve dependency and we should not check parent for it,\n                    // than pass in Null injector.\n                    !childRecord && !(options & 4 /* CheckParent */) ? Injector.NULL : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, InjectFlags.Default));\n                }\n            }\n            record.value = value = useNew ? new fn(...deps) : fn.apply(obj, deps);\n        }\n    }\n    else if (!(flags & InjectFlags.Self)) {\n        value = parent.get(token, notFoundValue, InjectFlags.Default);\n    }\n    else if (!(flags & InjectFlags.Optional)) {\n        value = Injector.NULL.get(token, notFoundValue);\n    }\n    else {\n        value = Injector.NULL.get(token, typeof notFoundValue !== 'undefined' ? notFoundValue : null);\n    }\n    return value;\n}\nfunction computeDeps(provider) {\n    let deps = EMPTY;\n    const providerDeps = provider.deps;\n    if (providerDeps && providerDeps.length) {\n        deps = [];\n        for (let i = 0; i < providerDeps.length; i++) {\n            let options = 6 /* Default */;\n            let token = resolveForwardRef(providerDeps[i]);\n            if (Array.isArray(token)) {\n                for (let j = 0, annotations = token; j < annotations.length; j++) {\n                    const annotation = annotations[j];\n                    if (annotation instanceof Optional || annotation == Optional) {\n                        options = options | 1 /* Optional */;\n                    }\n                    else if (annotation instanceof SkipSelf || annotation == SkipSelf) {\n                        options = options & ~2 /* CheckSelf */;\n                    }\n                    else if (annotation instanceof Self || annotation == Self) {\n                        options = options & ~4 /* CheckParent */;\n                    }\n                    else if (annotation instanceof Inject) {\n                        token = annotation.token;\n                    }\n                    else {\n                        token = resolveForwardRef(annotation);\n                    }\n                }\n            }\n            deps.push({ token, options });\n        }\n    }\n    else if (provider.useExisting) {\n        const token = resolveForwardRef(provider.useExisting);\n        deps = [{ token, options: 6 /* Default */ }];\n    }\n    else if (!providerDeps && !(USE_VALUE in provider)) {\n        // useValue & useExisting are the only ones which are exempt from deps all others need it.\n        throw staticError('\\'deps\\' required', provider);\n    }\n    return deps;\n}\nfunction staticError(text, obj) {\n    return new Error(formatError(text, obj, 'StaticInjectorError'));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Retrieves the component instance associated with a given DOM element.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n *   <div>\n *     <child-comp></child-comp>\n *   </div>\n * </app-root>\n * ```\n *\n * Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent`\n * associated with this DOM element.\n *\n * Calling the function on `<app-root>` will return the `MyApp` instance.\n *\n *\n * @param element DOM element from which the component should be retrieved.\n * @returns Component instance associated with the element or `null` if there\n *    is no component associated with it.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getComponent(element) {\n    assertDomElement(element);\n    const context = getLContext(element);\n    if (context === null)\n        return null;\n    if (context.component === undefined) {\n        context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView);\n    }\n    return context.component;\n}\n/**\n * If inside an embedded view (e.g. `*ngIf` or `*ngFor`), retrieves the context of the embedded\n * view that the element is part of. Otherwise retrieves the instance of the component whose view\n * owns the element (in this case, the result is the same as calling `getOwningComponent`).\n *\n * @param element Element for which to get the surrounding component instance.\n * @returns Instance of the component that is around the element or null if the element isn't\n *    inside any component.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getContext(element) {\n    assertDomElement(element);\n    const context = getLContext(element);\n    return context === null ? null : context.lView[CONTEXT];\n}\n/**\n * Retrieves the component instance whose view contains the DOM element.\n *\n * For example, if `<child-comp>` is used in the template of `<app-comp>`\n * (i.e. a `ViewChild` of `<app-comp>`), calling `getOwningComponent` on `<child-comp>`\n * would return `<app-comp>`.\n *\n * @param elementOrDir DOM element, component or directive instance\n *    for which to retrieve the root components.\n * @returns Component instance whose view owns the DOM element or null if the element is not\n *    part of a component view.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getOwningComponent(elementOrDir) {\n    const context = getLContext(elementOrDir);\n    if (context === null)\n        return null;\n    let lView = context.lView;\n    let parent;\n    ngDevMode && assertLView(lView);\n    while (lView[TVIEW].type === 2 /* Embedded */ && (parent = getLViewParent(lView))) {\n        lView = parent;\n    }\n    return lView[FLAGS] & 512 /* IsRoot */ ? null : lView[CONTEXT];\n}\n/**\n * Retrieves all root components associated with a DOM element, directive or component instance.\n * Root components are those which have been bootstrapped by Angular.\n *\n * @param elementOrDir DOM element, component or directive instance\n *    for which to retrieve the root components.\n * @returns Root components associated with the target object.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getRootComponents(elementOrDir) {\n    return [...getRootContext(elementOrDir).components];\n}\n/**\n * Retrieves an `Injector` associated with an element, component or directive instance.\n *\n * @param elementOrDir DOM element, component or directive instance for which to\n *    retrieve the injector.\n * @returns Injector associated with the element, component or directive instance.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getInjector(elementOrDir) {\n    const context = getLContext(elementOrDir);\n    if (context === null)\n        return Injector.NULL;\n    const tNode = context.lView[TVIEW].data[context.nodeIndex];\n    return new NodeInjector(tNode, context.lView);\n}\n/**\n * Retrieve a set of injection tokens at a given DOM node.\n *\n * @param element Element for which the injection tokens should be retrieved.\n */\nfunction getInjectionTokens(element) {\n    const context = getLContext(element);\n    if (context === null)\n        return [];\n    const lView = context.lView;\n    const tView = lView[TVIEW];\n    const tNode = tView.data[context.nodeIndex];\n    const providerTokens = [];\n    const startIndex = tNode.providerIndexes & 1048575 /* ProvidersStartIndexMask */;\n    const endIndex = tNode.directiveEnd;\n    for (let i = startIndex; i < endIndex; i++) {\n        let value = tView.data[i];\n        if (isDirectiveDefHack(value)) {\n            // The fact that we sometimes store Type and sometimes DirectiveDef in this location is a\n            // design flaw.  We should always store same type so that we can be monomorphic. The issue\n            // is that for Components/Directives we store the def instead the type. The correct behavior\n            // is that we should always be storing injectable type in this location.\n            value = value.type;\n        }\n        providerTokens.push(value);\n    }\n    return providerTokens;\n}\n/**\n * Retrieves directive instances associated with a given DOM node. Does not include\n * component instances.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n *   <button my-button></button>\n *   <my-comp></my-comp>\n * </app-root>\n * ```\n *\n * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`\n * directive that is associated with the DOM node.\n *\n * Calling `getDirectives` on `<my-comp>` will return an empty array.\n *\n * @param node DOM node for which to get the directives.\n * @returns Array of directives associated with the node.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getDirectives(node) {\n    // Skip text nodes because we can't have directives associated with them.\n    if (node instanceof Text) {\n        return [];\n    }\n    const context = getLContext(node);\n    if (context === null) {\n        return [];\n    }\n    const lView = context.lView;\n    const tView = lView[TVIEW];\n    const nodeIndex = context.nodeIndex;\n    if (!(tView === null || tView === void 0 ? void 0 : tView.data[nodeIndex])) {\n        return [];\n    }\n    if (context.directives === undefined) {\n        context.directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);\n    }\n    // The `directives` in this case are a named array called `LComponentView`. Clone the\n    // result so we don't expose an internal data structure in the user's console.\n    return context.directives === null ? [] : [...context.directives];\n}\n/**\n * Returns the debug (partial) metadata for a particular directive or component instance.\n * The function accepts an instance of a directive or component and returns the corresponding\n * metadata.\n *\n * @param directiveOrComponentInstance Instance of a directive or component\n * @returns metadata of the passed directive or component\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getDirectiveMetadata(directiveOrComponentInstance) {\n    const { constructor } = directiveOrComponentInstance;\n    if (!constructor) {\n        throw new Error('Unable to find the instance constructor');\n    }\n    // In case a component inherits from a directive, we may have component and directive metadata\n    // To ensure we don't get the metadata of the directive, we want to call `getComponentDef` first.\n    const componentDef = getComponentDef(constructor);\n    if (componentDef) {\n        return {\n            inputs: componentDef.inputs,\n            outputs: componentDef.outputs,\n            encapsulation: componentDef.encapsulation,\n            changeDetection: componentDef.onPush ? ChangeDetectionStrategy.OnPush :\n                ChangeDetectionStrategy.Default\n        };\n    }\n    const directiveDef = getDirectiveDef(constructor);\n    if (directiveDef) {\n        return { inputs: directiveDef.inputs, outputs: directiveDef.outputs };\n    }\n    return null;\n}\n/**\n * Retrieve map of local references.\n *\n * The references are retrieved as a map of local reference name to element or directive instance.\n *\n * @param target DOM element, component or directive instance for which to retrieve\n *    the local references.\n */\nfunction getLocalRefs(target) {\n    const context = getLContext(target);\n    if (context === null)\n        return {};\n    if (context.localRefs === undefined) {\n        context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex);\n    }\n    return context.localRefs || {};\n}\n/**\n * Retrieves the host element of a component or directive instance.\n * The host element is the DOM element that matched the selector of the directive.\n *\n * @param componentOrDirective Component or directive instance for which the host\n *     element should be retrieved.\n * @returns Host element of the target.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getHostElement(componentOrDirective) {\n    return getLContext(componentOrDirective).native;\n}\n/**\n * Retrieves the rendered text for a given component.\n *\n * This function retrieves the host element of a component and\n * and then returns the `textContent` for that element. This implies\n * that the text returned will include re-projected content of\n * the component as well.\n *\n * @param component The component to return the content text for.\n */\nfunction getRenderedText(component) {\n    const hostElement = getHostElement(component);\n    return hostElement.textContent || '';\n}\n/**\n * Retrieves a list of event listeners associated with a DOM element. The list does include host\n * listeners, but it does not include event listeners defined outside of the Angular context\n * (e.g. through `addEventListener`).\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n *   <div (click)=\"doSomething()\"></div>\n * </app-root>\n * ```\n *\n * Calling `getListeners` on `<div>` will return an object that looks as follows:\n *\n * ```ts\n * {\n *   name: 'click',\n *   element: <div>,\n *   callback: () => doSomething(),\n *   useCapture: false\n * }\n * ```\n *\n * @param element Element for which the DOM listeners should be retrieved.\n * @returns Array of event listeners on the DOM element.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getListeners(element) {\n    assertDomElement(element);\n    const lContext = getLContext(element);\n    if (lContext === null)\n        return [];\n    const lView = lContext.lView;\n    const tView = lView[TVIEW];\n    const lCleanup = lView[CLEANUP];\n    const tCleanup = tView.cleanup;\n    const listeners = [];\n    if (tCleanup && lCleanup) {\n        for (let i = 0; i < tCleanup.length;) {\n            const firstParam = tCleanup[i++];\n            const secondParam = tCleanup[i++];\n            if (typeof firstParam === 'string') {\n                const name = firstParam;\n                const listenerElement = unwrapRNode(lView[secondParam]);\n                const callback = lCleanup[tCleanup[i++]];\n                const useCaptureOrIndx = tCleanup[i++];\n                // if useCaptureOrIndx is boolean then report it as is.\n                // if useCaptureOrIndx is positive number then it in unsubscribe method\n                // if useCaptureOrIndx is negative number then it is a Subscription\n                const type = (typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0) ? 'dom' : 'output';\n                const useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false;\n                if (element == listenerElement) {\n                    listeners.push({ element, name, callback, useCapture, type });\n                }\n            }\n        }\n    }\n    listeners.sort(sortListeners);\n    return listeners;\n}\nfunction sortListeners(a, b) {\n    if (a.name == b.name)\n        return 0;\n    return a.name < b.name ? -1 : 1;\n}\n/**\n * This function should not exist because it is megamorphic and only mostly correct.\n *\n * See call site for more info.\n */\nfunction isDirectiveDefHack(obj) {\n    return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;\n}\n/**\n * Returns the attached `DebugNode` instance for an element in the DOM.\n *\n * @param element DOM element which is owned by an existing component's view.\n */\nfunction getDebugNode(element) {\n    if (ngDevMode && !(element instanceof Node)) {\n        throw new Error('Expecting instance of DOM Element');\n    }\n    const lContext = getLContext(element);\n    if (lContext === null) {\n        return null;\n    }\n    const lView = lContext.lView;\n    const nodeIndex = lContext.nodeIndex;\n    if (nodeIndex !== -1) {\n        const valueInLView = lView[nodeIndex];\n        // this means that value in the lView is a component with its own\n        // data. In this situation the TNode is not accessed at the same spot.\n        const tNode = isLView(valueInLView) ? valueInLView[T_HOST] : getTNode(lView[TVIEW], nodeIndex);\n        ngDevMode &&\n            assertEqual(tNode.index, nodeIndex, 'Expecting that TNode at index is same as index');\n        return buildDebugNode(tNode, lView);\n    }\n    return null;\n}\n/**\n * Retrieve the component `LView` from component/element.\n *\n * NOTE: `LView` is a private and should not be leaked outside.\n *       Don't export this method to `ng.*` on window.\n *\n * @param target DOM element or component instance for which to retrieve the LView.\n */\nfunction getComponentLView(target) {\n    const lContext = getLContext(target);\n    const nodeIndx = lContext.nodeIndex;\n    const lView = lContext.lView;\n    const componentLView = lView[nodeIndx];\n    ngDevMode && assertLView(componentLView);\n    return componentLView;\n}\n/** Asserts that a value is a DOM Element. */\nfunction assertDomElement(value) {\n    if (typeof Element !== 'undefined' && !(value instanceof Element)) {\n        throw new Error('Expecting instance of DOM Element');\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Marks a component for check (in case of OnPush components) and synchronously\n * performs change detection on the application this component belongs to.\n *\n * @param component Component to {@link ChangeDetectorRef#markForCheck mark for check}.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction applyChanges(component) {\n    markDirty(component);\n    getRootComponents(component).forEach(rootComponent => detectChanges(rootComponent));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This file introduces series of globally accessible debug tools\n * to allow for the Angular debugging story to function.\n *\n * To see this in action run the following command:\n *\n *   bazel run --config=ivy\n *   //packages/core/test/bundling/todo:devserver\n *\n *  Then load `localhost:5432` and start using the console tools.\n */\n/**\n * This value reflects the property on the window where the dev\n * tools are patched (window.ng).\n * */\nconst GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';\nlet _published = false;\n/**\n * Publishes a collection of default debug tools onto`window.ng`.\n *\n * These functions are available globally when Angular is in development\n * mode and are automatically stripped away from prod mode is on.\n */\nfunction publishDefaultGlobalUtils() {\n    if (!_published) {\n        _published = true;\n        /**\n         * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n         * The contract of the function might be changed in any release and/or the function can be\n         * removed completely.\n         */\n        publishGlobalUtil('ɵsetProfiler', setProfiler);\n        publishGlobalUtil('getDirectiveMetadata', getDirectiveMetadata);\n        publishGlobalUtil('getComponent', getComponent);\n        publishGlobalUtil('getContext', getContext);\n        publishGlobalUtil('getListeners', getListeners);\n        publishGlobalUtil('getOwningComponent', getOwningComponent);\n        publishGlobalUtil('getHostElement', getHostElement);\n        publishGlobalUtil('getInjector', getInjector);\n        publishGlobalUtil('getRootComponents', getRootComponents);\n        publishGlobalUtil('getDirectives', getDirectives);\n        publishGlobalUtil('applyChanges', applyChanges);\n    }\n}\n/**\n * Publishes the given function to `window.ng` so that it can be\n * used from the browser console when an application is not in production.\n */\nfunction publishGlobalUtil(name, fn) {\n    if (typeof COMPILED === 'undefined' || !COMPILED) {\n        // Note: we can't export `ng` when using closure enhanced optimization as:\n        // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n        // - we can't declare a closure extern as the namespace `ng` is already used within Google\n        //   for typings for AngularJS (via `goog.provide('ng....')`).\n        const w = _global;\n        ngDevMode && assertDefined(fn, 'function not defined');\n        if (w) {\n            let container = w[GLOBAL_PUBLISH_EXPANDO_KEY];\n            if (!container) {\n                container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {};\n            }\n            container[name] = fn;\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0$7 = (token, notFoundValue) => {\n    throwProviderNotFoundError(token, 'NullInjector');\n};\n// TODO: A hack to not pull in the NullInjector from @angular/core.\nconst NULL_INJECTOR$1 = {\n    get: ɵ0$7\n};\n/**\n * Bootstraps a Component into an existing host element and returns an instance\n * of the component.\n *\n * Use this function to bootstrap a component into the DOM tree. Each invocation\n * of this function will create a separate tree of components, injectors and\n * change detection cycles and lifetimes. To dynamically insert a new component\n * into an existing tree such that it shares the same injection, change detection\n * and object lifetime, use {@link ViewContainer#createComponent}.\n *\n * @param componentType Component to bootstrap\n * @param options Optional parameters which control bootstrapping\n */\nfunction renderComponent$1(componentType /* Type as workaround for: Microsoft/TypeScript/issues/4881 */, opts = {}) {\n    ngDevMode && publishDefaultGlobalUtils();\n    ngDevMode && assertComponentType(componentType);\n    const rendererFactory = opts.rendererFactory || domRendererFactory3;\n    const sanitizer = opts.sanitizer || null;\n    const componentDef = getComponentDef(componentType);\n    if (componentDef.type != componentType)\n        componentDef.type = componentType;\n    // The first index of the first selector is the tag name.\n    const componentTag = componentDef.selectors[0][0];\n    const hostRenderer = rendererFactory.createRenderer(null, null);\n    const hostRNode = locateHostElement(hostRenderer, opts.host || componentTag, componentDef.encapsulation);\n    const rootFlags = componentDef.onPush ? 64 /* Dirty */ | 512 /* IsRoot */ :\n        16 /* CheckAlways */ | 512 /* IsRoot */;\n    const rootContext = createRootContext(opts.scheduler, opts.playerHandler);\n    const renderer = rendererFactory.createRenderer(hostRNode, componentDef);\n    const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null);\n    const rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null);\n    enterView(rootView);\n    let component;\n    try {\n        if (rendererFactory.begin)\n            rendererFactory.begin();\n        const componentView = createRootComponentView(hostRNode, componentDef, rootView, rendererFactory, renderer, sanitizer);\n        component = createRootComponent(componentView, componentDef, rootView, rootContext, opts.hostFeatures || null);\n        // create mode pass\n        renderView(rootTView, rootView, null);\n        // update mode pass\n        refreshView(rootTView, rootView, null, null);\n    }\n    finally {\n        leaveView();\n        if (rendererFactory.end)\n            rendererFactory.end();\n    }\n    return component;\n}\n/**\n * Creates the root component view and the root component node.\n *\n * @param rNode Render host element.\n * @param def ComponentDef\n * @param rootView The parent view where the host node is stored\n * @param rendererFactory Factory to be used for creating child renderers.\n * @param hostRenderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\nfunction createRootComponentView(rNode, def, rootView, rendererFactory, hostRenderer, sanitizer) {\n    const tView = rootView[TVIEW];\n    const index = HEADER_OFFSET;\n    ngDevMode && assertIndexInRange(rootView, index);\n    rootView[index] = rNode;\n    // '#host' is added here as we don't know the real host DOM name (we don't want to read it) and at\n    // the same time we want to communicate the debug `TNode` that this is a special `TNode`\n    // representing a host element.\n    const tNode = getOrCreateTNode(tView, index, 2 /* Element */, '#host', null);\n    const mergedAttrs = tNode.mergedAttrs = def.hostAttrs;\n    if (mergedAttrs !== null) {\n        computeStaticStyling(tNode, mergedAttrs, true);\n        if (rNode !== null) {\n            setUpAttributes(hostRenderer, rNode, mergedAttrs);\n            if (tNode.classes !== null) {\n                writeDirectClass(hostRenderer, rNode, tNode.classes);\n            }\n            if (tNode.styles !== null) {\n                writeDirectStyle(hostRenderer, rNode, tNode.styles);\n            }\n        }\n    }\n    const viewRenderer = rendererFactory.createRenderer(rNode, def);\n    const componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, null);\n    if (tView.firstCreatePass) {\n        diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type);\n        markAsComponentHost(tView, tNode);\n        initTNodeFlags(tNode, rootView.length, 1);\n    }\n    addToViewTree(rootView, componentView);\n    // Store component view at node index, with node as the HOST\n    return rootView[index] = componentView;\n}\n/**\n * Creates a root component and sets it up with features and host bindings. Shared by\n * renderComponent() and ViewContainerRef.createComponent().\n */\nfunction createRootComponent(componentView, componentDef, rootLView, rootContext, hostFeatures) {\n    const tView = rootLView[TVIEW];\n    // Create directive instance with factory() and store at next index in viewData\n    const component = instantiateRootComponent(tView, rootLView, componentDef);\n    rootContext.components.push(component);\n    componentView[CONTEXT] = component;\n    hostFeatures && hostFeatures.forEach((feature) => feature(component, componentDef));\n    // We want to generate an empty QueryList for root content queries for backwards\n    // compatibility with ViewEngine.\n    if (componentDef.contentQueries) {\n        const tNode = getCurrentTNode();\n        ngDevMode && assertDefined(tNode, 'TNode expected');\n        componentDef.contentQueries(1 /* Create */, component, tNode.directiveStart);\n    }\n    const rootTNode = getCurrentTNode();\n    ngDevMode && assertDefined(rootTNode, 'tNode should have been already created');\n    if (tView.firstCreatePass &&\n        (componentDef.hostBindings !== null || componentDef.hostAttrs !== null)) {\n        setSelectedIndex(rootTNode.index);\n        const rootTView = rootLView[TVIEW];\n        registerHostBindingOpCodes(rootTView, rootTNode, rootLView, rootTNode.directiveStart, rootTNode.directiveEnd, componentDef);\n        invokeHostBindingsInCreationMode(componentDef, component);\n    }\n    return component;\n}\nfunction createRootContext(scheduler, playerHandler) {\n    return {\n        components: [],\n        scheduler: scheduler || defaultScheduler,\n        clean: CLEAN_PROMISE,\n        playerHandler: playerHandler || null,\n        flags: 0 /* Empty */\n    };\n}\n/**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});\n * ```\n */\nfunction LifecycleHooksFeature(component, def) {\n    const lView = readPatchedLView(component);\n    ngDevMode && assertDefined(lView, 'LView is required');\n    const tView = lView[TVIEW];\n    const tNode = getCurrentTNode();\n    ngDevMode && assertDefined(tNode, 'TNode is required');\n    registerPostOrderHooks(tView, tNode);\n}\n/**\n * Wait on component until it is rendered.\n *\n * This function returns a `Promise` which is resolved when the component's\n * change detection is executed. This is determined by finding the scheduler\n * associated with the `component`'s render tree and waiting until the scheduler\n * flushes. If nothing is scheduled, the function returns a resolved promise.\n *\n * Example:\n * ```\n * await whenRendered(myComponent);\n * ```\n *\n * @param component Component to wait upon\n * @returns Promise which resolves when the component is rendered.\n */\nfunction whenRendered(component) {\n    return getRootContext(component).clean;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getSuperType(type) {\n    return Object.getPrototypeOf(type.prototype).constructor;\n}\n/**\n * Merges the definition from a super class to a sub class.\n * @param definition The definition that is a SubClass of another directive of component\n *\n * @codeGenApi\n */\nfunction ɵɵInheritDefinitionFeature(definition) {\n    let superType = getSuperType(definition.type);\n    let shouldInheritFields = true;\n    const inheritanceChain = [definition];\n    while (superType) {\n        let superDef = undefined;\n        if (isComponentDef(definition)) {\n            // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n            superDef = superType.ɵcmp || superType.ɵdir;\n        }\n        else {\n            if (superType.ɵcmp) {\n                throw new Error('Directives cannot inherit Components');\n            }\n            // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n            superDef = superType.ɵdir;\n        }\n        if (superDef) {\n            if (shouldInheritFields) {\n                inheritanceChain.push(superDef);\n                // Some fields in the definition may be empty, if there were no values to put in them that\n                // would've justified object creation. Unwrap them if necessary.\n                const writeableDef = definition;\n                writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n                writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n                writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\n                // Merge hostBindings\n                const superHostBindings = superDef.hostBindings;\n                superHostBindings && inheritHostBindings(definition, superHostBindings);\n                // Merge queries\n                const superViewQuery = superDef.viewQuery;\n                const superContentQueries = superDef.contentQueries;\n                superViewQuery && inheritViewQuery(definition, superViewQuery);\n                superContentQueries && inheritContentQueries(definition, superContentQueries);\n                // Merge inputs and outputs\n                fillProperties(definition.inputs, superDef.inputs);\n                fillProperties(definition.declaredInputs, superDef.declaredInputs);\n                fillProperties(definition.outputs, superDef.outputs);\n                // Merge animations metadata.\n                // If `superDef` is a Component, the `data` field is present (defaults to an empty object).\n                if (isComponentDef(superDef) && superDef.data.animation) {\n                    // If super def is a Component, the `definition` is also a Component, since Directives can\n                    // not inherit Components (we throw an error above and cannot reach this code).\n                    const defData = definition.data;\n                    defData.animation = (defData.animation || []).concat(superDef.data.animation);\n                }\n            }\n            // Run parent features\n            const features = superDef.features;\n            if (features) {\n                for (let i = 0; i < features.length; i++) {\n                    const feature = features[i];\n                    if (feature && feature.ngInherit) {\n                        feature(definition);\n                    }\n                    // If `InheritDefinitionFeature` is a part of the current `superDef`, it means that this\n                    // def already has all the necessary information inherited from its super class(es), so we\n                    // can stop merging fields from super classes. However we need to iterate through the\n                    // prototype chain to look for classes that might contain other \"features\" (like\n                    // NgOnChanges), which we should invoke for the original `definition`. We set the\n                    // `shouldInheritFields` flag to indicate that, essentially skipping fields inheritance\n                    // logic and only invoking functions from the \"features\" list.\n                    if (feature === ɵɵInheritDefinitionFeature) {\n                        shouldInheritFields = false;\n                    }\n                }\n            }\n        }\n        superType = Object.getPrototypeOf(superType);\n    }\n    mergeHostAttrsAcrossInheritance(inheritanceChain);\n}\n/**\n * Merge the `hostAttrs` and `hostVars` from the inherited parent to the base class.\n *\n * @param inheritanceChain A list of `WritableDefs` starting at the top most type and listing\n * sub-types in order. For each type take the `hostAttrs` and `hostVars` and merge it with the child\n * type.\n */\nfunction mergeHostAttrsAcrossInheritance(inheritanceChain) {\n    let hostVars = 0;\n    let hostAttrs = null;\n    // We process the inheritance order from the base to the leaves here.\n    for (let i = inheritanceChain.length - 1; i >= 0; i--) {\n        const def = inheritanceChain[i];\n        // For each `hostVars`, we need to add the superclass amount.\n        def.hostVars = (hostVars += def.hostVars);\n        // for each `hostAttrs` we need to merge it with superclass.\n        def.hostAttrs =\n            mergeHostAttrs(def.hostAttrs, hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs));\n    }\n}\nfunction maybeUnwrapEmpty(value) {\n    if (value === EMPTY_OBJ) {\n        return {};\n    }\n    else if (value === EMPTY_ARRAY) {\n        return [];\n    }\n    else {\n        return value;\n    }\n}\nfunction inheritViewQuery(definition, superViewQuery) {\n    const prevViewQuery = definition.viewQuery;\n    if (prevViewQuery) {\n        definition.viewQuery = (rf, ctx) => {\n            superViewQuery(rf, ctx);\n            prevViewQuery(rf, ctx);\n        };\n    }\n    else {\n        definition.viewQuery = superViewQuery;\n    }\n}\nfunction inheritContentQueries(definition, superContentQueries) {\n    const prevContentQueries = definition.contentQueries;\n    if (prevContentQueries) {\n        definition.contentQueries = (rf, ctx, directiveIndex) => {\n            superContentQueries(rf, ctx, directiveIndex);\n            prevContentQueries(rf, ctx, directiveIndex);\n        };\n    }\n    else {\n        definition.contentQueries = superContentQueries;\n    }\n}\nfunction inheritHostBindings(definition, superHostBindings) {\n    const prevHostBindings = definition.hostBindings;\n    if (prevHostBindings) {\n        definition.hostBindings = (rf, ctx) => {\n            superHostBindings(rf, ctx);\n            prevHostBindings(rf, ctx);\n        };\n    }\n    else {\n        definition.hostBindings = superHostBindings;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Fields which exist on either directive or component definitions, and need to be copied from\n * parent to child classes by the `ɵɵCopyDefinitionFeature`.\n */\nconst COPY_DIRECTIVE_FIELDS = [\n    // The child class should use the providers of its parent.\n    'providersResolver',\n    // Not listed here are any fields which are handled by the `ɵɵInheritDefinitionFeature`, such\n    // as inputs, outputs, and host binding functions.\n];\n/**\n * Fields which exist only on component definitions, and need to be copied from parent to child\n * classes by the `ɵɵCopyDefinitionFeature`.\n *\n * The type here allows any field of `ComponentDef` which is not also a property of `DirectiveDef`,\n * since those should go in `COPY_DIRECTIVE_FIELDS` above.\n */\nconst COPY_COMPONENT_FIELDS = [\n    // The child class should use the template function of its parent, including all template\n    // semantics.\n    'template',\n    'decls',\n    'consts',\n    'vars',\n    'onPush',\n    'ngContentSelectors',\n    // The child class should use the CSS styles of its parent, including all styling semantics.\n    'styles',\n    'encapsulation',\n    // The child class should be checked by the runtime in the same way as its parent.\n    'schemas',\n];\n/**\n * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a\n * definition.\n *\n * This exists primarily to support ngcc migration of an existing View Engine pattern, where an\n * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it\n * generates a skeleton definition on the child class, and applies this feature.\n *\n * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,\n * including things like the component template function.\n *\n * @param definition The definition of a child class which inherits from a parent class with its\n * own definition.\n *\n * @codeGenApi\n */\nfunction ɵɵCopyDefinitionFeature(definition) {\n    let superType = getSuperType(definition.type);\n    let superDef = undefined;\n    if (isComponentDef(definition)) {\n        // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n        superDef = superType.ɵcmp;\n    }\n    else {\n        // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n        superDef = superType.ɵdir;\n    }\n    // Needed because `definition` fields are readonly.\n    const defAny = definition;\n    // Copy over any fields that apply to either directives or components.\n    for (const field of COPY_DIRECTIVE_FIELDS) {\n        defAny[field] = superDef[field];\n    }\n    if (isComponentDef(superDef)) {\n        // Copy over any component-specific fields.\n        for (const field of COPY_COMPONENT_FIELDS) {\n            defAny[field] = superDef[field];\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet _symbolIterator = null;\nfunction getSymbolIterator() {\n    if (!_symbolIterator) {\n        const Symbol = _global['Symbol'];\n        if (Symbol && Symbol.iterator) {\n            _symbolIterator = Symbol.iterator;\n        }\n        else {\n            // es6-shim specific logic\n            const keys = Object.getOwnPropertyNames(Map.prototype);\n            for (let i = 0; i < keys.length; ++i) {\n                const key = keys[i];\n                if (key !== 'entries' && key !== 'size' &&\n                    Map.prototype[key] === Map.prototype['entries']) {\n                    _symbolIterator = key;\n                }\n            }\n        }\n    }\n    return _symbolIterator;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction devModeEqual(a, b) {\n    const isListLikeIterableA = isListLikeIterable(a);\n    const isListLikeIterableB = isListLikeIterable(b);\n    if (isListLikeIterableA && isListLikeIterableB) {\n        return areIterablesEqual(a, b, devModeEqual);\n    }\n    else {\n        const isAObject = a && (typeof a === 'object' || typeof a === 'function');\n        const isBObject = b && (typeof b === 'object' || typeof b === 'function');\n        if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n            return true;\n        }\n        else {\n            return Object.is(a, b);\n        }\n    }\n}\n/**\n * Indicates that the result of a {@link Pipe} transformation has changed even though the\n * reference has not changed.\n *\n * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value\n * is stored.\n *\n * Example:\n *\n * ```\n * if (this._latestValue === this._latestReturnedValue) {\n *    return this._latestReturnedValue;\n *  } else {\n *    this._latestReturnedValue = this._latestValue;\n *    return WrappedValue.wrap(this._latestValue); // this will force update\n *  }\n * ```\n *\n * @publicApi\n * @deprecated from v10 stop using. (No replacement, deemed unnecessary.)\n */\nclass WrappedValue {\n    constructor(value) {\n        this.wrapped = value;\n    }\n    /** Creates a wrapped value. */\n    static wrap(value) {\n        return new WrappedValue(value);\n    }\n    /**\n     * Returns the underlying value of a wrapped value.\n     * Returns the given `value` when it is not wrapped.\n     **/\n    static unwrap(value) {\n        return WrappedValue.isWrapped(value) ? value.wrapped : value;\n    }\n    /** Returns true if `value` is a wrapped value. */\n    static isWrapped(value) {\n        return value instanceof WrappedValue;\n    }\n}\nfunction isListLikeIterable(obj) {\n    if (!isJsObject(obj))\n        return false;\n    return Array.isArray(obj) ||\n        (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n            getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop\n}\nfunction areIterablesEqual(a, b, comparator) {\n    const iterator1 = a[getSymbolIterator()]();\n    const iterator2 = b[getSymbolIterator()]();\n    while (true) {\n        const item1 = iterator1.next();\n        const item2 = iterator2.next();\n        if (item1.done && item2.done)\n            return true;\n        if (item1.done || item2.done)\n            return false;\n        if (!comparator(item1.value, item2.value))\n            return false;\n    }\n}\nfunction iterateListLike(obj, fn) {\n    if (Array.isArray(obj)) {\n        for (let i = 0; i < obj.length; i++) {\n            fn(obj[i]);\n        }\n    }\n    else {\n        const iterator = obj[getSymbolIterator()]();\n        let item;\n        while (!((item = iterator.next()).done)) {\n            fn(item.value);\n        }\n    }\n}\nfunction isJsObject(o) {\n    return o !== null && (typeof o === 'function' || typeof o === 'object');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// TODO(misko): consider inlining\n/** Updates binding and returns the value. */\nfunction updateBinding(lView, bindingIndex, value) {\n    return lView[bindingIndex] = value;\n}\n/** Gets the current binding value. */\nfunction getBinding(lView, bindingIndex) {\n    ngDevMode && assertIndexInRange(lView, bindingIndex);\n    ngDevMode &&\n        assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n    return lView[bindingIndex];\n}\n/**\n * Updates binding if changed, then returns whether it was updated.\n *\n * This function also checks the `CheckNoChangesMode` and throws if changes are made.\n * Some changes (Objects/iterables) during `CheckNoChangesMode` are exempt to comply with VE\n * behavior.\n *\n * @param lView current `LView`\n * @param bindingIndex The binding in the `LView` to check\n * @param value New value to check against `lView[bindingIndex]`\n * @returns `true` if the bindings has changed. (Throws if binding has changed during\n *          `CheckNoChangesMode`)\n */\nfunction bindingUpdated(lView, bindingIndex, value) {\n    ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n    ngDevMode &&\n        assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`);\n    const oldValue = lView[bindingIndex];\n    if (Object.is(oldValue, value)) {\n        return false;\n    }\n    else {\n        if (ngDevMode && isInCheckNoChangesMode()) {\n            // View engine didn't report undefined values as changed on the first checkNoChanges pass\n            // (before the change detection was run).\n            const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n            if (!devModeEqual(oldValueToCompare, value)) {\n                const details = getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value);\n                throwErrorIfNoChangesMode(oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName);\n            }\n            // There was a change, but the `devModeEqual` decided that the change is exempt from an error.\n            // For this reason we exit as if no change. The early exit is needed to prevent the changed\n            // value to be written into `LView` (If we would write the new value that we would not see it\n            // as change on next CD.)\n            return false;\n        }\n        lView[bindingIndex] = value;\n        return true;\n    }\n}\n/** Updates 2 bindings if changed, then returns whether either was updated. */\nfunction bindingUpdated2(lView, bindingIndex, exp1, exp2) {\n    const different = bindingUpdated(lView, bindingIndex, exp1);\n    return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n}\n/** Updates 3 bindings if changed, then returns whether any was updated. */\nfunction bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) {\n    const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n    return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n}\n/** Updates 4 bindings if changed, then returns whether any was updated. */\nfunction bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) {\n    const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n    return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Updates the value of or removes a bound attribute on an Element.\n *\n * Used in the case of `[attr.title]=\"value\"`\n *\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n *                  Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n * @param namespace Optional namespace to use when setting the attribute.\n *\n * @codeGenApi\n */\nfunction ɵɵattribute(name, value, sanitizer, namespace) {\n    const lView = getLView();\n    const bindingIndex = nextBindingIndex();\n    if (bindingUpdated(lView, bindingIndex, value)) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace);\n        ngDevMode && storePropertyBindingMetadata(tView.data, tNode, 'attr.' + name, bindingIndex);\n    }\n    return ɵɵattribute;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Create interpolation bindings with a variable number of expressions.\n *\n * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.\n * Those are faster because there is no need to create an array of expressions and iterate over it.\n *\n * `values`:\n * - has static text at even indexes,\n * - has evaluated expressions at odd indexes.\n *\n * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nfunction interpolationV(lView, values) {\n    ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');\n    ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');\n    let isBindingUpdated = false;\n    let bindingIndex = getBindingIndex();\n    for (let i = 1; i < values.length; i += 2) {\n        // Check if bindings (odd indexes) have changed\n        isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated;\n    }\n    setBindingIndex(bindingIndex);\n    if (!isBindingUpdated) {\n        return NO_CHANGE;\n    }\n    // Build the updated content\n    let content = values[0];\n    for (let i = 1; i < values.length; i += 2) {\n        content += renderStringify(values[i]) + values[i + 1];\n    }\n    return content;\n}\n/**\n * Creates an interpolation binding with 1 expression.\n *\n * @param prefix static value used for concatenation only.\n * @param v0 value checked for change.\n * @param suffix static value used for concatenation only.\n */\nfunction interpolation1(lView, prefix, v0, suffix) {\n    const different = bindingUpdated(lView, nextBindingIndex(), v0);\n    return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 2 expressions.\n */\nfunction interpolation2(lView, prefix, v0, i0, v1, suffix) {\n    const bindingIndex = getBindingIndex();\n    const different = bindingUpdated2(lView, bindingIndex, v0, v1);\n    incrementBindingIndex(2);\n    return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 3 expressions.\n */\nfunction interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix) {\n    const bindingIndex = getBindingIndex();\n    const different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n    incrementBindingIndex(3);\n    return different ?\n        prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix :\n        NO_CHANGE;\n}\n/**\n * Create an interpolation binding with 4 expressions.\n */\nfunction interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n    const bindingIndex = getBindingIndex();\n    const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n    incrementBindingIndex(4);\n    return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n        renderStringify(v2) + i2 + renderStringify(v3) + suffix :\n        NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 5 expressions.\n */\nfunction interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n    const bindingIndex = getBindingIndex();\n    let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n    different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n    incrementBindingIndex(5);\n    return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n        renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + suffix :\n        NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 6 expressions.\n */\nfunction interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n    const bindingIndex = getBindingIndex();\n    let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n    different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n    incrementBindingIndex(6);\n    return different ?\n        prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n            renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix :\n        NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 7 expressions.\n */\nfunction interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n    const bindingIndex = getBindingIndex();\n    let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n    different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n    incrementBindingIndex(7);\n    return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n        renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n        renderStringify(v5) + i5 + renderStringify(v6) + suffix :\n        NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 8 expressions.\n */\nfunction interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n    const bindingIndex = getBindingIndex();\n    let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n    different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n    incrementBindingIndex(8);\n    return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n        renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n        renderStringify(v5) + i5 + renderStringify(v6) + i6 + renderStringify(v7) + suffix :\n        NO_CHANGE;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate1(attrName, prefix, v0, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 1, prefix, suffix);\n    }\n    return ɵɵattributeInterpolate1;\n}\n/**\n *\n * Update an interpolated attribute on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate2(attrName, prefix, v0, i0, v1, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 2, prefix, i0, suffix);\n    }\n    return ɵɵattributeInterpolate2;\n}\n/**\n *\n * Update an interpolated attribute on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate3(attrName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 3, prefix, i0, i1, suffix);\n    }\n    return ɵɵattributeInterpolate3;\n}\n/**\n *\n * Update an interpolated attribute on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate4(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\n    }\n    return ɵɵattributeInterpolate4;\n}\n/**\n *\n * Update an interpolated attribute on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate5(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\n    }\n    return ɵɵattributeInterpolate5;\n}\n/**\n *\n * Update an interpolated attribute on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate6(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate6(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\n    }\n    return ɵɵattributeInterpolate6;\n}\n/**\n *\n * Update an interpolated attribute on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate7(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate7(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);\n    }\n    return ɵɵattributeInterpolate7;\n}\n/**\n *\n * Update an interpolated attribute on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate8(\n *  'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate8(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);\n    }\n    return ɵɵattributeInterpolate8;\n}\n/**\n * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n *  title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolateV(\n *  'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *\n * @param attrName The name of the attribute to update.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolateV(attrName, values, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolated = interpolationV(lView, values);\n    if (interpolated !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolated, sanitizer, namespace);\n        if (ngDevMode) {\n            const interpolationInBetween = [values[0]]; // prefix\n            for (let i = 2; i < values.length; i += 2) {\n                interpolationInBetween.push(values[i]);\n            }\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween);\n        }\n    }\n    return ɵɵattributeInterpolateV;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) {\n    ngDevMode && assertFirstCreatePass(tView);\n    ngDevMode && ngDevMode.firstCreatePass++;\n    const tViewConsts = tView.consts;\n    // TODO(pk): refactor getOrCreateTNode to have the \"create\" only version\n    const tNode = getOrCreateTNode(tView, index, 4 /* Container */, tagName || null, getConstant(tViewConsts, attrsIndex));\n    resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n    registerPostOrderHooks(tView, tNode);\n    const embeddedTView = tNode.tViews = createTView(2 /* Embedded */, tNode, templateFn, decls, vars, tView.directiveRegistry, tView.pipeRegistry, null, tView.schemas, tViewConsts);\n    if (tView.queries !== null) {\n        tView.queries.template(tView, tNode);\n        embeddedTView.queries = tView.queries.embeddedTView(tNode);\n    }\n    return tNode;\n}\n/**\n * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.\n *\n * <ng-template #foo>\n *    <div></div>\n * </ng-template>\n *\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param decls The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrsIndex Index of template attributes in the `consts` array.\n * @param localRefs Index of the local references in the `consts` array.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n *        Defaults to the current element associated with the local-ref.\n *\n * @codeGenApi\n */\nfunction ɵɵtemplate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) {\n    const lView = getLView();\n    const tView = getTView();\n    const adjustedIndex = index + HEADER_OFFSET;\n    const tNode = tView.firstCreatePass ? templateFirstCreatePass(adjustedIndex, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) :\n        tView.data[adjustedIndex];\n    setCurrentTNode(tNode, false);\n    const comment = lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n    appendChild(tView, lView, comment, tNode);\n    attachPatchData(comment, lView);\n    addToViewTree(lView, lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode));\n    if (isDirectiveHost(tNode)) {\n        createDirectivesInstances(tView, lView, tNode);\n    }\n    if (localRefsIndex != null) {\n        saveResolvedLocalsInData(lView, tNode, localRefExtractor);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Store a value in the `data` at a given `index`. */\nfunction store(tView, lView, index, value) {\n    // We don't store any static data for local variables, so the first time\n    // we see the template, we should store as null to avoid a sparse array\n    if (index >= tView.data.length) {\n        tView.data[index] = null;\n        tView.blueprint[index] = null;\n    }\n    lView[index] = value;\n}\n/**\n * Retrieves a local reference from the current contextViewData.\n *\n * If the reference to retrieve is in a parent view, this instruction is used in conjunction\n * with a nextContext() call, which walks up the tree and updates the contextViewData instance.\n *\n * @param index The index of the local ref in contextViewData.\n *\n * @codeGenApi\n */\nfunction ɵɵreference(index) {\n    const contextLView = getContextLView();\n    return load(contextLView, HEADER_OFFSET + index);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nconst angularCoreDiEnv = {\n    'ɵɵdefineInjectable': ɵɵdefineInjectable,\n    'ɵɵdefineInjector': ɵɵdefineInjector,\n    'ɵɵinject': ɵɵinject,\n    'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n    'resolveForwardRef': resolveForwardRef,\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting\n * injectable def (`ɵprov`) onto the injectable type.\n */\nfunction compileInjectable(type, meta) {\n    let ngInjectableDef = null;\n    let ngFactoryDef = null;\n    // if NG_PROV_DEF is already defined on this class then don't overwrite it\n    if (!type.hasOwnProperty(NG_PROV_DEF)) {\n        Object.defineProperty(type, NG_PROV_DEF, {\n            get: () => {\n                if (ngInjectableDef === null) {\n                    const compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'injectable', type });\n                    ngInjectableDef = compiler.compileInjectable(angularCoreDiEnv, `ng:///${type.name}/ɵprov.js`, getInjectableMetadata(type, meta));\n                }\n                return ngInjectableDef;\n            },\n        });\n    }\n    // if NG_FACTORY_DEF is already defined on this class then don't overwrite it\n    if (!type.hasOwnProperty(NG_FACTORY_DEF)) {\n        Object.defineProperty(type, NG_FACTORY_DEF, {\n            get: () => {\n                if (ngFactoryDef === null) {\n                    const compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'injectable', type });\n                    ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ɵfac.js`, {\n                        name: type.name,\n                        type,\n                        typeArgumentCount: 0,\n                        deps: reflectDependencies(type),\n                        target: compiler.FactoryTarget.Injectable\n                    });\n                }\n                return ngFactoryDef;\n            },\n            // Leave this configurable so that the factories from directives or pipes can take precedence.\n            configurable: true\n        });\n    }\n}\nconst ɵ0$8 = getClosureSafeProperty;\nconst USE_VALUE$1 = getClosureSafeProperty({ provide: String, useValue: ɵ0$8 });\nfunction isUseClassProvider(meta) {\n    return meta.useClass !== undefined;\n}\nfunction isUseValueProvider(meta) {\n    return USE_VALUE$1 in meta;\n}\nfunction isUseFactoryProvider(meta) {\n    return meta.useFactory !== undefined;\n}\nfunction isUseExistingProvider(meta) {\n    return meta.useExisting !== undefined;\n}\nfunction getInjectableMetadata(type, srcMeta) {\n    // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n    const meta = srcMeta || { providedIn: null };\n    const compilerMeta = {\n        name: type.name,\n        type: type,\n        typeArgumentCount: 0,\n        providedIn: meta.providedIn,\n    };\n    if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n        compilerMeta.deps = convertDependencies(meta.deps);\n    }\n    // Check to see if the user explicitly provided a `useXxxx` property.\n    if (isUseClassProvider(meta)) {\n        compilerMeta.useClass = meta.useClass;\n    }\n    else if (isUseValueProvider(meta)) {\n        compilerMeta.useValue = meta.useValue;\n    }\n    else if (isUseFactoryProvider(meta)) {\n        compilerMeta.useFactory = meta.useFactory;\n    }\n    else if (isUseExistingProvider(meta)) {\n        compilerMeta.useExisting = meta.useExisting;\n    }\n    return compilerMeta;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0$9 = getClosureSafeProperty;\nconst USE_VALUE$2 = getClosureSafeProperty({ provide: String, useValue: ɵ0$9 });\nfunction convertInjectableProviderToFactory(type, provider) {\n    if (!provider) {\n        const reflectionCapabilities = new ReflectionCapabilities();\n        const deps = reflectionCapabilities.parameters(type);\n        // TODO - convert to flags.\n        return () => new type(...injectArgs(deps));\n    }\n    if (USE_VALUE$2 in provider) {\n        const valueProvider = provider;\n        return () => valueProvider.useValue;\n    }\n    else if (provider.useExisting) {\n        const existingProvider = provider;\n        return () => ɵɵinject(resolveForwardRef(existingProvider.useExisting));\n    }\n    else if (provider.useFactory) {\n        const factoryProvider = provider;\n        return () => factoryProvider.useFactory(...injectArgs(factoryProvider.deps || EMPTY_ARRAY));\n    }\n    else if (provider.useClass) {\n        const classProvider = provider;\n        let deps = provider.deps;\n        if (!deps) {\n            const reflectionCapabilities = new ReflectionCapabilities();\n            deps = reflectionCapabilities.parameters(type);\n        }\n        return () => new (resolveForwardRef(classProvider.useClass))(...injectArgs(deps));\n    }\n    else {\n        let deps = provider.deps;\n        if (!deps) {\n            const reflectionCapabilities = new ReflectionCapabilities();\n            deps = reflectionCapabilities.parameters(type);\n        }\n        return () => new type(...injectArgs(deps));\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0$a = (type, meta) => SWITCH_COMPILE_INJECTABLE(type, meta);\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Injectable = makeDecorator('Injectable', undefined, undefined, undefined, ɵ0$a);\n/**\n * Supports @Injectable() in JIT mode for Render2.\n */\nfunction render2CompileInjectable(injectableType, options) {\n    if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {\n        injectableType.ɵprov = ɵɵdefineInjectable({\n            token: injectableType,\n            providedIn: options.providedIn,\n            factory: convertInjectableProviderToFactory(injectableType, options),\n        });\n    }\n}\nconst SWITCH_COMPILE_INJECTABLE__POST_R3__ = compileInjectable;\nconst SWITCH_COMPILE_INJECTABLE__PRE_R3__ = render2CompileInjectable;\nconst SWITCH_COMPILE_INJECTABLE = SWITCH_COMPILE_INJECTABLE__POST_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction findFirstClosedCycle(keys) {\n    const res = [];\n    for (let i = 0; i < keys.length; ++i) {\n        if (res.indexOf(keys[i]) > -1) {\n            res.push(keys[i]);\n            return res;\n        }\n        res.push(keys[i]);\n    }\n    return res;\n}\nfunction constructResolvingPath(keys) {\n    if (keys.length > 1) {\n        const reversed = findFirstClosedCycle(keys.slice().reverse());\n        const tokenStrs = reversed.map(k => stringify(k.token));\n        return ' (' + tokenStrs.join(' -> ') + ')';\n    }\n    return '';\n}\nfunction injectionError(injector, key, constructResolvingMessage, originalError) {\n    const keys = [key];\n    const errMsg = constructResolvingMessage(keys);\n    const error = (originalError ? wrappedError(errMsg, originalError) : Error(errMsg));\n    error.addKey = addKey;\n    error.keys = keys;\n    error.injectors = [injector];\n    error.constructResolvingMessage = constructResolvingMessage;\n    error[ERROR_ORIGINAL_ERROR] = originalError;\n    return error;\n}\nfunction addKey(injector, key) {\n    this.injectors.push(injector);\n    this.keys.push(key);\n    // Note: This updated message won't be reflected in the `.stack` property\n    this.message = this.constructResolvingMessage(this.keys);\n}\n/**\n * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the\n * {@link Injector} does not have a {@link Provider} for the given key.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n *   constructor(b:B) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n */\nfunction noProviderError(injector, key) {\n    return injectionError(injector, key, function (keys) {\n        const first = stringify(keys[0].token);\n        return `No provider for ${first}!${constructResolvingPath(keys)}`;\n    });\n}\n/**\n * Thrown when dependencies form a cycle.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * var injector = Injector.resolveAndCreate([\n *   {provide: \"one\", useFactory: (two) => \"two\", deps: [[new Inject(\"two\")]]},\n *   {provide: \"two\", useFactory: (one) => \"one\", deps: [[new Inject(\"one\")]]}\n * ]);\n *\n * expect(() => injector.get(\"one\")).toThrowError();\n * ```\n *\n * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.\n */\nfunction cyclicDependencyError(injector, key) {\n    return injectionError(injector, key, function (keys) {\n        return `Cannot instantiate cyclic dependency!${constructResolvingPath(keys)}`;\n    });\n}\n/**\n * Thrown when a constructing type returns with an Error.\n *\n * The `InstantiationError` class contains the original error plus the dependency graph which caused\n * this object to be instantiated.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n *   constructor() {\n *     throw new Error('message');\n *   }\n * }\n *\n * var injector = Injector.resolveAndCreate([A]);\n\n * try {\n *   injector.get(A);\n * } catch (e) {\n *   expect(e instanceof InstantiationError).toBe(true);\n *   expect(e.originalException.message).toEqual(\"message\");\n *   expect(e.originalStack).toBeDefined();\n * }\n * ```\n */\nfunction instantiationError(injector, originalException, originalStack, key) {\n    return injectionError(injector, key, function (keys) {\n        const first = stringify(keys[0].token);\n        return `${originalException.message}: Error during instantiation of ${first}!${constructResolvingPath(keys)}.`;\n    }, originalException);\n}\n/**\n * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}\n * creation.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\"not a type\"])).toThrowError();\n * ```\n */\nfunction invalidProviderError(provider) {\n    return Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${provider}`);\n}\n/**\n * Thrown when the class has no annotation information.\n *\n * Lack of annotation information prevents the {@link Injector} from determining which dependencies\n * need to be injected into the constructor.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n *   constructor(b) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n *\n * This error is also thrown when the class not marked with {@link Injectable} has parameter types.\n *\n * ```typescript\n * class B {}\n *\n * class A {\n *   constructor(b:B) {} // no information about the parameter types of A is available at runtime.\n * }\n *\n * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();\n * ```\n *\n */\nfunction noAnnotationError(typeOrFunc, params) {\n    const signature = [];\n    for (let i = 0, ii = params.length; i < ii; i++) {\n        const parameter = params[i];\n        if (!parameter || parameter.length == 0) {\n            signature.push('?');\n        }\n        else {\n            signature.push(parameter.map(stringify).join(' '));\n        }\n    }\n    return Error('Cannot resolve all parameters for \\'' + stringify(typeOrFunc) + '\\'(' +\n        signature.join(', ') + '). ' +\n        'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \\'' +\n        stringify(typeOrFunc) + '\\' is decorated with Injectable.');\n}\n/**\n * Thrown when getting an object by index.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {}\n *\n * var injector = Injector.resolveAndCreate([A]);\n *\n * expect(() => injector.getAt(100)).toThrowError();\n * ```\n *\n */\nfunction outOfBoundsError(index) {\n    return Error(`Index ${index} is out-of-bounds.`);\n}\n// TODO: add a working example after alpha38 is released\n/**\n * Thrown when a multi provider and a regular provider are bound to the same token.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\n *   { provide: \"Strings\", useValue: \"string1\", multi: true},\n *   { provide: \"Strings\", useValue: \"string2\", multi: false}\n * ])).toThrowError();\n * ```\n */\nfunction mixingMultiProvidersWithRegularProvidersError(provider1, provider2) {\n    return Error(`Cannot mix multi providers and regular providers, got: ${provider1} ${provider2}`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A unique object used for retrieving items from the {@link ReflectiveInjector}.\n *\n * Keys have:\n * - a system-wide unique `id`.\n * - a `token`.\n *\n * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows\n * the\n * injector to store created objects in a more efficient way.\n *\n * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when\n * resolving\n * providers.\n *\n * @deprecated No replacement\n * @publicApi\n */\nclass ReflectiveKey {\n    /**\n     * Private\n     */\n    constructor(token, id) {\n        this.token = token;\n        this.id = id;\n        if (!token) {\n            throw new Error('Token must be defined!');\n        }\n        this.displayName = stringify(this.token);\n    }\n    /**\n     * Retrieves a `Key` for a token.\n     */\n    static get(token) {\n        return _globalKeyRegistry.get(resolveForwardRef(token));\n    }\n    /**\n     * @returns the number of keys registered in the system.\n     */\n    static get numberOfKeys() {\n        return _globalKeyRegistry.numberOfKeys;\n    }\n}\nclass KeyRegistry {\n    constructor() {\n        this._allKeys = new Map();\n    }\n    get(token) {\n        if (token instanceof ReflectiveKey)\n            return token;\n        if (this._allKeys.has(token)) {\n            return this._allKeys.get(token);\n        }\n        const newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);\n        this._allKeys.set(token, newKey);\n        return newKey;\n    }\n    get numberOfKeys() {\n        return this._allKeys.size;\n    }\n}\nconst _globalKeyRegistry = new KeyRegistry();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provides access to reflection data about symbols. Used internally by Angular\n * to power dependency injection and compilation.\n */\nclass Reflector {\n    constructor(reflectionCapabilities) {\n        this.reflectionCapabilities = reflectionCapabilities;\n    }\n    updateCapabilities(caps) {\n        this.reflectionCapabilities = caps;\n    }\n    factory(type) {\n        return this.reflectionCapabilities.factory(type);\n    }\n    parameters(typeOrFunc) {\n        return this.reflectionCapabilities.parameters(typeOrFunc);\n    }\n    annotations(typeOrFunc) {\n        return this.reflectionCapabilities.annotations(typeOrFunc);\n    }\n    propMetadata(typeOrFunc) {\n        return this.reflectionCapabilities.propMetadata(typeOrFunc);\n    }\n    hasLifecycleHook(type, lcProperty) {\n        return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);\n    }\n    getter(name) {\n        return this.reflectionCapabilities.getter(name);\n    }\n    setter(name) {\n        return this.reflectionCapabilities.setter(name);\n    }\n    method(name) {\n        return this.reflectionCapabilities.method(name);\n    }\n    importUri(type) {\n        return this.reflectionCapabilities.importUri(type);\n    }\n    resourceUri(type) {\n        return this.reflectionCapabilities.resourceUri(type);\n    }\n    resolveIdentifier(name, moduleUrl, members, runtime) {\n        return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);\n    }\n    resolveEnum(identifier, name) {\n        return this.reflectionCapabilities.resolveEnum(identifier, name);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The {@link Reflector} used internally in Angular to access metadata\n * about symbols.\n */\nconst reflector = new Reflector(new ReflectionCapabilities());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * `Dependency` is used by the framework to extend DI.\n * This is internal to Angular and should not be used directly.\n */\nclass ReflectiveDependency {\n    constructor(key, optional, visibility) {\n        this.key = key;\n        this.optional = optional;\n        this.visibility = visibility;\n    }\n    static fromKey(key) {\n        return new ReflectiveDependency(key, false, null);\n    }\n}\nconst _EMPTY_LIST = [];\nclass ResolvedReflectiveProvider_ {\n    constructor(key, resolvedFactories, multiProvider) {\n        this.key = key;\n        this.resolvedFactories = resolvedFactories;\n        this.multiProvider = multiProvider;\n        this.resolvedFactory = this.resolvedFactories[0];\n    }\n}\n/**\n * An internal resolved representation of a factory function created by resolving `Provider`.\n * @publicApi\n */\nclass ResolvedReflectiveFactory {\n    constructor(\n    /**\n     * Factory function which can return an instance of an object represented by a key.\n     */\n    factory, \n    /**\n     * Arguments (dependencies) to the `factory` function.\n     */\n    dependencies) {\n        this.factory = factory;\n        this.dependencies = dependencies;\n    }\n}\n/**\n * Resolve a single provider.\n */\nfunction resolveReflectiveFactory(provider) {\n    let factoryFn;\n    let resolvedDeps;\n    if (provider.useClass) {\n        const useClass = resolveForwardRef(provider.useClass);\n        factoryFn = reflector.factory(useClass);\n        resolvedDeps = _dependenciesFor(useClass);\n    }\n    else if (provider.useExisting) {\n        factoryFn = (aliasInstance) => aliasInstance;\n        resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];\n    }\n    else if (provider.useFactory) {\n        factoryFn = provider.useFactory;\n        resolvedDeps = constructDependencies(provider.useFactory, provider.deps);\n    }\n    else {\n        factoryFn = () => provider.useValue;\n        resolvedDeps = _EMPTY_LIST;\n    }\n    return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);\n}\n/**\n * Converts the `Provider` into `ResolvedProvider`.\n *\n * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider\n * syntax.\n */\nfunction resolveReflectiveProvider(provider) {\n    return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}\n/**\n * Resolve a list of Providers.\n */\nfunction resolveReflectiveProviders(providers) {\n    const normalized = _normalizeProviders(providers, []);\n    const resolved = normalized.map(resolveReflectiveProvider);\n    const resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n    return Array.from(resolvedProviderMap.values());\n}\n/**\n * Merges a list of ResolvedProviders into a list where each key is contained exactly once and\n * multi providers have been merged.\n */\nfunction mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n    for (let i = 0; i < providers.length; i++) {\n        const provider = providers[i];\n        const existing = normalizedProvidersMap.get(provider.key.id);\n        if (existing) {\n            if (provider.multiProvider !== existing.multiProvider) {\n                throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n            }\n            if (provider.multiProvider) {\n                for (let j = 0; j < provider.resolvedFactories.length; j++) {\n                    existing.resolvedFactories.push(provider.resolvedFactories[j]);\n                }\n            }\n            else {\n                normalizedProvidersMap.set(provider.key.id, provider);\n            }\n        }\n        else {\n            let resolvedProvider;\n            if (provider.multiProvider) {\n                resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n            }\n            else {\n                resolvedProvider = provider;\n            }\n            normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n        }\n    }\n    return normalizedProvidersMap;\n}\nfunction _normalizeProviders(providers, res) {\n    providers.forEach(b => {\n        if (b instanceof Type) {\n            res.push({ provide: b, useClass: b });\n        }\n        else if (b && typeof b == 'object' && b.provide !== undefined) {\n            res.push(b);\n        }\n        else if (Array.isArray(b)) {\n            _normalizeProviders(b, res);\n        }\n        else {\n            throw invalidProviderError(b);\n        }\n    });\n    return res;\n}\nfunction constructDependencies(typeOrFunc, dependencies) {\n    if (!dependencies) {\n        return _dependenciesFor(typeOrFunc);\n    }\n    else {\n        const params = dependencies.map(t => [t]);\n        return dependencies.map(t => _extractToken(typeOrFunc, t, params));\n    }\n}\nfunction _dependenciesFor(typeOrFunc) {\n    const params = reflector.parameters(typeOrFunc);\n    if (!params)\n        return [];\n    if (params.some(p => p == null)) {\n        throw noAnnotationError(typeOrFunc, params);\n    }\n    return params.map(p => _extractToken(typeOrFunc, p, params));\n}\nfunction _extractToken(typeOrFunc, metadata, params) {\n    let token = null;\n    let optional = false;\n    if (!Array.isArray(metadata)) {\n        if (metadata instanceof Inject) {\n            return _createDependency(metadata.token, optional, null);\n        }\n        else {\n            return _createDependency(metadata, optional, null);\n        }\n    }\n    let visibility = null;\n    for (let i = 0; i < metadata.length; ++i) {\n        const paramMetadata = metadata[i];\n        if (paramMetadata instanceof Type) {\n            token = paramMetadata;\n        }\n        else if (paramMetadata instanceof Inject) {\n            token = paramMetadata.token;\n        }\n        else if (paramMetadata instanceof Optional) {\n            optional = true;\n        }\n        else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {\n            visibility = paramMetadata;\n        }\n        else if (paramMetadata instanceof InjectionToken) {\n            token = paramMetadata;\n        }\n    }\n    token = resolveForwardRef(token);\n    if (token != null) {\n        return _createDependency(token, optional, visibility);\n    }\n    else {\n        throw noAnnotationError(typeOrFunc, params);\n    }\n}\nfunction _createDependency(token, optional, visibility) {\n    return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Threshold for the dynamic version\nconst UNDEFINED = {};\n/**\n * A ReflectiveDependency injection container used for instantiating objects and resolving\n * dependencies.\n *\n * An `Injector` is a replacement for a `new` operator, which can automatically resolve the\n * constructor dependencies.\n *\n * In typical use, application code asks for the dependencies in the constructor and they are\n * resolved by the `Injector`.\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates an `Injector` configured to create `Engine` and `Car`.\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n *   constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * var car = injector.get(Car);\n * expect(car instanceof Car).toBe(true);\n * expect(car.engine instanceof Engine).toBe(true);\n * ```\n *\n * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`\n * resolve all of the object's dependencies automatically.\n *\n * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.\n * @publicApi\n */\nclass ReflectiveInjector {\n    /**\n     * Turns an array of provider definitions into an array of resolved providers.\n     *\n     * A resolution is a process of flattening multiple nested arrays and converting individual\n     * providers into an array of `ResolvedReflectiveProvider`s.\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * ```typescript\n     * @Injectable()\n     * class Engine {\n     * }\n     *\n     * @Injectable()\n     * class Car {\n     *   constructor(public engine:Engine) {}\n     * }\n     *\n     * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n     *\n     * expect(providers.length).toEqual(2);\n     *\n     * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n     * expect(providers[0].key.displayName).toBe(\"Car\");\n     * expect(providers[0].dependencies.length).toEqual(1);\n     * expect(providers[0].factory).toBeDefined();\n     *\n     * expect(providers[1].key.displayName).toBe(\"Engine\");\n     * });\n     * ```\n     *\n     */\n    static resolve(providers) {\n        return resolveReflectiveProviders(providers);\n    }\n    /**\n     * Resolves an array of providers and creates an injector from those providers.\n     *\n     * The passed-in providers can be an array of `Type`, `Provider`,\n     * or a recursive array of more providers.\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * ```typescript\n     * @Injectable()\n     * class Engine {\n     * }\n     *\n     * @Injectable()\n     * class Car {\n     *   constructor(public engine:Engine) {}\n     * }\n     *\n     * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n     * expect(injector.get(Car) instanceof Car).toBe(true);\n     * ```\n     */\n    static resolveAndCreate(providers, parent) {\n        const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n        return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);\n    }\n    /**\n     * Creates an injector from previously resolved providers.\n     *\n     * This API is the recommended way to construct injectors in performance-sensitive parts.\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * ```typescript\n     * @Injectable()\n     * class Engine {\n     * }\n     *\n     * @Injectable()\n     * class Car {\n     *   constructor(public engine:Engine) {}\n     * }\n     *\n     * var providers = ReflectiveInjector.resolve([Car, Engine]);\n     * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n     * expect(injector.get(Car) instanceof Car).toBe(true);\n     * ```\n     */\n    static fromResolvedProviders(providers, parent) {\n        return new ReflectiveInjector_(providers, parent);\n    }\n}\nclass ReflectiveInjector_ {\n    /**\n     * Private\n     */\n    constructor(_providers, _parent) {\n        /** @internal */\n        this._constructionCounter = 0;\n        this._providers = _providers;\n        this.parent = _parent || null;\n        const len = _providers.length;\n        this.keyIds = [];\n        this.objs = [];\n        for (let i = 0; i < len; i++) {\n            this.keyIds[i] = _providers[i].key.id;\n            this.objs[i] = UNDEFINED;\n        }\n    }\n    get(token, notFoundValue = THROW_IF_NOT_FOUND) {\n        return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);\n    }\n    resolveAndCreateChild(providers) {\n        const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n        return this.createChildFromResolved(ResolvedReflectiveProviders);\n    }\n    createChildFromResolved(providers) {\n        const inj = new ReflectiveInjector_(providers);\n        inj.parent = this;\n        return inj;\n    }\n    resolveAndInstantiate(provider) {\n        return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);\n    }\n    instantiateResolved(provider) {\n        return this._instantiateProvider(provider);\n    }\n    getProviderAtIndex(index) {\n        if (index < 0 || index >= this._providers.length) {\n            throw outOfBoundsError(index);\n        }\n        return this._providers[index];\n    }\n    /** @internal */\n    _new(provider) {\n        if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {\n            throw cyclicDependencyError(this, provider.key);\n        }\n        return this._instantiateProvider(provider);\n    }\n    _getMaxNumberOfObjects() {\n        return this.objs.length;\n    }\n    _instantiateProvider(provider) {\n        if (provider.multiProvider) {\n            const res = [];\n            for (let i = 0; i < provider.resolvedFactories.length; ++i) {\n                res[i] = this._instantiate(provider, provider.resolvedFactories[i]);\n            }\n            return res;\n        }\n        else {\n            return this._instantiate(provider, provider.resolvedFactories[0]);\n        }\n    }\n    _instantiate(provider, ResolvedReflectiveFactory) {\n        const factory = ResolvedReflectiveFactory.factory;\n        let deps;\n        try {\n            deps =\n                ResolvedReflectiveFactory.dependencies.map(dep => this._getByReflectiveDependency(dep));\n        }\n        catch (e) {\n            if (e.addKey) {\n                e.addKey(this, provider.key);\n            }\n            throw e;\n        }\n        let obj;\n        try {\n            obj = factory(...deps);\n        }\n        catch (e) {\n            throw instantiationError(this, e, e.stack, provider.key);\n        }\n        return obj;\n    }\n    _getByReflectiveDependency(dep) {\n        return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);\n    }\n    _getByKey(key, visibility, notFoundValue) {\n        if (key === ReflectiveInjector_.INJECTOR_KEY) {\n            return this;\n        }\n        if (visibility instanceof Self) {\n            return this._getByKeySelf(key, notFoundValue);\n        }\n        else {\n            return this._getByKeyDefault(key, notFoundValue, visibility);\n        }\n    }\n    _getObjByKeyId(keyId) {\n        for (let i = 0; i < this.keyIds.length; i++) {\n            if (this.keyIds[i] === keyId) {\n                if (this.objs[i] === UNDEFINED) {\n                    this.objs[i] = this._new(this._providers[i]);\n                }\n                return this.objs[i];\n            }\n        }\n        return UNDEFINED;\n    }\n    /** @internal */\n    _throwOrNull(key, notFoundValue) {\n        if (notFoundValue !== THROW_IF_NOT_FOUND) {\n            return notFoundValue;\n        }\n        else {\n            throw noProviderError(this, key);\n        }\n    }\n    /** @internal */\n    _getByKeySelf(key, notFoundValue) {\n        const obj = this._getObjByKeyId(key.id);\n        return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);\n    }\n    /** @internal */\n    _getByKeyDefault(key, notFoundValue, visibility) {\n        let inj;\n        if (visibility instanceof SkipSelf) {\n            inj = this.parent;\n        }\n        else {\n            inj = this;\n        }\n        while (inj instanceof ReflectiveInjector_) {\n            const inj_ = inj;\n            const obj = inj_._getObjByKeyId(key.id);\n            if (obj !== UNDEFINED)\n                return obj;\n            inj = inj_.parent;\n        }\n        if (inj !== null) {\n            return inj.get(key.token, notFoundValue);\n        }\n        else {\n            return this._throwOrNull(key, notFoundValue);\n        }\n    }\n    get displayName() {\n        const providers = _mapProviders(this, (b) => ' \"' + b.key.displayName + '\" ')\n            .join(', ');\n        return `ReflectiveInjector(providers: [${providers}])`;\n    }\n    toString() {\n        return this.displayName;\n    }\n}\nReflectiveInjector_.INJECTOR_KEY = ReflectiveKey.get(Injector);\nfunction _mapProviders(injector, fn) {\n    const res = [];\n    for (let i = 0; i < injector._providers.length; ++i) {\n        res[i] = fn(injector.getProviderAtIndex(i));\n    }\n    return res;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction ɵɵdirectiveInject(token, flags = InjectFlags.Default) {\n    const lView = getLView();\n    // Fall back to inject() if view hasn't been created. This situation can happen in tests\n    // if inject utilities are used before bootstrapping.\n    if (lView === null) {\n        // Verify that we will not get into infinite loop.\n        ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);\n        return ɵɵinject(token, flags);\n    }\n    const tNode = getCurrentTNode();\n    return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);\n}\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nfunction ɵɵinvalidFactory() {\n    const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';\n    throw new Error(msg);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Update a property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n *        renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nfunction ɵɵproperty(propName, value, sanitizer) {\n    const lView = getLView();\n    const bindingIndex = nextBindingIndex();\n    if (bindingUpdated(lView, bindingIndex, value)) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, false);\n        ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n    }\n    return ɵɵproperty;\n}\n/**\n * Given `<div style=\"...\" my-dir>` and `MyDir` with `@Input('style')` we need to write to\n * directive input.\n */\nfunction setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased) {\n    const inputs = tNode.inputs;\n    const property = isClassBased ? 'class' : 'style';\n    // We support both 'class' and `className` hence the fallback.\n    setInputsForProperty(tView, lView, inputs[property], property, value);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction elementStartFirstCreatePass(index, tView, lView, native, name, attrsIndex, localRefsIndex) {\n    ngDevMode && assertFirstCreatePass(tView);\n    ngDevMode && ngDevMode.firstCreatePass++;\n    const tViewConsts = tView.consts;\n    const attrs = getConstant(tViewConsts, attrsIndex);\n    const tNode = getOrCreateTNode(tView, index, 2 /* Element */, name, attrs);\n    const hasDirectives = resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n    ngDevMode && logUnknownElementError(tView, native, tNode, hasDirectives);\n    if (tNode.attrs !== null) {\n        computeStaticStyling(tNode, tNode.attrs, false);\n    }\n    if (tNode.mergedAttrs !== null) {\n        computeStaticStyling(tNode, tNode.mergedAttrs, true);\n    }\n    if (tView.queries !== null) {\n        tView.queries.elementStart(tView, tNode);\n    }\n    return tNode;\n}\n/**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n *\n * @codeGenApi\n */\nfunction ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {\n    const lView = getLView();\n    const tView = getTView();\n    const adjustedIndex = HEADER_OFFSET + index;\n    ngDevMode &&\n        assertEqual(getBindingIndex(), tView.bindingStartIndex, 'elements should be created before any bindings');\n    ngDevMode && assertIndexInRange(lView, adjustedIndex);\n    const renderer = lView[RENDERER];\n    const native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace());\n    const tNode = tView.firstCreatePass ?\n        elementStartFirstCreatePass(adjustedIndex, tView, lView, native, name, attrsIndex, localRefsIndex) :\n        tView.data[adjustedIndex];\n    setCurrentTNode(tNode, true);\n    const mergedAttrs = tNode.mergedAttrs;\n    if (mergedAttrs !== null) {\n        setUpAttributes(renderer, native, mergedAttrs);\n    }\n    const classes = tNode.classes;\n    if (classes !== null) {\n        writeDirectClass(renderer, native, classes);\n    }\n    const styles = tNode.styles;\n    if (styles !== null) {\n        writeDirectStyle(renderer, native, styles);\n    }\n    if ((tNode.flags & 64 /* isDetached */) !== 64 /* isDetached */) {\n        // In the i18n case, the translation may have removed this element, so only add it if it is not\n        // detached. See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n        appendChild(tView, lView, native, tNode);\n    }\n    // any immediate children of a component or template container must be pre-emptively\n    // monkey-patched with the component view data so that the element can be inspected\n    // later on using any element discovery utility methods (see `element_discovery.ts`)\n    if (getElementDepthCount() === 0) {\n        attachPatchData(native, lView);\n    }\n    increaseElementDepthCount();\n    if (isDirectiveHost(tNode)) {\n        createDirectivesInstances(tView, lView, tNode);\n        executeContentQueries(tView, tNode, lView);\n    }\n    if (localRefsIndex !== null) {\n        saveResolvedLocalsInData(lView, tNode);\n    }\n}\n/**\n * Mark the end of the element.\n *\n * @codeGenApi\n */\nfunction ɵɵelementEnd() {\n    let currentTNode = getCurrentTNode();\n    ngDevMode && assertDefined(currentTNode, 'No parent node to close.');\n    if (isCurrentTNodeParent()) {\n        setCurrentTNodeAsNotParent();\n    }\n    else {\n        ngDevMode && assertHasParent(getCurrentTNode());\n        currentTNode = currentTNode.parent;\n        setCurrentTNode(currentTNode, false);\n    }\n    const tNode = currentTNode;\n    ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */);\n    decreaseElementDepthCount();\n    const tView = getTView();\n    if (tView.firstCreatePass) {\n        registerPostOrderHooks(tView, currentTNode);\n        if (isContentQueryHost(currentTNode)) {\n            tView.queries.elementEnd(currentTNode);\n        }\n    }\n    if (tNode.classesWithoutHost != null && hasClassInput(tNode)) {\n        setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.classesWithoutHost, true);\n    }\n    if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {\n        setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);\n    }\n}\n/**\n * Creates an empty element using {@link elementStart} and {@link elementEnd}\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n *\n * @codeGenApi\n */\nfunction ɵɵelement(index, name, attrsIndex, localRefsIndex) {\n    ɵɵelementStart(index, name, attrsIndex, localRefsIndex);\n    ɵɵelementEnd();\n}\nfunction logUnknownElementError(tView, element, tNode, hasDirectives) {\n    const schemas = tView.schemas;\n    // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n    // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n    // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n    // execute the check below.\n    if (schemas === null)\n        return;\n    const tagName = tNode.value;\n    // If the element matches any directive, it's considered as valid.\n    if (!hasDirectives && tagName !== null) {\n        // The element is unknown if it's an instance of HTMLUnknownElement or it isn't registered\n        // as a custom element. Note that unknown elements with a dash in their name won't be instances\n        // of HTMLUnknownElement in browsers that support web components.\n        const isUnknown = \n        // Note that we can't check for `typeof HTMLUnknownElement === 'function'`,\n        // because while most browsers return 'function', IE returns 'object'.\n        (typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement &&\n            element instanceof HTMLUnknownElement) ||\n            (typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 &&\n                !customElements.get(tagName));\n        if (isUnknown && !matchingSchemas(tView, tagName)) {\n            let message = `'${tagName}' is not a known element:\\n`;\n            message += `1. If '${tagName}' is an Angular component, then verify that it is part of this module.\\n`;\n            if (tagName && tagName.indexOf('-') > -1) {\n                message += `2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.`;\n            }\n            else {\n                message +=\n                    `2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.`;\n            }\n            console.error(formatRuntimeError(\"304\" /* UNKNOWN_ELEMENT */, message));\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, localRefsIndex) {\n    ngDevMode && ngDevMode.firstCreatePass++;\n    const tViewConsts = tView.consts;\n    const attrs = getConstant(tViewConsts, attrsIndex);\n    const tNode = getOrCreateTNode(tView, index, 8 /* ElementContainer */, 'ng-container', attrs);\n    // While ng-container doesn't necessarily support styling, we use the style context to identify\n    // and execute directives on the ng-container.\n    if (attrs !== null) {\n        computeStaticStyling(tNode, attrs, true);\n    }\n    const localRefs = getConstant(tViewConsts, localRefsIndex);\n    resolveDirectives(tView, lView, tNode, localRefs);\n    if (tView.queries !== null) {\n        tView.queries.elementStart(tView, tNode);\n    }\n    return tNode;\n}\n/**\n * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.\n * The instruction must later be followed by `elementContainerEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n *\n * Even if this instruction accepts a set of attributes no actual attribute values are propagated to\n * the DOM (as a comment node can't have attributes). Attributes are here only for directive\n * matching purposes and setting initial inputs of directives.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) {\n    const lView = getLView();\n    const tView = getTView();\n    const adjustedIndex = index + HEADER_OFFSET;\n    ngDevMode && assertIndexInRange(lView, adjustedIndex);\n    ngDevMode &&\n        assertEqual(getBindingIndex(), tView.bindingStartIndex, 'element containers should be created before any bindings');\n    const tNode = tView.firstCreatePass ?\n        elementContainerStartFirstCreatePass(adjustedIndex, tView, lView, attrsIndex, localRefsIndex) :\n        tView.data[adjustedIndex];\n    setCurrentTNode(tNode, true);\n    ngDevMode && ngDevMode.rendererCreateComment++;\n    const native = lView[adjustedIndex] =\n        lView[RENDERER].createComment(ngDevMode ? 'ng-container' : '');\n    appendChild(tView, lView, native, tNode);\n    attachPatchData(native, lView);\n    if (isDirectiveHost(tNode)) {\n        createDirectivesInstances(tView, lView, tNode);\n        executeContentQueries(tView, tNode, lView);\n    }\n    if (localRefsIndex != null) {\n        saveResolvedLocalsInData(lView, tNode);\n    }\n}\n/**\n * Mark the end of the <ng-container>.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainerEnd() {\n    let currentTNode = getCurrentTNode();\n    const tView = getTView();\n    if (isCurrentTNodeParent()) {\n        setCurrentTNodeAsNotParent();\n    }\n    else {\n        ngDevMode && assertHasParent(currentTNode);\n        currentTNode = currentTNode.parent;\n        setCurrentTNode(currentTNode, false);\n    }\n    ngDevMode && assertTNodeType(currentTNode, 8 /* ElementContainer */);\n    if (tView.firstCreatePass) {\n        registerPostOrderHooks(tView, currentTNode);\n        if (isContentQueryHost(currentTNode)) {\n            tView.queries.elementEnd(currentTNode);\n        }\n    }\n}\n/**\n * Creates an empty logical container using {@link elementContainerStart}\n * and {@link elementContainerEnd}\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainer(index, attrsIndex, localRefsIndex) {\n    ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);\n    ɵɵelementContainerEnd();\n}\n\n/**\n * Returns the current OpaqueViewState instance.\n *\n * Used in conjunction with the restoreView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @codeGenApi\n */\nfunction ɵɵgetCurrentView() {\n    return getLView();\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Determine if the argument is shaped like a Promise\n */\nfunction isPromise(obj) {\n    // allow any Promise/A+ compliant thenable.\n    // It's up to the caller to ensure that obj.then conforms to the spec\n    return !!obj && typeof obj.then === 'function';\n}\n/**\n * Determine if the argument is a Subscribable\n */\nfunction isSubscribable(obj) {\n    return !!obj && typeof obj.subscribe === 'function';\n}\n/**\n * Determine if the argument is an Observable\n *\n * Strictly this tests that the `obj` is `Subscribable`, since `Observable`\n * types need additional methods, such as `lift()`. But it is adequate for our\n * needs since within the Angular framework code we only ever need to use the\n * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects\n * into `Observable` as needed.\n */\nconst isObservable = isSubscribable;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Adds an event listener to the current node.\n *\n * If an output exists on one of the node's directives, it also subscribes to the output\n * and saves the subscription for later cleanup.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nfunction ɵɵlistener(eventName, listenerFn, useCapture, eventTargetResolver) {\n    const lView = getLView();\n    const tView = getTView();\n    const tNode = getCurrentTNode();\n    listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn, !!useCapture, eventTargetResolver);\n    return ɵɵlistener;\n}\n/**\n * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered\n * in the component's renderer. Normally all host listeners are evaluated with the\n * parent component's renderer, but, in the case of animation @triggers, they need\n * to be evaluated with the sub component's renderer (because that's where the\n * animation triggers are defined).\n *\n * Do not use this instruction as a replacement for `listener`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nfunction ɵɵsyntheticHostListener(eventName, listenerFn) {\n    const tNode = getCurrentTNode();\n    const lView = getLView();\n    const tView = getTView();\n    const currentDef = getCurrentDirectiveDef(tView.data);\n    const renderer = loadComponentRenderer(currentDef, tNode, lView);\n    listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, false);\n    return ɵɵsyntheticHostListener;\n}\n/**\n * A utility function that checks if a given element has already an event handler registered for an\n * event with a specified name. The TView.cleanup data structure is used to find out which events\n * are registered for a given element.\n */\nfunction findExistingListener(tView, lView, eventName, tNodeIdx) {\n    const tCleanup = tView.cleanup;\n    if (tCleanup != null) {\n        for (let i = 0; i < tCleanup.length - 1; i += 2) {\n            const cleanupEventName = tCleanup[i];\n            if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) {\n                // We have found a matching event name on the same node but it might not have been\n                // registered yet, so we must explicitly verify entries in the LView cleanup data\n                // structures.\n                const lCleanup = lView[CLEANUP];\n                const listenerIdxInLCleanup = tCleanup[i + 2];\n                return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;\n            }\n            // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or\n            // 2-element entries (for directive and queries destroy hooks). As such we can encounter\n            // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements\n            // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check\n            // documentation of TView.cleanup for more details of this data structure layout.\n            if (typeof cleanupEventName === 'string') {\n                i += 2;\n            }\n        }\n    }\n    return null;\n}\nfunction listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, useCapture, eventTargetResolver) {\n    const isTNodeDirectiveHost = isDirectiveHost(tNode);\n    const firstCreatePass = tView.firstCreatePass;\n    const tCleanup = firstCreatePass && getOrCreateTViewCleanup(tView);\n    const context = lView[CONTEXT];\n    // When the ɵɵlistener instruction was generated and is executed we know that there is either a\n    // native listener or a directive output on this element. As such we we know that we will have to\n    // register a listener and store its cleanup function on LView.\n    const lCleanup = getOrCreateLViewCleanup(lView);\n    ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */);\n    let processOutputs = true;\n    // Adding a native event listener is applicable when:\n    // - The corresponding TNode represents a DOM element.\n    // - The event target has a resolver (usually resulting in a global object,\n    //   such as `window` or `document`).\n    if ((tNode.type & 3 /* AnyRNode */) || eventTargetResolver) {\n        const native = getNativeByTNode(tNode, lView);\n        const target = eventTargetResolver ? eventTargetResolver(native) : native;\n        const lCleanupIndex = lCleanup.length;\n        const idxOrTargetGetter = eventTargetResolver ?\n            (_lView) => eventTargetResolver(unwrapRNode(_lView[tNode.index])) :\n            tNode.index;\n        // In order to match current behavior, native DOM event listeners must be added for all\n        // events (including outputs).\n        if (isProceduralRenderer(renderer)) {\n            // There might be cases where multiple directives on the same element try to register an event\n            // handler function for the same event. In this situation we want to avoid registration of\n            // several native listeners as each registration would be intercepted by NgZone and\n            // trigger change detection. This would mean that a single user action would result in several\n            // change detections being invoked. To avoid this situation we want to have only one call to\n            // native handler registration (for the same element and same type of event).\n            //\n            // In order to have just one native event handler in presence of multiple handler functions,\n            // we just register a first handler function as a native event listener and then chain\n            // (coalesce) other handler functions on top of the first native handler function.\n            let existingListener = null;\n            // Please note that the coalescing described here doesn't happen for events specifying an\n            // alternative target (ex. (document:click)) - this is to keep backward compatibility with the\n            // view engine.\n            // Also, we don't have to search for existing listeners is there are no directives\n            // matching on a given node as we can't register multiple event handlers for the same event in\n            // a template (this would mean having duplicate attributes).\n            if (!eventTargetResolver && isTNodeDirectiveHost) {\n                existingListener = findExistingListener(tView, lView, eventName, tNode.index);\n            }\n            if (existingListener !== null) {\n                // Attach a new listener to coalesced listeners list, maintaining the order in which\n                // listeners are registered. For performance reasons, we keep a reference to the last\n                // listener in that list (in `__ngLastListenerFn__` field), so we can avoid going through\n                // the entire set each time we need to add a new listener.\n                const lastListenerFn = existingListener.__ngLastListenerFn__ || existingListener;\n                lastListenerFn.__ngNextListenerFn__ = listenerFn;\n                existingListener.__ngLastListenerFn__ = listenerFn;\n                processOutputs = false;\n            }\n            else {\n                listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */);\n                const cleanupFn = renderer.listen(target, eventName, listenerFn);\n                ngDevMode && ngDevMode.rendererAddEventListener++;\n                lCleanup.push(listenerFn, cleanupFn);\n                tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1);\n            }\n        }\n        else {\n            listenerFn = wrapListener(tNode, lView, context, listenerFn, true /** preventDefault */);\n            target.addEventListener(eventName, listenerFn, useCapture);\n            ngDevMode && ngDevMode.rendererAddEventListener++;\n            lCleanup.push(listenerFn);\n            tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, useCapture);\n        }\n    }\n    else {\n        // Even if there is no native listener to add, we still need to wrap the listener so that OnPush\n        // ancestors are marked dirty when an event occurs.\n        listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */);\n    }\n    // subscribe to directive outputs\n    const outputs = tNode.outputs;\n    let props;\n    if (processOutputs && outputs !== null && (props = outputs[eventName])) {\n        const propsLength = props.length;\n        if (propsLength) {\n            for (let i = 0; i < propsLength; i += 2) {\n                const index = props[i];\n                ngDevMode && assertIndexInRange(lView, index);\n                const minifiedName = props[i + 1];\n                const directiveInstance = lView[index];\n                const output = directiveInstance[minifiedName];\n                if (ngDevMode && !isObservable(output)) {\n                    throw new Error(`@Output ${minifiedName} not initialized in '${directiveInstance.constructor.name}'.`);\n                }\n                const subscription = output.subscribe(listenerFn);\n                const idx = lCleanup.length;\n                lCleanup.push(listenerFn, subscription);\n                tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1));\n            }\n        }\n    }\n}\nfunction executeListenerWithErrorHandling(lView, context, listenerFn, e) {\n    try {\n        profiler(6 /* OutputStart */, context, listenerFn);\n        // Only explicitly returning false from a listener should preventDefault\n        return listenerFn(e) !== false;\n    }\n    catch (error) {\n        handleError(lView, error);\n        return false;\n    }\n    finally {\n        profiler(7 /* OutputEnd */, context, listenerFn);\n    }\n}\n/**\n * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior,\n * if applicable.\n *\n * @param tNode The TNode associated with this listener\n * @param lView The LView that contains this listener\n * @param listenerFn The listener function to call\n * @param wrapWithPreventDefault Whether or not to prevent default behavior\n * (the procedural renderer does this already, so in those cases, we should skip)\n */\nfunction wrapListener(tNode, lView, context, listenerFn, wrapWithPreventDefault) {\n    // Note: we are performing most of the work in the listener function itself\n    // to optimize listener registration.\n    return function wrapListenerIn_markDirtyAndPreventDefault(e) {\n        // Ivy uses `Function` as a special token that allows us to unwrap the function\n        // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`.\n        if (e === Function) {\n            return listenerFn;\n        }\n        // In order to be backwards compatible with View Engine, events on component host nodes\n        // must also mark the component view itself dirty (i.e. the view that it owns).\n        const startView = tNode.flags & 2 /* isComponentHost */ ?\n            getComponentLViewByIndex(tNode.index, lView) :\n            lView;\n        // See interfaces/view.ts for more on LViewFlags.ManualOnPush\n        if ((lView[FLAGS] & 32 /* ManualOnPush */) === 0) {\n            markViewDirty(startView);\n        }\n        let result = executeListenerWithErrorHandling(lView, context, listenerFn, e);\n        // A just-invoked listener function might have coalesced listeners so we need to check for\n        // their presence and invoke as needed.\n        let nextListenerFn = wrapListenerIn_markDirtyAndPreventDefault.__ngNextListenerFn__;\n        while (nextListenerFn) {\n            // We should prevent default if any of the listeners explicitly return false\n            result = executeListenerWithErrorHandling(lView, context, nextListenerFn, e) && result;\n            nextListenerFn = nextListenerFn.__ngNextListenerFn__;\n        }\n        if (wrapWithPreventDefault && result === false) {\n            e.preventDefault();\n            // Necessary for legacy browsers that don't support preventDefault (e.g. IE)\n            e.returnValue = false;\n        }\n        return result;\n    };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Retrieves a context at the level specified and saves it as the global, contextViewData.\n * Will get the next level up if level is not specified.\n *\n * This is used to save contexts of parent views so they can be bound in embedded views, or\n * in conjunction with reference() to bind a ref from a parent view.\n *\n * @param level The relative level of the view from which to grab context compared to contextVewData\n * @returns context\n *\n * @codeGenApi\n */\nfunction ɵɵnextContext(level = 1) {\n    return nextContextImpl(level);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Checks a given node against matching projection slots and returns the\n * determined slot index. Returns \"null\" if no slot matched the given node.\n *\n * This function takes into account the parsed ngProjectAs selector from the\n * node's attributes. If present, it will check whether the ngProjectAs selector\n * matches any of the projection slot selectors.\n */\nfunction matchingProjectionSlotIndex(tNode, projectionSlots) {\n    let wildcardNgContentIndex = null;\n    const ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n    for (let i = 0; i < projectionSlots.length; i++) {\n        const slotValue = projectionSlots[i];\n        // The last wildcard projection slot should match all nodes which aren't matching\n        // any selector. This is necessary to be backwards compatible with view engine.\n        if (slotValue === '*') {\n            wildcardNgContentIndex = i;\n            continue;\n        }\n        // If we ran into an `ngProjectAs` attribute, we should match its parsed selector\n        // to the list of selectors, otherwise we fall back to matching against the node.\n        if (ngProjectAsAttrVal === null ?\n            isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true) :\n            isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {\n            return i; // first matching selector \"captures\" a given node\n        }\n    }\n    return wildcardNgContentIndex;\n}\n/**\n * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.\n * It takes all the selectors from the entire component's template and decides where\n * each projected node belongs (it re-distributes nodes among \"buckets\" where each \"bucket\" is\n * backed by a selector).\n *\n * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,\n * un-parsed form.\n *\n * The parsed form is needed for efficient matching of a node against a given CSS selector.\n * The un-parsed, textual form is needed for support of the ngProjectAs attribute.\n *\n * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more\n * drawbacks:\n * - having only a textual form would require runtime parsing of CSS selectors;\n * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a\n * template author).\n *\n * @param projectionSlots? A collection of projection slots. A projection slot can be based\n *        on a parsed CSS selectors or set to the wildcard selector (\"*\") in order to match\n *        all nodes which do not match any selector. If not specified, a single wildcard\n *        selector projection slot will be defined.\n *\n * @codeGenApi\n */\nfunction ɵɵprojectionDef(projectionSlots) {\n    const componentNode = getLView()[DECLARATION_COMPONENT_VIEW][T_HOST];\n    if (!componentNode.projection) {\n        // If no explicit projection slots are defined, fall back to a single\n        // projection slot with the wildcard selector.\n        const numProjectionSlots = projectionSlots ? projectionSlots.length : 1;\n        const projectionHeads = componentNode.projection =\n            newArray(numProjectionSlots, null);\n        const tails = projectionHeads.slice();\n        let componentChild = componentNode.child;\n        while (componentChild !== null) {\n            const slotIndex = projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;\n            if (slotIndex !== null) {\n                if (tails[slotIndex]) {\n                    tails[slotIndex].projectionNext = componentChild;\n                }\n                else {\n                    projectionHeads[slotIndex] = componentChild;\n                }\n                tails[slotIndex] = componentChild;\n            }\n            componentChild = componentChild.next;\n        }\n    }\n}\n/**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex\n * @param selectorIndex:\n *        - 0 when the selector is `*` (or unspecified as this is the default value),\n *        - 1 based index of the selector from the {@link projectionDef}\n *\n * @codeGenApi\n */\nfunction ɵɵprojection(nodeIndex, selectorIndex = 0, attrs) {\n    const lView = getLView();\n    const tView = getTView();\n    const tProjectionNode = getOrCreateTNode(tView, HEADER_OFFSET + nodeIndex, 16 /* Projection */, null, attrs || null);\n    // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.\n    if (tProjectionNode.projection === null)\n        tProjectionNode.projection = selectorIndex;\n    // `<ng-content>` has no content\n    setCurrentTNodeAsNotParent();\n    if ((tProjectionNode.flags & 64 /* isDetached */) !== 64 /* isDetached */) {\n        // re-distribution of projectable nodes is stored on a component's view level\n        applyProjection(tView, lView, tProjectionNode);\n    }\n}\n\n/**\n *\n * Update an interpolated property on an element with a lone bound value\n *\n * Used when the value passed to a property has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div title=\"{{v0}}\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate('title', v0);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate(propName, v0, sanitizer) {\n    ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer);\n    return ɵɵpropertyInterpolate;\n}\n/**\n *\n * Update an interpolated property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate1(propName, prefix, v0, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 1, prefix, suffix);\n    }\n    return ɵɵpropertyInterpolate1;\n}\n/**\n *\n * Update an interpolated property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate2(propName, prefix, v0, i0, v1, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 2, prefix, i0, suffix);\n    }\n    return ɵɵpropertyInterpolate2;\n}\n/**\n *\n * Update an interpolated property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate3(propName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 3, prefix, i0, i1, suffix);\n    }\n    return ɵɵpropertyInterpolate3;\n}\n/**\n *\n * Update an interpolated property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate4(propName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\n    }\n    return ɵɵpropertyInterpolate4;\n}\n/**\n *\n * Update an interpolated property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate5(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\n    }\n    return ɵɵpropertyInterpolate5;\n}\n/**\n *\n * Update an interpolated property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate6(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate6(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\n    }\n    return ɵɵpropertyInterpolate6;\n}\n/**\n *\n * Update an interpolated property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate7(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate7(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);\n    }\n    return ɵɵpropertyInterpolate7;\n}\n/**\n *\n * Update an interpolated property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate8(\n *  'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate8(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);\n    }\n    return ɵɵpropertyInterpolate8;\n}\n/**\n * Update an interpolated property on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n *  title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolateV(\n *  'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update.\n * @param values The collection of values and the strings inbetween those values, beginning with a\n * string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolateV(propName, values, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolationV(lView, values);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        if (ngDevMode) {\n            const interpolationInBetween = [values[0]]; // prefix\n            for (let i = 2; i < values.length; i += 2) {\n                interpolationInBetween.push(values[i]);\n            }\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween);\n        }\n    }\n    return ɵɵpropertyInterpolateV;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * NOTE: The word `styling` is used interchangeably as style or class styling.\n *\n * This file contains code to link styling instructions together so that they can be replayed in\n * priority order. The file exists because Ivy styling instruction execution order does not match\n * that of the priority order. The purpose of this code is to create a linked list so that the\n * instructions can be traversed in priority order when computing the styles.\n *\n * Assume we are dealing with the following code:\n * ```\n * @Component({\n *   template: `\n *     <my-cmp [style]=\" {color: '#001'} \"\n *             [style.color]=\" #002 \"\n *             dir-style-color-1\n *             dir-style-color-2> `\n * })\n * class ExampleComponent {\n *   static ngComp = ... {\n *     ...\n *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n *     ɵɵstyleMap({color: '#001'});\n *     ɵɵstyleProp('color', '#002');\n *     ...\n *   }\n * }\n *\n * @Directive({\n *   selector: `[dir-style-color-1]',\n * })\n * class Style1Directive {\n *   @HostBinding('style') style = {color: '#005'};\n *   @HostBinding('style.color') color = '#006';\n *\n *   static ngDir = ... {\n *     ...\n *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n *     ɵɵstyleMap({color: '#005'});\n *     ɵɵstyleProp('color', '#006');\n *     ...\n *   }\n * }\n *\n * @Directive({\n *   selector: `[dir-style-color-2]',\n * })\n * class Style2Directive {\n *   @HostBinding('style') style = {color: '#007'};\n *   @HostBinding('style.color') color = '#008';\n *\n *   static ngDir = ... {\n *     ...\n *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n *     ɵɵstyleMap({color: '#007'});\n *     ɵɵstyleProp('color', '#008');\n *     ...\n *   }\n * }\n *\n * @Directive({\n *   selector: `my-cmp',\n * })\n * class MyComponent {\n *   @HostBinding('style') style = {color: '#003'};\n *   @HostBinding('style.color') color = '#004';\n *\n *   static ngComp = ... {\n *     ...\n *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n *     ɵɵstyleMap({color: '#003'});\n *     ɵɵstyleProp('color', '#004');\n *     ...\n *   }\n * }\n * ```\n *\n * The Order of instruction execution is:\n *\n * NOTE: the comment binding location is for illustrative purposes only.\n *\n * ```\n * // Template: (ExampleComponent)\n *     ɵɵstyleMap({color: '#001'});   // Binding index: 10\n *     ɵɵstyleProp('color', '#002');  // Binding index: 12\n * // MyComponent\n *     ɵɵstyleMap({color: '#003'});   // Binding index: 20\n *     ɵɵstyleProp('color', '#004');  // Binding index: 22\n * // Style1Directive\n *     ɵɵstyleMap({color: '#005'});   // Binding index: 24\n *     ɵɵstyleProp('color', '#006');  // Binding index: 26\n * // Style2Directive\n *     ɵɵstyleMap({color: '#007'});   // Binding index: 28\n *     ɵɵstyleProp('color', '#008');  // Binding index: 30\n * ```\n *\n * The correct priority order of concatenation is:\n *\n * ```\n * // MyComponent\n *     ɵɵstyleMap({color: '#003'});   // Binding index: 20\n *     ɵɵstyleProp('color', '#004');  // Binding index: 22\n * // Style1Directive\n *     ɵɵstyleMap({color: '#005'});   // Binding index: 24\n *     ɵɵstyleProp('color', '#006');  // Binding index: 26\n * // Style2Directive\n *     ɵɵstyleMap({color: '#007'});   // Binding index: 28\n *     ɵɵstyleProp('color', '#008');  // Binding index: 30\n * // Template: (ExampleComponent)\n *     ɵɵstyleMap({color: '#001'});   // Binding index: 10\n *     ɵɵstyleProp('color', '#002');  // Binding index: 12\n * ```\n *\n * What color should be rendered?\n *\n * Once the items are correctly sorted in the list, the answer is simply the last item in the\n * concatenation list which is `#002`.\n *\n * To do so we keep a linked list of all of the bindings which pertain to this element.\n * Notice that the bindings are inserted in the order of execution, but the `TView.data` allows\n * us to traverse them in the order of priority.\n *\n * |Idx|`TView.data`|`LView`          | Notes\n * |---|------------|-----------------|--------------\n * |...|            |                 |\n * |10 |`null`      |`{color: '#001'}`| `ɵɵstyleMap('color', {color: '#001'})`\n * |11 |`30 | 12`   | ...             |\n * |12 |`color`     |`'#002'`         | `ɵɵstyleProp('color', '#002')`\n * |13 |`10 | 0`    | ...             |\n * |...|            |                 |\n * |20 |`null`      |`{color: '#003'}`| `ɵɵstyleMap('color', {color: '#003'})`\n * |21 |`0 | 22`    | ...             |\n * |22 |`color`     |`'#004'`         | `ɵɵstyleProp('color', '#004')`\n * |23 |`20 | 24`   | ...             |\n * |24 |`null`      |`{color: '#005'}`| `ɵɵstyleMap('color', {color: '#005'})`\n * |25 |`22 | 26`   | ...             |\n * |26 |`color`     |`'#006'`         | `ɵɵstyleProp('color', '#006')`\n * |27 |`24 | 28`   | ...             |\n * |28 |`null`      |`{color: '#007'}`| `ɵɵstyleMap('color', {color: '#007'})`\n * |29 |`26 | 30`   | ...             |\n * |30 |`color`     |`'#008'`         | `ɵɵstyleProp('color', '#008')`\n * |31 |`28 | 10`   | ...             |\n *\n * The above data structure allows us to re-concatenate the styling no matter which data binding\n * changes.\n *\n * NOTE: in addition to keeping track of next/previous index the `TView.data` also stores prev/next\n * duplicate bit. The duplicate bit if true says there either is a binding with the same name or\n * there is a map (which may contain the name). This information is useful in knowing if other\n * styles with higher priority need to be searched for overwrites.\n *\n * NOTE: See `should support example in 'tnode_linked_list.ts' documentation` in\n * `tnode_linked_list_spec.ts` for working example.\n */\nlet __unused_const_as_closure_does_not_like_standalone_comment_blocks__;\n/**\n * Insert new `tStyleValue` at `TData` and link existing style bindings such that we maintain linked\n * list of styles and compute the duplicate flag.\n *\n * Note: this function is executed during `firstUpdatePass` only to populate the `TView.data`.\n *\n * The function works by keeping track of `tStylingRange` which contains two pointers pointing to\n * the head/tail of the template portion of the styles.\n *  - if `isHost === false` (we are template) then insertion is at tail of `TStylingRange`\n *  - if `isHost === true` (we are host binding) then insertion is at head of `TStylingRange`\n *\n * @param tData The `TData` to insert into.\n * @param tNode `TNode` associated with the styling element.\n * @param tStylingKey See `TStylingKey`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isHostBinding `true` if the insertion is for a `hostBinding`. (insertion is in front of\n *               template.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n *                       `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nfunction insertTStylingBinding(tData, tNode, tStylingKeyWithStatic, index, isHostBinding, isClassBinding) {\n    ngDevMode && assertFirstUpdatePass(getTView());\n    let tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings;\n    let tmplHead = getTStylingRangePrev(tBindings);\n    let tmplTail = getTStylingRangeNext(tBindings);\n    tData[index] = tStylingKeyWithStatic;\n    let isKeyDuplicateOfStatic = false;\n    let tStylingKey;\n    if (Array.isArray(tStylingKeyWithStatic)) {\n        // We are case when the `TStylingKey` contains static fields as well.\n        const staticKeyValueArray = tStylingKeyWithStatic;\n        tStylingKey = staticKeyValueArray[1]; // unwrap.\n        // We need to check if our key is present in the static so that we can mark it as duplicate.\n        if (tStylingKey === null ||\n            keyValueArrayIndexOf(staticKeyValueArray, tStylingKey) > 0) {\n            // tStylingKey is present in the statics, need to mark it as duplicate.\n            isKeyDuplicateOfStatic = true;\n        }\n    }\n    else {\n        tStylingKey = tStylingKeyWithStatic;\n    }\n    if (isHostBinding) {\n        // We are inserting host bindings\n        // If we don't have template bindings then `tail` is 0.\n        const hasTemplateBindings = tmplTail !== 0;\n        // This is important to know because that means that the `head` can't point to the first\n        // template bindings (there are none.) Instead the head points to the tail of the template.\n        if (hasTemplateBindings) {\n            // template head's \"prev\" will point to last host binding or to 0 if no host bindings yet\n            const previousNode = getTStylingRangePrev(tData[tmplHead + 1]);\n            tData[index + 1] = toTStylingRange(previousNode, tmplHead);\n            // if a host binding has already been registered, we need to update the next of that host\n            // binding to point to this one\n            if (previousNode !== 0) {\n                // We need to update the template-tail value to point to us.\n                tData[previousNode + 1] =\n                    setTStylingRangeNext(tData[previousNode + 1], index);\n            }\n            // The \"previous\" of the template binding head should point to this host binding\n            tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1], index);\n        }\n        else {\n            tData[index + 1] = toTStylingRange(tmplHead, 0);\n            // if a host binding has already been registered, we need to update the next of that host\n            // binding to point to this one\n            if (tmplHead !== 0) {\n                // We need to update the template-tail value to point to us.\n                tData[tmplHead + 1] = setTStylingRangeNext(tData[tmplHead + 1], index);\n            }\n            // if we don't have template, the head points to template-tail, and needs to be advanced.\n            tmplHead = index;\n        }\n    }\n    else {\n        // We are inserting in template section.\n        // We need to set this binding's \"previous\" to the current template tail\n        tData[index + 1] = toTStylingRange(tmplTail, 0);\n        ngDevMode &&\n            assertEqual(tmplHead !== 0 && tmplTail === 0, false, 'Adding template bindings after hostBindings is not allowed.');\n        if (tmplHead === 0) {\n            tmplHead = index;\n        }\n        else {\n            // We need to update the previous value \"next\" to point to this binding\n            tData[tmplTail + 1] = setTStylingRangeNext(tData[tmplTail + 1], index);\n        }\n        tmplTail = index;\n    }\n    // Now we need to update / compute the duplicates.\n    // Starting with our location search towards head (least priority)\n    if (isKeyDuplicateOfStatic) {\n        tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1]);\n    }\n    markDuplicates(tData, tStylingKey, index, true, isClassBinding);\n    markDuplicates(tData, tStylingKey, index, false, isClassBinding);\n    markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding);\n    tBindings = toTStylingRange(tmplHead, tmplTail);\n    if (isClassBinding) {\n        tNode.classBindings = tBindings;\n    }\n    else {\n        tNode.styleBindings = tBindings;\n    }\n}\n/**\n * Look into the residual styling to see if the current `tStylingKey` is duplicate of residual.\n *\n * @param tNode `TNode` where the residual is stored.\n * @param tStylingKey `TStylingKey` to store.\n * @param tData `TData` associated with the current `LView`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n *                       `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nfunction markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding) {\n    const residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles;\n    if (residual != null /* or undefined */ && typeof tStylingKey == 'string' &&\n        keyValueArrayIndexOf(residual, tStylingKey) >= 0) {\n        // We have duplicate in the residual so mark ourselves as duplicate.\n        tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1]);\n    }\n}\n/**\n * Marks `TStyleValue`s as duplicates if another style binding in the list has the same\n * `TStyleValue`.\n *\n * NOTE: this function is intended to be called twice once with `isPrevDir` set to `true` and once\n * with it set to `false` to search both the previous as well as next items in the list.\n *\n * No duplicate case\n * ```\n *   [style.color]\n *   [style.width.px] <<- index\n *   [style.height.px]\n * ```\n *\n * In the above case adding `[style.width.px]` to the existing `[style.color]` produces no\n * duplicates because `width` is not found in any other part of the linked list.\n *\n * Duplicate case\n * ```\n *   [style.color]\n *   [style.width.em]\n *   [style.width.px] <<- index\n * ```\n * In the above case adding `[style.width.px]` will produce a duplicate with `[style.width.em]`\n * because `width` is found in the chain.\n *\n * Map case 1\n * ```\n *   [style.width.px]\n *   [style.color]\n *   [style]  <<- index\n * ```\n * In the above case adding `[style]` will produce a duplicate with any other bindings because\n * `[style]` is a Map and as such is fully dynamic and could produce `color` or `width`.\n *\n * Map case 2\n * ```\n *   [style]\n *   [style.width.px]\n *   [style.color]  <<- index\n * ```\n * In the above case adding `[style.color]` will produce a duplicate because there is already a\n * `[style]` binding which is a Map and as such is fully dynamic and could produce `color` or\n * `width`.\n *\n * NOTE: Once `[style]` (Map) is added into the system all things are mapped as duplicates.\n * NOTE: We use `style` as example, but same logic is applied to `class`es as well.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tStylingKey `TStylingKeyPrimitive` which contains the value to compare to other keys in\n *        the linked list.\n * @param index Starting location in the linked list to search from\n * @param isPrevDir Direction.\n *        - `true` for previous (lower priority);\n *        - `false` for next (higher priority).\n */\nfunction markDuplicates(tData, tStylingKey, index, isPrevDir, isClassBinding) {\n    const tStylingAtIndex = tData[index + 1];\n    const isMap = tStylingKey === null;\n    let cursor = isPrevDir ? getTStylingRangePrev(tStylingAtIndex) : getTStylingRangeNext(tStylingAtIndex);\n    let foundDuplicate = false;\n    // We keep iterating as long as we have a cursor\n    // AND either:\n    // - we found what we are looking for, OR\n    // - we are a map in which case we have to continue searching even after we find what we were\n    //   looking for since we are a wild card and everything needs to be flipped to duplicate.\n    while (cursor !== 0 && (foundDuplicate === false || isMap)) {\n        ngDevMode && assertIndexInRange(tData, cursor);\n        const tStylingValueAtCursor = tData[cursor];\n        const tStyleRangeAtCursor = tData[cursor + 1];\n        if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) {\n            foundDuplicate = true;\n            tData[cursor + 1] = isPrevDir ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor) :\n                setTStylingRangePrevDuplicate(tStyleRangeAtCursor);\n        }\n        cursor = isPrevDir ? getTStylingRangePrev(tStyleRangeAtCursor) :\n            getTStylingRangeNext(tStyleRangeAtCursor);\n    }\n    if (foundDuplicate) {\n        // if we found a duplicate, than mark ourselves.\n        tData[index + 1] = isPrevDir ? setTStylingRangePrevDuplicate(tStylingAtIndex) :\n            setTStylingRangeNextDuplicate(tStylingAtIndex);\n    }\n}\n/**\n * Determines if two `TStylingKey`s are a match.\n *\n * When computing whether a binding contains a duplicate, we need to compare if the instruction\n * `TStylingKey` has a match.\n *\n * Here are examples of `TStylingKey`s which match given `tStylingKeyCursor` is:\n * - `color`\n *    - `color`    // Match another color\n *    - `null`     // That means that `tStylingKey` is a `classMap`/`styleMap` instruction\n *    - `['', 'color', 'other', true]` // wrapped `color` so match\n *    - `['', null, 'other', true]`       // wrapped `null` so match\n *    - `['', 'width', 'color', 'value']` // wrapped static value contains a match on `'color'`\n * - `null`       // `tStylingKeyCursor` always match as it is `classMap`/`styleMap` instruction\n *\n * @param tStylingKeyCursor\n * @param tStylingKey\n */\nfunction isStylingMatch(tStylingKeyCursor, tStylingKey) {\n    ngDevMode &&\n        assertNotEqual(Array.isArray(tStylingKey), true, 'Expected that \\'tStylingKey\\' has been unwrapped');\n    if (tStylingKeyCursor === null || // If the cursor is `null` it means that we have map at that\n        // location so we must assume that we have a match.\n        tStylingKey == null || // If `tStylingKey` is `null` then it is a map therefor assume that it\n        // contains a match.\n        (Array.isArray(tStylingKeyCursor) ? tStylingKeyCursor[1] : tStylingKeyCursor) ===\n            tStylingKey // If the keys match explicitly than we are a match.\n    ) {\n        return true;\n    }\n    else if (Array.isArray(tStylingKeyCursor) && typeof tStylingKey === 'string') {\n        // if we did not find a match, but `tStylingKeyCursor` is `KeyValueArray` that means cursor has\n        // statics and we need to check those as well.\n        return keyValueArrayIndexOf(tStylingKeyCursor, tStylingKey) >=\n            0; // see if we are matching the key\n    }\n    return false;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Global state of the parser. (This makes parser non-reentrant, but that is not an issue)\nconst parserState = {\n    textEnd: 0,\n    key: 0,\n    keyEnd: 0,\n    value: 0,\n    valueEnd: 0,\n};\n/**\n * Retrieves the last parsed `key` of style.\n * @param text the text to substring the key from.\n */\nfunction getLastParsedKey(text) {\n    return text.substring(parserState.key, parserState.keyEnd);\n}\n/**\n * Retrieves the last parsed `value` of style.\n * @param text the text to substring the key from.\n */\nfunction getLastParsedValue(text) {\n    return text.substring(parserState.value, parserState.valueEnd);\n}\n/**\n * Initializes `className` string for parsing and parses the first token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n *   const key = getLastParsedKey();\n *   ...\n * }\n * ```\n * @param text `className` to parse\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nfunction parseClassName(text) {\n    resetParserState(text);\n    return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n/**\n * Parses next `className` token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n *   const key = getLastParsedKey();\n *   ...\n * }\n * ```\n *\n * @param text `className` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nfunction parseClassNameNext(text, index) {\n    const end = parserState.textEnd;\n    if (end === index) {\n        return -1;\n    }\n    index = parserState.keyEnd = consumeClassToken(text, parserState.key = index, end);\n    return consumeWhitespace(text, index, end);\n}\n/**\n * Initializes `cssText` string for parsing and parses the first key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n *   const key = getLastParsedKey();\n *   const value = getLastParsedValue();\n *   ...\n * }\n * ```\n * @param text `cssText` to parse\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nfunction parseStyle(text) {\n    resetParserState(text);\n    return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n/**\n * Parses the next `cssText` key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n *   const key = getLastParsedKey();\n *   const value = getLastParsedValue();\n *   ...\n * }\n *\n * @param text `cssText` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nfunction parseStyleNext(text, startIndex) {\n    const end = parserState.textEnd;\n    let index = parserState.key = consumeWhitespace(text, startIndex, end);\n    if (end === index) {\n        // we reached an end so just quit\n        return -1;\n    }\n    index = parserState.keyEnd = consumeStyleKey(text, index, end);\n    index = consumeSeparator(text, index, end, 58 /* COLON */);\n    index = parserState.value = consumeWhitespace(text, index, end);\n    index = parserState.valueEnd = consumeStyleValue(text, index, end);\n    return consumeSeparator(text, index, end, 59 /* SEMI_COLON */);\n}\n/**\n * Reset the global state of the styling parser.\n * @param text The styling text to parse.\n */\nfunction resetParserState(text) {\n    parserState.key = 0;\n    parserState.keyEnd = 0;\n    parserState.value = 0;\n    parserState.valueEnd = 0;\n    parserState.textEnd = text.length;\n}\n/**\n * Returns index of next non-whitespace character.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index of next non-whitespace character (May be the same as `start` if no whitespace at\n *          that location.)\n */\nfunction consumeWhitespace(text, startIndex, endIndex) {\n    while (startIndex < endIndex && text.charCodeAt(startIndex) <= 32 /* SPACE */) {\n        startIndex++;\n    }\n    return startIndex;\n}\n/**\n * Returns index of last char in class token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last char in class token.\n */\nfunction consumeClassToken(text, startIndex, endIndex) {\n    while (startIndex < endIndex && text.charCodeAt(startIndex) > 32 /* SPACE */) {\n        startIndex++;\n    }\n    return startIndex;\n}\n/**\n * Consumes all of the characters belonging to style key and token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style key character.\n */\nfunction consumeStyleKey(text, startIndex, endIndex) {\n    let ch;\n    while (startIndex < endIndex &&\n        ((ch = text.charCodeAt(startIndex)) === 45 /* DASH */ || ch === 95 /* UNDERSCORE */ ||\n            ((ch & -33 /* UPPER_CASE */) >= 65 /* A */ && (ch & -33 /* UPPER_CASE */) <= 90 /* Z */) ||\n            (ch >= 48 /* ZERO */ && ch <= 57 /* NINE */))) {\n        startIndex++;\n    }\n    return startIndex;\n}\n/**\n * Consumes all whitespace and the separator `:` after the style key.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after separator and surrounding whitespace.\n */\nfunction consumeSeparator(text, startIndex, endIndex, separator) {\n    startIndex = consumeWhitespace(text, startIndex, endIndex);\n    if (startIndex < endIndex) {\n        if (ngDevMode && text.charCodeAt(startIndex) !== separator) {\n            malformedStyleError(text, String.fromCharCode(separator), startIndex);\n        }\n        startIndex++;\n    }\n    return startIndex;\n}\n/**\n * Consumes style value honoring `url()` and `\"\"` text.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style value character.\n */\nfunction consumeStyleValue(text, startIndex, endIndex) {\n    let ch1 = -1; // 1st previous character\n    let ch2 = -1; // 2nd previous character\n    let ch3 = -1; // 3rd previous character\n    let i = startIndex;\n    let lastChIndex = i;\n    while (i < endIndex) {\n        const ch = text.charCodeAt(i++);\n        if (ch === 59 /* SEMI_COLON */) {\n            return lastChIndex;\n        }\n        else if (ch === 34 /* DOUBLE_QUOTE */ || ch === 39 /* SINGLE_QUOTE */) {\n            lastChIndex = i = consumeQuotedText(text, ch, i, endIndex);\n        }\n        else if (startIndex ===\n            i - 4 && // We have seen only 4 characters so far \"URL(\" (Ignore \"foo_URL()\")\n            ch3 === 85 /* U */ &&\n            ch2 === 82 /* R */ && ch1 === 76 /* L */ && ch === 40 /* OPEN_PAREN */) {\n            lastChIndex = i = consumeQuotedText(text, 41 /* CLOSE_PAREN */, i, endIndex);\n        }\n        else if (ch > 32 /* SPACE */) {\n            // if we have a non-whitespace character then capture its location\n            lastChIndex = i;\n        }\n        ch3 = ch2;\n        ch2 = ch1;\n        ch1 = ch & -33 /* UPPER_CASE */;\n    }\n    return lastChIndex;\n}\n/**\n * Consumes all of the quoted characters.\n *\n * @param text Text to scan\n * @param quoteCharCode CharCode of either `\"` or `'` quote or `)` for `url(...)`.\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after quoted characters.\n */\nfunction consumeQuotedText(text, quoteCharCode, startIndex, endIndex) {\n    let ch1 = -1; // 1st previous character\n    let index = startIndex;\n    while (index < endIndex) {\n        const ch = text.charCodeAt(index++);\n        if (ch == quoteCharCode && ch1 !== 92 /* BACK_SLASH */) {\n            return index;\n        }\n        if (ch == 92 /* BACK_SLASH */ && ch1 === 92 /* BACK_SLASH */) {\n            // two back slashes cancel each other out. For example `\"\\\\\"` should properly end the\n            // quotation. (It should not assume that the last `\"` is escaped.)\n            ch1 = 0;\n        }\n        else {\n            ch1 = ch;\n        }\n    }\n    throw ngDevMode ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex) :\n        new Error();\n}\nfunction malformedStyleError(text, expecting, index) {\n    ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');\n    throw throwError(`Malformed style at location ${index} in string '` + text.substring(0, index) + '[>>' +\n        text.substring(index, index + 1) + '<<]' + text.substr(index + 1) +\n        `'. Expecting '${expecting}'.`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Update a style binding on an element with the provided value.\n *\n * If the style value is falsy then it will be removed from the element\n * (or assigned a different value depending if there are any styles placed\n * on the element with `styleMap` or any static styles that are\n * present from when the element was created with `styling`).\n *\n * Note that the styling element is updated as part of `stylingApply`.\n *\n * @param prop A valid CSS property.\n * @param value New value to write (`null` or an empty string to remove).\n * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.\n *\n * Note that this will apply the provided style value to the host element if this function is called\n * within a host binding function.\n *\n * @codeGenApi\n */\nfunction ɵɵstyleProp(prop, value, suffix) {\n    checkStylingProperty(prop, value, suffix, false);\n    return ɵɵstyleProp;\n}\n/**\n * Update a class binding on an element with the provided value.\n *\n * This instruction is meant to handle the `[class.foo]=\"exp\"` case and,\n * therefore, the class binding itself must already be allocated using\n * `styling` within the creation block.\n *\n * @param prop A valid CSS class (only one).\n * @param value A true/false value which will turn the class on or off.\n *\n * Note that this will apply the provided class value to the host element if this function\n * is called within a host binding function.\n *\n * @codeGenApi\n */\nfunction ɵɵclassProp(className, value) {\n    checkStylingProperty(className, value, null, true);\n    return ɵɵclassProp;\n}\n/**\n * Update style bindings using an object literal on an element.\n *\n * This instruction is meant to apply styling via the `[style]=\"exp\"` template bindings.\n * When styles are applied to the element they will then be updated with respect to\n * any styles/classes set via `styleProp`. If any styles are set to falsy\n * then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n *\n * @param styles A key/value style map of the styles that will be applied to the given element.\n *        Any missing styles (that have already been applied to the element beforehand) will be\n *        removed (unset) from the element's styling.\n *\n * Note that this will apply the provided styleMap value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\nfunction ɵɵstyleMap(styles) {\n    checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false);\n}\n/**\n * Parse text as style and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵstyleMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nfunction styleStringParser(keyValueArray, text) {\n    for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) {\n        styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text));\n    }\n}\n/**\n * Update class bindings using an object literal or class-string on an element.\n *\n * This instruction is meant to apply styling via the `[class]=\"exp\"` template bindings.\n * When classes are applied to the element they will then be updated with\n * respect to any styles/classes set via `classProp`. If any\n * classes are set to falsy then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n * Note that this will the provided classMap value to the host element if this function is called\n * within a host binding.\n *\n * @param classes A key/value map or string of CSS classes that will be added to the\n *        given element. Any missing classes (that have already been applied to the element\n *        beforehand) will be removed (unset) from the element's list of CSS classes.\n *\n * @codeGenApi\n */\nfunction ɵɵclassMap(classes) {\n    checkStylingMap(keyValueArraySet, classStringParser, classes, true);\n}\n/**\n * Parse text as class and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵclassMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nfunction classStringParser(keyValueArray, text) {\n    for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n        keyValueArraySet(keyValueArray, getLastParsedKey(text), true);\n    }\n}\n/**\n * Common code between `ɵɵclassProp` and `ɵɵstyleProp`.\n *\n * @param prop property name.\n * @param value binding value.\n * @param suffix suffix for the property (e.g. `em` or `px`)\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction checkStylingProperty(prop, value, suffix, isClassBased) {\n    const lView = getLView();\n    const tView = getTView();\n    // Styling instructions use 2 slots per binding.\n    // 1. one for the value / TStylingKey\n    // 2. one for the intermittent-value / TStylingRange\n    const bindingIndex = incrementBindingIndex(2);\n    if (tView.firstUpdatePass) {\n        stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);\n    }\n    if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n        const tNode = tView.data[getSelectedIndex()];\n        updateStyling(tView, tNode, lView, lView[RENDERER], prop, lView[bindingIndex + 1] = normalizeSuffix(value, suffix), isClassBased, bindingIndex);\n    }\n}\n/**\n * Common code between `ɵɵclassMap` and `ɵɵstyleMap`.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n *        function so that `style` can be processed. This is done for tree shaking purposes.\n * @param stringParser Parser used to parse `value` if `string`. (Passed in as `style` and `class`\n *        have different parsers.)\n * @param value bound value from application\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction checkStylingMap(keyValueArraySet, stringParser, value, isClassBased) {\n    const tView = getTView();\n    const bindingIndex = incrementBindingIndex(2);\n    if (tView.firstUpdatePass) {\n        stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);\n    }\n    const lView = getLView();\n    if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n        // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n        // if so as not to read unnecessarily.\n        const tNode = tView.data[getSelectedIndex()];\n        if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) {\n            if (ngDevMode) {\n                // verify that if we are shadowing then `TData` is appropriately marked so that we skip\n                // processing this binding in styling resolution.\n                const tStylingKey = tView.data[bindingIndex];\n                assertEqual(Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey, false, 'Styling linked list shadow input should be marked as \\'false\\'');\n            }\n            // VE does not concatenate the static portion like we are doing here.\n            // Instead VE just ignores the static completely if dynamic binding is present.\n            // Because of locality we have already set the static portion because we don't know if there\n            // is a dynamic portion until later. If we would ignore the static portion it would look like\n            // the binding has removed it. This would confuse `[ngStyle]`/`[ngClass]` to do the wrong\n            // thing as it would think that the static portion was removed. For this reason we\n            // concatenate it so that `[ngStyle]`/`[ngClass]`  can continue to work on changed.\n            let staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;\n            ngDevMode && isClassBased === false && staticPrefix !== null &&\n                assertEqual(staticPrefix.endsWith(';'), true, 'Expecting static portion to end with \\';\\'');\n            if (staticPrefix !== null) {\n                // We want to make sure that falsy values of `value` become empty strings.\n                value = concatStringsWithSpace(staticPrefix, value ? value : '');\n            }\n            // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`.\n            // This takes over the `[style]` binding. (Same for `[class]`)\n            setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased);\n        }\n        else {\n            updateStylingMap(tView, tNode, lView, lView[RENDERER], lView[bindingIndex + 1], lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value), isClassBased, bindingIndex);\n        }\n    }\n}\n/**\n * Determines when the binding is in `hostBindings` section\n *\n * @param tView Current `TView`\n * @param bindingIndex index of binding which we would like if it is in `hostBindings`\n */\nfunction isInHostBindings(tView, bindingIndex) {\n    // All host bindings are placed after the expando section.\n    return bindingIndex >= tView.expandoStartIndex;\n}\n/**\n * Collects the necessary information to insert the binding into a linked list of style bindings\n * using `insertTStylingBinding`.\n *\n * @param tView `TView` where the binding linked list will be stored.\n * @param tStylingKey Property/key of the binding.\n * @param bindingIndex Index of binding associated with the `prop`\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction stylingFirstUpdatePass(tView, tStylingKey, bindingIndex, isClassBased) {\n    ngDevMode && assertFirstUpdatePass(tView);\n    const tData = tView.data;\n    if (tData[bindingIndex + 1] === null) {\n        // The above check is necessary because we don't clear first update pass until first successful\n        // (no exception) template execution. This prevents the styling instruction from double adding\n        // itself to the list.\n        // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n        // if so as not to read unnecessarily.\n        const tNode = tData[getSelectedIndex()];\n        ngDevMode && assertDefined(tNode, 'TNode expected');\n        const isHostBindings = isInHostBindings(tView, bindingIndex);\n        if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) {\n            // `tStylingKey === null` implies that we are either `[style]` or `[class]` binding.\n            // If there is a directive which uses `@Input('style')` or `@Input('class')` than\n            // we need to neutralize this binding since that directive is shadowing it.\n            // We turn this into a noop by setting the key to `false`\n            tStylingKey = false;\n        }\n        tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased);\n        insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased);\n    }\n}\n/**\n * Adds static styling information to the binding if applicable.\n *\n * The linked list of styles not only stores the list and keys, but also stores static styling\n * information on some of the keys. This function determines if the key should contain the styling\n * information and computes it.\n *\n * See `TStylingStatic` for more details.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey `TStylingKeyPrimitive` which may need to be wrapped into `TStylingKey`\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction wrapInStaticStylingKey(tData, tNode, stylingKey, isClassBased) {\n    const hostDirectiveDef = getCurrentDirectiveDef(tData);\n    let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n    if (hostDirectiveDef === null) {\n        // We are in template node.\n        // If template node already had styling instruction then it has already collected the static\n        // styling and there is no need to collect them again. We know that we are the first styling\n        // instruction because the `TNode.*Bindings` points to 0 (nothing has been inserted yet).\n        const isFirstStylingInstructionInTemplate = (isClassBased ? tNode.classBindings : tNode.styleBindings) === 0;\n        if (isFirstStylingInstructionInTemplate) {\n            // It would be nice to be able to get the statics from `mergeAttrs`, however, at this point\n            // they are already merged and it would not be possible to figure which property belongs where\n            // in the priority.\n            stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased);\n            stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased);\n            // We know that if we have styling binding in template we can't have residual.\n            residual = null;\n        }\n    }\n    else {\n        // We are in host binding node and there was no binding instruction in template node.\n        // This means that we need to compute the residual.\n        const directiveStylingLast = tNode.directiveStylingLast;\n        const isFirstStylingInstructionInHostBinding = directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;\n        if (isFirstStylingInstructionInHostBinding) {\n            stylingKey =\n                collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased);\n            if (residual === null) {\n                // - If `null` than either:\n                //    - Template styling instruction already ran and it has consumed the static\n                //      styling into its `TStylingKey` and so there is no need to update residual. Instead\n                //      we need to update the `TStylingKey` associated with the first template node\n                //      instruction. OR\n                //    - Some other styling instruction ran and determined that there are no residuals\n                let templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased);\n                if (templateStylingKey !== undefined && Array.isArray(templateStylingKey)) {\n                    // Only recompute if `templateStylingKey` had static values. (If no static value found\n                    // then there is nothing to do since this operation can only produce less static keys, not\n                    // more.)\n                    templateStylingKey = collectStylingFromDirectives(null, tData, tNode, templateStylingKey[1] /* unwrap previous statics */, isClassBased);\n                    templateStylingKey =\n                        collectStylingFromTAttrs(templateStylingKey, tNode.attrs, isClassBased);\n                    setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey);\n                }\n            }\n            else {\n                // We only need to recompute residual if it is not `null`.\n                // - If existing residual (implies there was no template styling). This means that some of\n                //   the statics may have moved from the residual to the `stylingKey` and so we have to\n                //   recompute.\n                // - If `undefined` this is the first time we are running.\n                residual = collectResidual(tData, tNode, isClassBased);\n            }\n        }\n    }\n    if (residual !== undefined) {\n        isClassBased ? (tNode.residualClasses = residual) : (tNode.residualStyles = residual);\n    }\n    return stylingKey;\n}\n/**\n * Retrieve the `TStylingKey` for the template styling instruction.\n *\n * This is needed since `hostBinding` styling instructions are inserted after the template\n * instruction. While the template instruction needs to update the residual in `TNode` the\n * `hostBinding` instructions need to update the `TStylingKey` of the template instruction because\n * the template instruction is downstream from the `hostBindings` instructions.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @return `TStylingKey` if found or `undefined` if not found.\n */\nfunction getTemplateHeadTStylingKey(tData, tNode, isClassBased) {\n    const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n    if (getTStylingRangeNext(bindings) === 0) {\n        // There does not seem to be a styling instruction in the `template`.\n        return undefined;\n    }\n    return tData[getTStylingRangePrev(bindings)];\n}\n/**\n * Update the `TStylingKey` of the first template instruction in `TNode`.\n *\n * Logically `hostBindings` styling instructions are of lower priority than that of the template.\n * However, they execute after the template styling instructions. This means that they get inserted\n * in front of the template styling instructions.\n *\n * If we have a template styling instruction and a new `hostBindings` styling instruction is\n * executed it means that it may need to steal static fields from the template instruction. This\n * method allows us to update the first template instruction `TStylingKey` with a new value.\n *\n * Assume:\n * ```\n * <div my-dir style=\"color: red\" [style.color]=\"tmplExp\"></div>\n *\n * @Directive({\n *   host: {\n *     'style': 'width: 100px',\n *     '[style.color]': 'dirExp',\n *   }\n * })\n * class MyDir {}\n * ```\n *\n * when `[style.color]=\"tmplExp\"` executes it creates this data structure.\n * ```\n *  ['', 'color', 'color', 'red', 'width', '100px'],\n * ```\n *\n * The reason for this is that the template instruction does not know if there are styling\n * instructions and must assume that there are none and must collect all of the static styling.\n * (both\n * `color' and 'width`)\n *\n * When `'[style.color]': 'dirExp',` executes we need to insert a new data into the linked list.\n * ```\n *  ['', 'color', 'width', '100px'],  // newly inserted\n *  ['', 'color', 'color', 'red', 'width', '100px'], // this is wrong\n * ```\n *\n * Notice that the template statics is now wrong as it incorrectly contains `width` so we need to\n * update it like so:\n * ```\n *  ['', 'color', 'width', '100px'],\n *  ['', 'color', 'color', 'red'],    // UPDATE\n * ```\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param tStylingKey New `TStylingKey` which is replacing the old one.\n */\nfunction setTemplateHeadTStylingKey(tData, tNode, isClassBased, tStylingKey) {\n    const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n    ngDevMode &&\n        assertNotEqual(getTStylingRangeNext(bindings), 0, 'Expecting to have at least one template styling binding.');\n    tData[getTStylingRangePrev(bindings)] = tStylingKey;\n}\n/**\n * Collect all static values after the current `TNode.directiveStylingLast` index.\n *\n * Collect the remaining styling information which has not yet been collected by an existing\n * styling instruction.\n *\n * @param tData `TData` where the `DirectiveDefs` are stored.\n * @param tNode `TNode` which contains the directive range.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectResidual(tData, tNode, isClassBased) {\n    let residual = undefined;\n    const directiveEnd = tNode.directiveEnd;\n    ngDevMode &&\n        assertNotEqual(tNode.directiveStylingLast, -1, 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.');\n    // We add `1 + tNode.directiveStart` because we need to skip the current directive (as we are\n    // collecting things after the last `hostBindings` directive which had a styling instruction.)\n    for (let i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {\n        const attrs = tData[i].hostAttrs;\n        residual = collectStylingFromTAttrs(residual, attrs, isClassBased);\n    }\n    return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased);\n}\n/**\n * Collect the static styling information with lower priority than `hostDirectiveDef`.\n *\n * (This is opposite of residual styling.)\n *\n * @param hostDirectiveDef `DirectiveDef` for which we want to collect lower priority static\n *        styling. (Or `null` if template styling)\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey Existing `TStylingKey` to update or wrap.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased) {\n    // We need to loop because there can be directives which have `hostAttrs` but don't have\n    // `hostBindings` so this loop catches up to the current directive..\n    let currentDirective = null;\n    const directiveEnd = tNode.directiveEnd;\n    let directiveStylingLast = tNode.directiveStylingLast;\n    if (directiveStylingLast === -1) {\n        directiveStylingLast = tNode.directiveStart;\n    }\n    else {\n        directiveStylingLast++;\n    }\n    while (directiveStylingLast < directiveEnd) {\n        currentDirective = tData[directiveStylingLast];\n        ngDevMode && assertDefined(currentDirective, 'expected to be defined');\n        stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased);\n        if (currentDirective === hostDirectiveDef)\n            break;\n        directiveStylingLast++;\n    }\n    if (hostDirectiveDef !== null) {\n        // we only advance the styling cursor if we are collecting data from host bindings.\n        // Template executes before host bindings and so if we would update the index,\n        // host bindings would not get their statics.\n        tNode.directiveStylingLast = directiveStylingLast;\n    }\n    return stylingKey;\n}\n/**\n * Convert `TAttrs` into `TStylingStatic`.\n *\n * @param stylingKey existing `TStylingKey` to update or wrap.\n * @param attrs `TAttributes` to process.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromTAttrs(stylingKey, attrs, isClassBased) {\n    const desiredMarker = isClassBased ? 1 /* Classes */ : 2 /* Styles */;\n    let currentMarker = -1 /* ImplicitAttributes */;\n    if (attrs !== null) {\n        for (let i = 0; i < attrs.length; i++) {\n            const item = attrs[i];\n            if (typeof item === 'number') {\n                currentMarker = item;\n            }\n            else {\n                if (currentMarker === desiredMarker) {\n                    if (!Array.isArray(stylingKey)) {\n                        stylingKey = stylingKey === undefined ? [] : ['', stylingKey];\n                    }\n                    keyValueArraySet(stylingKey, item, isClassBased ? true : attrs[++i]);\n                }\n            }\n        }\n    }\n    return stylingKey === undefined ? null : stylingKey;\n}\n/**\n * Convert user input to `KeyValueArray`.\n *\n * This function takes user input which could be `string`, Object literal, or iterable and converts\n * it into a consistent representation. The output of this is `KeyValueArray` (which is an array\n * where\n * even indexes contain keys and odd indexes contain values for those keys).\n *\n * The advantage of converting to `KeyValueArray` is that we can perform diff in an input\n * independent\n * way.\n * (ie we can compare `foo bar` to `['bar', 'baz'] and determine a set of changes which need to be\n * applied)\n *\n * The fact that `KeyValueArray` is sorted is very important because it allows us to compute the\n * difference in linear fashion without the need to allocate any additional data.\n *\n * For example if we kept this as a `Map` we would have to iterate over previous `Map` to determine\n * which values need to be deleted, over the new `Map` to determine additions, and we would have to\n * keep additional `Map` to keep track of duplicates or items which have not yet been visited.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n *        function so that `style` can be processed. This is done\n *        for tree shaking purposes.\n * @param stringParser The parser is passed in so that it will be tree shakable. See\n *        `styleStringParser` and `classStringParser`\n * @param value The value to parse/convert to `KeyValueArray`\n */\nfunction toStylingKeyValueArray(keyValueArraySet, stringParser, value) {\n    if (value == null /*|| value === undefined */ || value === '')\n        return EMPTY_ARRAY;\n    const styleKeyValueArray = [];\n    const unwrappedValue = unwrapSafeValue(value);\n    if (Array.isArray(unwrappedValue)) {\n        for (let i = 0; i < unwrappedValue.length; i++) {\n            keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);\n        }\n    }\n    else if (typeof unwrappedValue === 'object') {\n        for (const key in unwrappedValue) {\n            if (unwrappedValue.hasOwnProperty(key)) {\n                keyValueArraySet(styleKeyValueArray, key, unwrappedValue[key]);\n            }\n        }\n    }\n    else if (typeof unwrappedValue === 'string') {\n        stringParser(styleKeyValueArray, unwrappedValue);\n    }\n    else {\n        ngDevMode &&\n            throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue);\n    }\n    return styleKeyValueArray;\n}\n/**\n * Set a `value` for a `key`.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add.\n * @param value The value to set.\n */\nfunction styleKeyValueArraySet(keyValueArray, key, value) {\n    keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));\n}\n/**\n * Update map based styling.\n *\n * Map based styling could be anything which contains more than one binding. For example `string`,\n * or object literal. Dealing with all of these types would complicate the logic so\n * instead this function expects that the complex input is first converted into normalized\n * `KeyValueArray`. The advantage of normalization is that we get the values sorted, which makes it\n * very cheap to compute deltas between the previous and current value.\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param oldKeyValueArray Previous value represented as `KeyValueArray`\n * @param newKeyValueArray Current value represented as `KeyValueArray`\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStylingMap(tView, tNode, lView, renderer, oldKeyValueArray, newKeyValueArray, isClassBased, bindingIndex) {\n    if (oldKeyValueArray === NO_CHANGE) {\n        // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray.\n        oldKeyValueArray = EMPTY_ARRAY;\n    }\n    let oldIndex = 0;\n    let newIndex = 0;\n    let oldKey = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;\n    let newKey = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null;\n    while (oldKey !== null || newKey !== null) {\n        ngDevMode && assertLessThan(oldIndex, 999, 'Are we stuck in infinite loop?');\n        ngDevMode && assertLessThan(newIndex, 999, 'Are we stuck in infinite loop?');\n        const oldValue = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined;\n        const newValue = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined;\n        let setKey = null;\n        let setValue = undefined;\n        if (oldKey === newKey) {\n            // UPDATE: Keys are equal => new value is overwriting old value.\n            oldIndex += 2;\n            newIndex += 2;\n            if (oldValue !== newValue) {\n                setKey = newKey;\n                setValue = newValue;\n            }\n        }\n        else if (newKey === null || oldKey !== null && oldKey < newKey) {\n            // DELETE: oldKey key is missing or we did not find the oldKey in the newValue\n            // (because the keyValueArray is sorted and `newKey` is found later alphabetically).\n            // `\"background\" < \"color\"` so we need to delete `\"background\"` because it is not found in the\n            // new array.\n            oldIndex += 2;\n            setKey = oldKey;\n        }\n        else {\n            // CREATE: newKey's is earlier alphabetically than oldKey's (or no oldKey) => we have new key.\n            // `\"color\" > \"background\"` so we need to add `color` because it is in new array but not in\n            // old array.\n            ngDevMode && assertDefined(newKey, 'Expecting to have a valid key');\n            newIndex += 2;\n            setKey = newKey;\n            setValue = newValue;\n        }\n        if (setKey !== null) {\n            updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex);\n        }\n        oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null;\n        newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null;\n    }\n}\n/**\n * Update a simple (property name) styling.\n *\n * This function takes `prop` and updates the DOM to that value. The function takes the binding\n * value as well as binding priority into consideration to determine which value should be written\n * to DOM. (For example it may be determined that there is a higher priority overwrite which blocks\n * the DOM write, or if the value goes to `undefined` a lower priority overwrite may be consulted.)\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param prop Either style property name or a class name.\n * @param value Either style value for `prop` or `true`/`false` if `prop` is class.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStyling(tView, tNode, lView, renderer, prop, value, isClassBased, bindingIndex) {\n    if (!(tNode.type & 3 /* AnyRNode */)) {\n        // It is possible to have styling on non-elements (such as ng-container).\n        // This is rare, but it does happen. In such a case, just ignore the binding.\n        return;\n    }\n    const tData = tView.data;\n    const tRange = tData[bindingIndex + 1];\n    const higherPriorityValue = getTStylingRangeNextDuplicate(tRange) ?\n        findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased) :\n        undefined;\n    if (!isStylingValuePresent(higherPriorityValue)) {\n        // We don't have a next duplicate, or we did not find a duplicate value.\n        if (!isStylingValuePresent(value)) {\n            // We should delete current value or restore to lower priority value.\n            if (getTStylingRangePrevDuplicate(tRange)) {\n                // We have a possible prev duplicate, let's retrieve it.\n                value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased);\n            }\n        }\n        const rNode = getNativeByIndex(getSelectedIndex(), lView);\n        applyStyling(renderer, isClassBased, rNode, prop, value);\n    }\n}\n/**\n * Search for styling value with higher priority which is overwriting current value, or a\n * value of lower priority to which we should fall back if the value is `undefined`.\n *\n * When value is being applied at a location, related values need to be consulted.\n * - If there is a higher priority binding, we should be using that one instead.\n *   For example `<div  [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp1`\n *   requires that we check `exp2` to see if it is set to value other than `undefined`.\n * - If there is a lower priority binding and we are changing to `undefined`\n *   For example `<div  [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp2` to\n *   `undefined` requires that we check `exp1` (and static values) and use that as new value.\n *\n * NOTE: The styling stores two values.\n * 1. The raw value which came from the application is stored at `index + 0` location. (This value\n *    is used for dirty checking).\n * 2. The normalized value is stored at `index + 1`.\n *\n * @param tData `TData` used for traversing the priority.\n * @param tNode `TNode` to use for resolving static styling. Also controls search direction.\n *   - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n *      If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n *   - `null` search prev and go all the way to end. Return last value where\n *     `isStylingValuePresent(value)` is true.\n * @param lView `LView` used for retrieving the actual values.\n * @param prop Property which we are interested in.\n * @param index Starting index in the linked list of styling bindings where the search should start.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction findStylingValue(tData, tNode, lView, prop, index, isClassBased) {\n    // `TNode` to use for resolving static styling. Also controls search direction.\n    //   - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n    //      If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n    //   - `null` search prev and go all the way to end. Return last value where\n    //     `isStylingValuePresent(value)` is true.\n    const isPrevDirection = tNode === null;\n    let value = undefined;\n    while (index > 0) {\n        const rawKey = tData[index];\n        const containsStatics = Array.isArray(rawKey);\n        // Unwrap the key if we contain static values.\n        const key = containsStatics ? rawKey[1] : rawKey;\n        const isStylingMap = key === null;\n        let valueAtLViewIndex = lView[index + 1];\n        if (valueAtLViewIndex === NO_CHANGE) {\n            // In firstUpdatePass the styling instructions create a linked list of styling.\n            // On subsequent passes it is possible for a styling instruction to try to read a binding\n            // which\n            // has not yet executed. In that case we will find `NO_CHANGE` and we should assume that\n            // we have `undefined` (or empty array in case of styling-map instruction) instead. This\n            // allows the resolution to apply the value (which may later be overwritten when the\n            // binding actually executes.)\n            valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY : undefined;\n        }\n        let currentValue = isStylingMap ? keyValueArrayGet(valueAtLViewIndex, prop) :\n            key === prop ? valueAtLViewIndex : undefined;\n        if (containsStatics && !isStylingValuePresent(currentValue)) {\n            currentValue = keyValueArrayGet(rawKey, prop);\n        }\n        if (isStylingValuePresent(currentValue)) {\n            value = currentValue;\n            if (isPrevDirection) {\n                return value;\n            }\n        }\n        const tRange = tData[index + 1];\n        index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange);\n    }\n    if (tNode !== null) {\n        // in case where we are going in next direction AND we did not find anything, we need to\n        // consult residual styling\n        let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n        if (residual != null /** OR residual !=== undefined */) {\n            value = keyValueArrayGet(residual, prop);\n        }\n    }\n    return value;\n}\n/**\n * Determines if the binding value should be used (or if the value is 'undefined' and hence priority\n * resolution should be used.)\n *\n * @param value Binding style value.\n */\nfunction isStylingValuePresent(value) {\n    // Currently only `undefined` value is considered non-binding. That is `undefined` says I don't\n    // have an opinion as to what this binding should be and you should consult other bindings by\n    // priority to determine the valid value.\n    // This is extracted into a single function so that we have a single place to control this.\n    return value !== undefined;\n}\n/**\n * Normalizes and/or adds a suffix to the value.\n *\n * If value is `null`/`undefined` no suffix is added\n * @param value\n * @param suffix\n */\nfunction normalizeSuffix(value, suffix) {\n    if (value == null /** || value === undefined */) {\n        // do nothing\n    }\n    else if (typeof suffix === 'string') {\n        value = value + suffix;\n    }\n    else if (typeof value === 'object') {\n        value = stringify(unwrapSafeValue(value));\n    }\n    return value;\n}\n/**\n * Tests if the `TNode` has input shadow.\n *\n * An input shadow is when a directive steals (shadows) the input by using `@Input('style')` or\n * `@Input('class')` as input.\n *\n * @param tNode `TNode` which we would like to see if it has shadow.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction hasStylingInputShadow(tNode, isClassBased) {\n    return (tNode.flags & (isClassBased ? 16 /* hasClassInput */ : 32 /* hasStyleInput */)) !== 0;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Create static text node\n *\n * @param index Index of the node in the data array\n * @param value Static string value to write.\n *\n * @codeGenApi\n */\nfunction ɵɵtext(index, value = '') {\n    const lView = getLView();\n    const tView = getTView();\n    const adjustedIndex = index + HEADER_OFFSET;\n    ngDevMode &&\n        assertEqual(getBindingIndex(), tView.bindingStartIndex, 'text nodes should be created before any bindings');\n    ngDevMode && assertIndexInRange(lView, adjustedIndex);\n    const tNode = tView.firstCreatePass ?\n        getOrCreateTNode(tView, adjustedIndex, 1 /* Text */, value, null) :\n        tView.data[adjustedIndex];\n    const textNative = lView[adjustedIndex] = createTextNode(lView[RENDERER], value);\n    appendChild(tView, lView, textNative, tNode);\n    // Text nodes are self closing.\n    setCurrentTNode(tNode, false);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * Update text content with a lone bound value\n *\n * Used when a text node has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div>{{v0}}</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate(v0);\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate(v0) {\n    ɵɵtextInterpolate1('', v0, '');\n    return ɵɵtextInterpolate;\n}\n/**\n *\n * Update text content with single bound value surrounded by other text.\n *\n * Used when a text node has 1 interpolated value in it:\n *\n * ```html\n * <div>prefix{{v0}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate1('prefix', v0, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate1(prefix, v0, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation1(lView, prefix, v0, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate1;\n}\n/**\n *\n * Update text content with 2 bound values surrounded by other text.\n *\n * Used when a text node has 2 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate2(prefix, v0, i0, v1, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate2;\n}\n/**\n *\n * Update text content with 3 bound values surrounded by other text.\n *\n * Used when a text node has 3 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate3;\n}\n/**\n *\n * Update text content with 4 bound values surrounded by other text.\n *\n * Used when a text node has 4 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see ɵɵtextInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate4;\n}\n/**\n *\n * Update text content with 5 bound values surrounded by other text.\n *\n * Used when a text node has 5 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate5;\n}\n/**\n *\n * Update text content with 6 bound values surrounded by other text.\n *\n * Used when a text node has 6 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate6(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change. @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate6;\n}\n/**\n *\n * Update text content with 7 bound values surrounded by other text.\n *\n * Used when a text node has 7 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate7(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate7;\n}\n/**\n *\n * Update text content with 8 bound values surrounded by other text.\n *\n * Used when a text node has 8 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate8(\n *  'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate8;\n}\n/**\n * Update text content with 9 or more bound values other surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolateV(\n *  ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n *\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵtextInterpolateV(values) {\n    const lView = getLView();\n    const interpolated = interpolationV(lView, values);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolateV;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * Update an interpolated class on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate1(prefix, v0, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate2(prefix, v0, i0, v1, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate6(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate7(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate8(\n *  'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n * Update an interpolated class on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n *  class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolateV(\n *  ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolateV(values) {\n    const lView = getLView();\n    const interpolatedValue = interpolationV(lView, values);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * Update an interpolated style on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style=\"key: {{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate1(prefix, v0, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate2(prefix, v0, i0, v1, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate3(\n *     'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate4(\n *     'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate5(\n *     'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};\n *             key5: {{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate6(\n *    'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n *    'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n *             key6: {{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate7(\n *    'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n *    '; key6: ', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n *             key6: {{v6}}; key7: {{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate8(\n *    'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n *    '; key6: ', v6, '; key7: ', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n * Update an interpolated style on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n *  class=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n *         key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolateV(\n *    ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n *     '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolateV(values) {\n    const lView = getLView();\n    const interpolatedValue = interpolationV(lView, values);\n    ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * Update an interpolated style property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate1(prop, prefix, v0, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate1;\n}\n/**\n *\n * Update an interpolated style property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate2(prop, prefix, v0, i0, v1, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate2;\n}\n/**\n *\n * Update an interpolated style property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate3(prop, prefix, v0, i0, v1, i1, v2, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate3;\n}\n/**\n *\n * Update an interpolated style property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate4(prop, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate4;\n}\n/**\n *\n * Update an interpolated style property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate5(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate5;\n}\n/**\n *\n * Update an interpolated style property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate6(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate6;\n}\n/**\n *\n * Update an interpolated style property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate7(\n *    0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate7(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate7;\n}\n/**\n *\n * Update an interpolated style property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,\n * '-', v7, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate8(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate8;\n}\n/**\n * Update an interpolated style property on an element with 9 or more bound values surrounded by\n * text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n *  style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\">\n * </div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolateV(\n *  0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`..\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolateV(prop, values, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolationV(lView, values);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolateV;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Update a property on a host element. Only applies to native node properties, not inputs.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n *        renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nfunction ɵɵhostProperty(propName, value, sanitizer) {\n    const lView = getLView();\n    const bindingIndex = nextBindingIndex();\n    if (bindingUpdated(lView, bindingIndex, value)) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, true);\n        ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n    }\n    return ɵɵhostProperty;\n}\n/**\n * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in\n * the component's renderer. Normally all host bindings are evaluated with the parent\n * component's renderer, but, in the case of animation @triggers, they need to be\n * evaluated with the sub component's renderer (because that's where the animation\n * triggers are defined).\n *\n * Do not use this instruction as a replacement for `elementProperty`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param index The index of the element to update in the data array\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n *        renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n *\n * @codeGenApi\n */\nfunction ɵɵsyntheticHostProperty(propName, value, sanitizer) {\n    const lView = getLView();\n    const bindingIndex = nextBindingIndex();\n    if (bindingUpdated(lView, bindingIndex, value)) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        const currentDef = getCurrentDirectiveDef(tView.data);\n        const renderer = loadComponentRenderer(currentDef, tNode, lView);\n        elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, true);\n        ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n    }\n    return ɵɵsyntheticHostProperty;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nif (typeof ngI18nClosureMode === 'undefined') {\n    // These property accesses can be ignored because ngI18nClosureMode will be set to false\n    // when optimizing code and the whole if statement will be dropped.\n    // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.\n    // NOTE: we need to have it in IIFE so that the tree-shaker is happy.\n    (function () {\n        // tslint:disable-next-line:no-toplevel-property-access\n        _global['ngI18nClosureMode'] =\n            // TODO(FW-1250): validate that this actually, you know, works.\n            // tslint:disable-next-line:no-toplevel-property-access\n            typeof goog !== 'undefined' && typeof goog.getMsg === 'function';\n    })();\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\nfunction plural(n) {\n    const i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\\.?/, '').length;\n    if (i === 1 && v === 0)\n        return 1;\n    return 5;\n}\nvar localeEn = [\"en\", [[\"a\", \"p\"], [\"AM\", \"PM\"], u], [[\"AM\", \"PM\"], u, u], [[\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"], [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"], [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"], [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"]], u, [[\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"], [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"], [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]], u, [[\"B\", \"A\"], [\"BC\", \"AD\"], [\"Before Christ\", \"Anno Domini\"]], 0, [6, 0], [\"M/d/yy\", \"MMM d, y\", \"MMMM d, y\", \"EEEE, MMMM d, y\"], [\"h:mm a\", \"h:mm:ss a\", \"h:mm:ss a z\", \"h:mm:ss a zzzz\"], [\"{1}, {0}\", u, \"{1} 'at' {0}\", u], [\".\", \",\", \";\", \"%\", \"+\", \"-\", \"E\", \"×\", \"‰\", \"∞\", \"NaN\", \":\"], [\"#,##0.###\", \"#,##0%\", \"¤#,##0.00\", \"#E0\"], \"USD\", \"$\", \"US Dollar\", {}, \"ltr\", plural];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This const is used to store the locale data registered with `registerLocaleData`\n */\nlet LOCALE_DATA = {};\n/**\n * Register locale data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n#i18n-pipes) to know how to import additional locale data.\n *\n * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1\n */\nfunction registerLocaleData(data, localeId, extraData) {\n    if (typeof localeId !== 'string') {\n        extraData = localeId;\n        localeId = data[LocaleDataIndex.LocaleId];\n    }\n    localeId = localeId.toLowerCase().replace(/_/g, '-');\n    LOCALE_DATA[localeId] = data;\n    if (extraData) {\n        LOCALE_DATA[localeId][LocaleDataIndex.ExtraData] = extraData;\n    }\n}\n/**\n * Finds the locale data for a given locale.\n *\n * @param locale The locale code.\n * @returns The locale data.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nfunction findLocaleData(locale) {\n    const normalizedLocale = normalizeLocale(locale);\n    let match = getLocaleData(normalizedLocale);\n    if (match) {\n        return match;\n    }\n    // let's try to find a parent locale\n    const parentLocale = normalizedLocale.split('-')[0];\n    match = getLocaleData(parentLocale);\n    if (match) {\n        return match;\n    }\n    if (parentLocale === 'en') {\n        return localeEn;\n    }\n    throw new Error(`Missing locale data for the locale \"${locale}\".`);\n}\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n */\nfunction getLocaleCurrencyCode(locale) {\n    const data = findLocaleData(locale);\n    return data[LocaleDataIndex.CurrencyCode] || null;\n}\n/**\n * Retrieves the plural function used by ICU expressions to determine the plural case to use\n * for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The plural function for the locale.\n * @see `NgPlural`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nfunction getLocalePluralCase(locale) {\n    const data = findLocaleData(locale);\n    return data[LocaleDataIndex.PluralCase];\n}\n/**\n * Helper function to get the given `normalizedLocale` from `LOCALE_DATA`\n * or from the global `ng.common.locale`.\n */\nfunction getLocaleData(normalizedLocale) {\n    if (!(normalizedLocale in LOCALE_DATA)) {\n        LOCALE_DATA[normalizedLocale] = _global.ng && _global.ng.common && _global.ng.common.locales &&\n            _global.ng.common.locales[normalizedLocale];\n    }\n    return LOCALE_DATA[normalizedLocale];\n}\n/**\n * Helper function to remove all the locale data from `LOCALE_DATA`.\n */\nfunction unregisterAllLocaleData() {\n    LOCALE_DATA = {};\n}\n/**\n * Index of each type of locale data from the locale data array\n */\nvar LocaleDataIndex;\n(function (LocaleDataIndex) {\n    LocaleDataIndex[LocaleDataIndex[\"LocaleId\"] = 0] = \"LocaleId\";\n    LocaleDataIndex[LocaleDataIndex[\"DayPeriodsFormat\"] = 1] = \"DayPeriodsFormat\";\n    LocaleDataIndex[LocaleDataIndex[\"DayPeriodsStandalone\"] = 2] = \"DayPeriodsStandalone\";\n    LocaleDataIndex[LocaleDataIndex[\"DaysFormat\"] = 3] = \"DaysFormat\";\n    LocaleDataIndex[LocaleDataIndex[\"DaysStandalone\"] = 4] = \"DaysStandalone\";\n    LocaleDataIndex[LocaleDataIndex[\"MonthsFormat\"] = 5] = \"MonthsFormat\";\n    LocaleDataIndex[LocaleDataIndex[\"MonthsStandalone\"] = 6] = \"MonthsStandalone\";\n    LocaleDataIndex[LocaleDataIndex[\"Eras\"] = 7] = \"Eras\";\n    LocaleDataIndex[LocaleDataIndex[\"FirstDayOfWeek\"] = 8] = \"FirstDayOfWeek\";\n    LocaleDataIndex[LocaleDataIndex[\"WeekendRange\"] = 9] = \"WeekendRange\";\n    LocaleDataIndex[LocaleDataIndex[\"DateFormat\"] = 10] = \"DateFormat\";\n    LocaleDataIndex[LocaleDataIndex[\"TimeFormat\"] = 11] = \"TimeFormat\";\n    LocaleDataIndex[LocaleDataIndex[\"DateTimeFormat\"] = 12] = \"DateTimeFormat\";\n    LocaleDataIndex[LocaleDataIndex[\"NumberSymbols\"] = 13] = \"NumberSymbols\";\n    LocaleDataIndex[LocaleDataIndex[\"NumberFormats\"] = 14] = \"NumberFormats\";\n    LocaleDataIndex[LocaleDataIndex[\"CurrencyCode\"] = 15] = \"CurrencyCode\";\n    LocaleDataIndex[LocaleDataIndex[\"CurrencySymbol\"] = 16] = \"CurrencySymbol\";\n    LocaleDataIndex[LocaleDataIndex[\"CurrencyName\"] = 17] = \"CurrencyName\";\n    LocaleDataIndex[LocaleDataIndex[\"Currencies\"] = 18] = \"Currencies\";\n    LocaleDataIndex[LocaleDataIndex[\"Directionality\"] = 19] = \"Directionality\";\n    LocaleDataIndex[LocaleDataIndex[\"PluralCase\"] = 20] = \"PluralCase\";\n    LocaleDataIndex[LocaleDataIndex[\"ExtraData\"] = 21] = \"ExtraData\";\n})(LocaleDataIndex || (LocaleDataIndex = {}));\n/**\n * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`.\n */\nfunction normalizeLocale(locale) {\n    return locale.toLowerCase().replace(/_/g, '-');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst pluralMapping = ['zero', 'one', 'two', 'few', 'many'];\n/**\n * Returns the plural case based on the locale\n */\nfunction getPluralCase(value, locale) {\n    const plural = getLocalePluralCase(locale)(parseInt(value, 10));\n    const result = pluralMapping[plural];\n    return (result !== undefined) ? result : 'other';\n}\n/**\n * The locale id that the application is using by default (for translations and ICU expressions).\n */\nconst DEFAULT_LOCALE_ID = 'en-US';\n/**\n * USD currency code that the application uses by default for CurrencyPipe when no\n * DEFAULT_CURRENCY_CODE is provided.\n */\nconst USD_CURRENCY_CODE = 'USD';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Marks that the next string is an element name.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nconst ELEMENT_MARKER = {\n    marker: 'element'\n};\n/**\n * Marks that the next string is comment text need for ICU.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nconst ICU_MARKER = {\n    marker: 'ICU'\n};\n/**\n * See `I18nCreateOpCodes`\n */\nvar I18nCreateOpCode;\n(function (I18nCreateOpCode) {\n    /**\n     * Number of bits to shift index so that it can be combined with the `APPEND_EAGERLY` and\n     * `COMMENT`.\n     */\n    I18nCreateOpCode[I18nCreateOpCode[\"SHIFT\"] = 2] = \"SHIFT\";\n    /**\n     * Should the node be appended to parent imedditatly after creation.\n     */\n    I18nCreateOpCode[I18nCreateOpCode[\"APPEND_EAGERLY\"] = 1] = \"APPEND_EAGERLY\";\n    /**\n     * If set the node should be comment (rather than a text) node.\n     */\n    I18nCreateOpCode[I18nCreateOpCode[\"COMMENT\"] = 2] = \"COMMENT\";\n})(I18nCreateOpCode || (I18nCreateOpCode = {}));\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$6 = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The locale id that the application is currently using (for translations and ICU expressions).\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nlet LOCALE_ID = DEFAULT_LOCALE_ID;\n/**\n * Sets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n *\n * @param localeId\n */\nfunction setLocaleId(localeId) {\n    assertDefined(localeId, `Expected localeId to be defined`);\n    if (typeof localeId === 'string') {\n        LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');\n    }\n}\n/**\n * Gets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nfunction getLocaleId() {\n    return LOCALE_ID;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Find a node in front of which `currentTNode` should be inserted (takes i18n into account).\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView) {\n    const tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex;\n    const insertBeforeIndex = Array.isArray(tNodeInsertBeforeIndex) ? tNodeInsertBeforeIndex[0] : tNodeInsertBeforeIndex;\n    if (insertBeforeIndex === null) {\n        return getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView);\n    }\n    else {\n        ngDevMode && assertIndexInRange(lView, insertBeforeIndex);\n        return unwrapRNode(lView[insertBeforeIndex]);\n    }\n}\n/**\n * Process `TNode.insertBeforeIndex` by adding i18n text nodes.\n *\n * See `TNode.insertBeforeIndex`\n */\nfunction processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRElement) {\n    const tNodeInsertBeforeIndex = childTNode.insertBeforeIndex;\n    if (Array.isArray(tNodeInsertBeforeIndex)) {\n        // An array indicates that there are i18n nodes that need to be added as children of this\n        // `childRNode`. These i18n nodes were created before this `childRNode` was available and so\n        // only now can be added. The first element of the array is the normal index where we should\n        // insert the `childRNode`. Additional elements are the extra nodes to be added as children of\n        // `childRNode`.\n        ngDevMode && assertDomNode(childRNode);\n        let i18nParent = childRNode;\n        let anchorRNode = null;\n        if (!(childTNode.type & 3 /* AnyRNode */)) {\n            anchorRNode = i18nParent;\n            i18nParent = parentRElement;\n        }\n        if (i18nParent !== null && (childTNode.flags & 2 /* isComponentHost */) === 0) {\n            for (let i = 1; i < tNodeInsertBeforeIndex.length; i++) {\n                // No need to `unwrapRNode` because all of the indexes point to i18n text nodes.\n                // see `assertDomNode` below.\n                const i18nChild = lView[tNodeInsertBeforeIndex[i]];\n                nativeInsertBefore(renderer, i18nParent, i18nChild, anchorRNode, false);\n            }\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Add `tNode` to `previousTNodes` list and update relevant `TNode`s in `previousTNodes` list\n * `tNode.insertBeforeIndex`.\n *\n * Things to keep in mind:\n * 1. All i18n text nodes are encoded as `TNodeType.Element` and are created eagerly by the\n *    `ɵɵi18nStart` instruction.\n * 2. All `TNodeType.Placeholder` `TNodes` are elements which will be created later by\n *    `ɵɵelementStart` instruction.\n * 3. `ɵɵelementStart` instruction will create `TNode`s in the ascending `TNode.index` order. (So a\n *    smaller index `TNode` is guaranteed to be created before a larger one)\n *\n * We use the above three invariants to determine `TNode.insertBeforeIndex`.\n *\n * In an ideal world `TNode.insertBeforeIndex` would always be `TNode.next.index`. However,\n * this will not work because `TNode.next.index` may be larger than `TNode.index` which means that\n * the next node is not yet created and therefore we can't insert in front of it.\n *\n * Rule1: `TNode.insertBeforeIndex = null` if `TNode.next === null` (Initial condition, as we don't\n *        know if there will be further `TNode`s inserted after.)\n * Rule2: If `previousTNode` is created after the `tNode` being inserted, then\n *        `previousTNode.insertBeforeNode = tNode.index` (So when a new `tNode` is added we check\n *        previous to see if we can update its `insertBeforeTNode`)\n *\n * See `TNode.insertBeforeIndex` for more context.\n *\n * @param previousTNodes A list of previous TNodes so that we can easily traverse `TNode`s in\n *     reverse order. (If `TNode` would have `previous` this would not be necessary.)\n * @param newTNode A TNode to add to the `previousTNodes` list.\n */\nfunction addTNodeAndUpdateInsertBeforeIndex(previousTNodes, newTNode) {\n    // Start with Rule1\n    ngDevMode &&\n        assertEqual(newTNode.insertBeforeIndex, null, 'We expect that insertBeforeIndex is not set');\n    previousTNodes.push(newTNode);\n    if (previousTNodes.length > 1) {\n        for (let i = previousTNodes.length - 2; i >= 0; i--) {\n            const existingTNode = previousTNodes[i];\n            // Text nodes are created eagerly and so they don't need their `indexBeforeIndex` updated.\n            // It is safe to ignore them.\n            if (!isI18nText(existingTNode)) {\n                if (isNewTNodeCreatedBefore(existingTNode, newTNode) &&\n                    getInsertBeforeIndex(existingTNode) === null) {\n                    // If it was created before us in time, (and it does not yet have `insertBeforeIndex`)\n                    // then add the `insertBeforeIndex`.\n                    setInsertBeforeIndex(existingTNode, newTNode.index);\n                }\n            }\n        }\n    }\n}\nfunction isI18nText(tNode) {\n    return !(tNode.type & 64 /* Placeholder */);\n}\nfunction isNewTNodeCreatedBefore(existingTNode, newTNode) {\n    return isI18nText(newTNode) || existingTNode.index > newTNode.index;\n}\nfunction getInsertBeforeIndex(tNode) {\n    const index = tNode.insertBeforeIndex;\n    return Array.isArray(index) ? index[0] : index;\n}\nfunction setInsertBeforeIndex(tNode, value) {\n    const index = tNode.insertBeforeIndex;\n    if (Array.isArray(index)) {\n        // Array is stored if we have to insert child nodes. See `TNode.insertBeforeIndex`\n        index[0] = value;\n    }\n    else {\n        setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n        tNode.insertBeforeIndex = value;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Retrieve `TIcu` at a given `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be read from.\n */\nfunction getTIcu(tView, index) {\n    const value = tView.data[index];\n    if (value === null || typeof value === 'string')\n        return null;\n    if (ngDevMode &&\n        !(value.hasOwnProperty('tViews') || value.hasOwnProperty('currentCaseLViewIndex'))) {\n        throwError('We expect to get \\'null\\'|\\'TIcu\\'|\\'TIcuContainer\\', but got: ' + value);\n    }\n    // Here the `value.hasOwnProperty('currentCaseLViewIndex')` is a polymorphic read as it can be\n    // either TIcu or TIcuContainerNode. This is not ideal, but we still think it is OK because it\n    // will be just two cases which fits into the browser inline cache (inline cache can take up to\n    // 4)\n    const tIcu = value.hasOwnProperty('currentCaseLViewIndex') ? value :\n        value.value;\n    ngDevMode && assertTIcu(tIcu);\n    return tIcu;\n}\n/**\n * Store `TIcu` at a give `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be stored at in `Tview.data`\n * @param tIcu The TIcu to store.\n */\nfunction setTIcu(tView, index, tIcu) {\n    const tNode = tView.data[index];\n    ngDevMode &&\n        assertEqual(tNode === null || tNode.hasOwnProperty('tViews'), true, 'We expect to get \\'null\\'|\\'TIcuContainer\\'');\n    if (tNode === null) {\n        tView.data[index] = tIcu;\n    }\n    else {\n        ngDevMode && assertTNodeType(tNode, 32 /* Icu */);\n        tNode.value = tIcu;\n    }\n}\n/**\n * Set `TNode.insertBeforeIndex` taking the `Array` into account.\n *\n * See `TNode.insertBeforeIndex`\n */\nfunction setTNodeInsertBeforeIndex(tNode, index) {\n    ngDevMode && assertTNode(tNode);\n    let insertBeforeIndex = tNode.insertBeforeIndex;\n    if (insertBeforeIndex === null) {\n        setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n        insertBeforeIndex = tNode.insertBeforeIndex =\n            [null /* may be updated to number later */, index];\n    }\n    else {\n        assertEqual(Array.isArray(insertBeforeIndex), true, 'Expecting array here');\n        insertBeforeIndex.push(index);\n    }\n}\n/**\n * Create `TNode.type=TNodeType.Placeholder` node.\n *\n * See `TNodeType.Placeholder` for more information.\n */\nfunction createTNodePlaceholder(tView, previousTNodes, index) {\n    const tNode = createTNodeAtIndex(tView, index, 64 /* Placeholder */, null, null);\n    addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode);\n    return tNode;\n}\n/**\n * Returns current ICU case.\n *\n * ICU cases are stored as index into the `TIcu.cases`.\n * At times it is necessary to communicate that the ICU case just switched and that next ICU update\n * should update all bindings regardless of the mask. In such a case the we store negative numbers\n * for cases which have just been switched. This function removes the negative flag.\n */\nfunction getCurrentICUCaseIndex(tIcu, lView) {\n    const currentCase = lView[tIcu.currentCaseLViewIndex];\n    return currentCase === null ? currentCase : (currentCase < 0 ? ~currentCase : currentCase);\n}\nfunction getParentFromIcuCreateOpCode(mergedCode) {\n    return mergedCode >>> 17 /* SHIFT_PARENT */;\n}\nfunction getRefFromIcuCreateOpCode(mergedCode) {\n    return (mergedCode & 131070 /* MASK_REF */) >>> 1 /* SHIFT_REF */;\n}\nfunction getInstructionFromIcuCreateOpCode(mergedCode) {\n    return mergedCode & 1 /* MASK_INSTRUCTION */;\n}\nfunction icuCreateOpCode(opCode, parentIdx, refIdx) {\n    ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index');\n    ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index');\n    return opCode | parentIdx << 17 /* SHIFT_PARENT */ | refIdx << 1 /* SHIFT_REF */;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * This is used to efficiently update expressions in i18n only when the corresponding input has\n * changed.\n *\n * 1) Each bit represents which of the `ɵɵi18nExp` has changed.\n * 2) There are 32 bits allowed in JS.\n * 3) Bit 32 is special as it is shared for all changes past 32. (In other words if you have more\n * than 32 `ɵɵi18nExp` then all changes past 32nd `ɵɵi18nExp` will be mapped to same bit. This means\n * that we may end up changing more than we need to. But i18n expressions with 32 bindings is rare\n * so in practice it should not be an issue.)\n */\nlet changeMask = 0b0;\n/**\n * Keeps track of which bit needs to be updated in `changeMask`\n *\n * This value gets incremented on every call to `ɵɵi18nExp`\n */\nlet changeMaskCounter = 0;\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * `setMaskBit` gets invoked by each call to `ɵɵi18nExp`.\n *\n * @param hasChange did `ɵɵi18nExp` detect a change.\n */\nfunction setMaskBit(hasChange) {\n    if (hasChange) {\n        changeMask = changeMask | (1 << Math.min(changeMaskCounter, 31));\n    }\n    changeMaskCounter++;\n}\nfunction applyI18n(tView, lView, index) {\n    if (changeMaskCounter > 0) {\n        ngDevMode && assertDefined(tView, `tView should be defined`);\n        const tI18n = tView.data[index];\n        // When `index` points to an `ɵɵi18nAttributes` then we have an array otherwise `TI18n`\n        const updateOpCodes = Array.isArray(tI18n) ? tI18n : tI18n.update;\n        const bindingsStartIndex = getBindingIndex() - changeMaskCounter - 1;\n        applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask);\n    }\n    // Reset changeMask & maskBit to default for the next update cycle\n    changeMask = 0b0;\n    changeMaskCounter = 0;\n}\n/**\n * Apply `I18nCreateOpCodes` op-codes as stored in `TI18n.create`.\n *\n * Creates text (and comment) nodes which are internationalized.\n *\n * @param lView Current lView\n * @param createOpCodes Set of op-codes to apply\n * @param parentRNode Parent node (so that direct children can be added eagerly) or `null` if it is\n *     a root node.\n * @param insertInFrontOf DOM node that should be used as an anchor.\n */\nfunction applyCreateOpCodes(lView, createOpCodes, parentRNode, insertInFrontOf) {\n    const renderer = lView[RENDERER];\n    for (let i = 0; i < createOpCodes.length; i++) {\n        const opCode = createOpCodes[i++];\n        const text = createOpCodes[i];\n        const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n        const appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n        const index = opCode >>> I18nCreateOpCode.SHIFT;\n        let rNode = lView[index];\n        if (rNode === null) {\n            // We only create new DOM nodes if they don't already exist: If ICU switches case back to a\n            // case which was already instantiated, no need to create new DOM nodes.\n            rNode = lView[index] =\n                isComment ? renderer.createComment(text) : createTextNode(renderer, text);\n        }\n        if (appendNow && parentRNode !== null) {\n            nativeInsertBefore(renderer, parentRNode, rNode, insertInFrontOf, false);\n        }\n    }\n}\n/**\n * Apply `I18nMutateOpCodes` OpCodes.\n *\n * @param tView Current `TView`\n * @param mutableOpCodes Mutable OpCodes to process\n * @param lView Current `LView`\n * @param anchorRNode place where the i18n node should be inserted.\n */\nfunction applyMutableOpCodes(tView, mutableOpCodes, lView, anchorRNode) {\n    ngDevMode && assertDomNode(anchorRNode);\n    const renderer = lView[RENDERER];\n    // `rootIdx` represents the node into which all inserts happen.\n    let rootIdx = null;\n    // `rootRNode` represents the real node into which we insert. This can be different from\n    // `lView[rootIdx]` if we have projection.\n    //  - null we don't have a parent (as can be the case in when we are inserting into a root of\n    //    LView which has no parent.)\n    //  - `RElement` The element representing the root after taking projection into account.\n    let rootRNode;\n    for (let i = 0; i < mutableOpCodes.length; i++) {\n        const opCode = mutableOpCodes[i];\n        if (typeof opCode == 'string') {\n            const textNodeIndex = mutableOpCodes[++i];\n            if (lView[textNodeIndex] === null) {\n                ngDevMode && ngDevMode.rendererCreateTextNode++;\n                ngDevMode && assertIndexInRange(lView, textNodeIndex);\n                lView[textNodeIndex] = createTextNode(renderer, opCode);\n            }\n        }\n        else if (typeof opCode == 'number') {\n            switch (opCode & 1 /* MASK_INSTRUCTION */) {\n                case 0 /* AppendChild */:\n                    const parentIdx = getParentFromIcuCreateOpCode(opCode);\n                    if (rootIdx === null) {\n                        // The first operation should save the `rootIdx` because the first operation\n                        // must insert into the root. (Only subsequent operations can insert into a dynamic\n                        // parent)\n                        rootIdx = parentIdx;\n                        rootRNode = nativeParentNode(renderer, anchorRNode);\n                    }\n                    let insertInFrontOf;\n                    let parentRNode;\n                    if (parentIdx === rootIdx) {\n                        insertInFrontOf = anchorRNode;\n                        parentRNode = rootRNode;\n                    }\n                    else {\n                        insertInFrontOf = null;\n                        parentRNode = unwrapRNode(lView[parentIdx]);\n                    }\n                    // FIXME(misko): Refactor with `processI18nText`\n                    if (parentRNode !== null) {\n                        // This can happen if the `LView` we are adding to is not attached to a parent `LView`.\n                        // In such a case there is no \"root\" we can attach to. This is fine, as we still need to\n                        // create the elements. When the `LView` gets later added to a parent these \"root\" nodes\n                        // get picked up and added.\n                        ngDevMode && assertDomNode(parentRNode);\n                        const refIdx = getRefFromIcuCreateOpCode(opCode);\n                        ngDevMode && assertGreaterThan(refIdx, HEADER_OFFSET, 'Missing ref');\n                        // `unwrapRNode` is not needed here as all of these point to RNodes as part of the i18n\n                        // which can't have components.\n                        const child = lView[refIdx];\n                        ngDevMode && assertDomNode(child);\n                        nativeInsertBefore(renderer, parentRNode, child, insertInFrontOf, false);\n                        const tIcu = getTIcu(tView, refIdx);\n                        if (tIcu !== null && typeof tIcu === 'object') {\n                            // If we just added a comment node which has ICU then that ICU may have already been\n                            // rendered and therefore we need to re-add it here.\n                            ngDevMode && assertTIcu(tIcu);\n                            const caseIndex = getCurrentICUCaseIndex(tIcu, lView);\n                            if (caseIndex !== null) {\n                                applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, lView[tIcu.anchorIdx]);\n                            }\n                        }\n                    }\n                    break;\n                case 1 /* Attr */:\n                    const elementNodeIndex = opCode >>> 1 /* SHIFT_REF */;\n                    const attrName = mutableOpCodes[++i];\n                    const attrValue = mutableOpCodes[++i];\n                    // This code is used for ICU expressions only, since we don't support\n                    // directives/components in ICUs, we don't need to worry about inputs here\n                    setElementAttribute(renderer, getNativeByIndex(elementNodeIndex, lView), null, null, attrName, attrValue, null);\n                    break;\n                default:\n                    throw new Error(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n            }\n        }\n        else {\n            switch (opCode) {\n                case ICU_MARKER:\n                    const commentValue = mutableOpCodes[++i];\n                    const commentNodeIndex = mutableOpCodes[++i];\n                    if (lView[commentNodeIndex] === null) {\n                        ngDevMode &&\n                            assertEqual(typeof commentValue, 'string', `Expected \"${commentValue}\" to be a comment node value`);\n                        ngDevMode && ngDevMode.rendererCreateComment++;\n                        ngDevMode && assertIndexInExpandoRange(lView, commentNodeIndex);\n                        const commentRNode = lView[commentNodeIndex] =\n                            createCommentNode(renderer, commentValue);\n                        // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n                        attachPatchData(commentRNode, lView);\n                    }\n                    break;\n                case ELEMENT_MARKER:\n                    const tagName = mutableOpCodes[++i];\n                    const elementNodeIndex = mutableOpCodes[++i];\n                    if (lView[elementNodeIndex] === null) {\n                        ngDevMode &&\n                            assertEqual(typeof tagName, 'string', `Expected \"${tagName}\" to be an element node tag name`);\n                        ngDevMode && ngDevMode.rendererCreateElement++;\n                        ngDevMode && assertIndexInExpandoRange(lView, elementNodeIndex);\n                        const elementRNode = lView[elementNodeIndex] =\n                            createElementNode(renderer, tagName, null);\n                        // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n                        attachPatchData(elementRNode, lView);\n                    }\n                    break;\n                default:\n                    ngDevMode &&\n                        throwError(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n            }\n        }\n    }\n}\n/**\n * Apply `I18nUpdateOpCodes` OpCodes\n *\n * @param tView Current `TView`\n * @param lView Current `LView`\n * @param updateOpCodes OpCodes to process\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param changeMask Each bit corresponds to a `ɵɵi18nExp` (Counting backwards from\n *     `bindingsStartIndex`)\n */\nfunction applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask) {\n    for (let i = 0; i < updateOpCodes.length; i++) {\n        // bit code to check if we should apply the next update\n        const checkBit = updateOpCodes[i];\n        // Number of opCodes to skip until next set of update codes\n        const skipCodes = updateOpCodes[++i];\n        if (checkBit & changeMask) {\n            // The value has been updated since last checked\n            let value = '';\n            for (let j = i + 1; j <= (i + skipCodes); j++) {\n                const opCode = updateOpCodes[j];\n                if (typeof opCode == 'string') {\n                    value += opCode;\n                }\n                else if (typeof opCode == 'number') {\n                    if (opCode < 0) {\n                        // Negative opCode represent `i18nExp` values offset.\n                        value += renderStringify(lView[bindingsStartIndex - opCode]);\n                    }\n                    else {\n                        const nodeIndex = (opCode >>> 2 /* SHIFT_REF */);\n                        switch (opCode & 3 /* MASK_OPCODE */) {\n                            case 1 /* Attr */:\n                                const propName = updateOpCodes[++j];\n                                const sanitizeFn = updateOpCodes[++j];\n                                const tNodeOrTagName = tView.data[nodeIndex];\n                                ngDevMode && assertDefined(tNodeOrTagName, 'Experting TNode or string');\n                                if (typeof tNodeOrTagName === 'string') {\n                                    // IF we don't have a `TNode`, then we are an element in ICU (as ICU content does\n                                    // not have TNode), in which case we know that there are no directives, and hence\n                                    // we use attribute setting.\n                                    setElementAttribute(lView[RENDERER], lView[nodeIndex], null, tNodeOrTagName, propName, value, sanitizeFn);\n                                }\n                                else {\n                                    elementPropertyInternal(tView, tNodeOrTagName, lView, propName, value, lView[RENDERER], sanitizeFn, false);\n                                }\n                                break;\n                            case 0 /* Text */:\n                                const rText = lView[nodeIndex];\n                                rText !== null && updateTextNode(lView[RENDERER], rText, value);\n                                break;\n                            case 2 /* IcuSwitch */:\n                                applyIcuSwitchCase(tView, getTIcu(tView, nodeIndex), lView, value);\n                                break;\n                            case 3 /* IcuUpdate */:\n                                applyIcuUpdateCase(tView, getTIcu(tView, nodeIndex), bindingsStartIndex, lView);\n                                break;\n                        }\n                    }\n                }\n            }\n        }\n        else {\n            const opCode = updateOpCodes[i + 1];\n            if (opCode > 0 && (opCode & 3 /* MASK_OPCODE */) === 3 /* IcuUpdate */) {\n                // Special case for the `icuUpdateCase`. It could be that the mask did not match, but\n                // we still need to execute `icuUpdateCase` because the case has changed recently due to\n                // previous `icuSwitchCase` instruction. (`icuSwitchCase` and `icuUpdateCase` always come in\n                // pairs.)\n                const nodeIndex = (opCode >>> 2 /* SHIFT_REF */);\n                const tIcu = getTIcu(tView, nodeIndex);\n                const currentIndex = lView[tIcu.currentCaseLViewIndex];\n                if (currentIndex < 0) {\n                    applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView);\n                }\n            }\n        }\n        i += skipCodes;\n    }\n}\n/**\n * Apply OpCodes associated with updating an existing ICU.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param lView Current `LView`\n */\nfunction applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView) {\n    ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex);\n    let activeCaseIndex = lView[tIcu.currentCaseLViewIndex];\n    if (activeCaseIndex !== null) {\n        let mask = changeMask;\n        if (activeCaseIndex < 0) {\n            // Clear the flag.\n            // Negative number means that the ICU was freshly created and we need to force the update.\n            activeCaseIndex = lView[tIcu.currentCaseLViewIndex] = ~activeCaseIndex;\n            // -1 is same as all bits on, which simulates creation since it marks all bits dirty\n            mask = -1;\n        }\n        applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask);\n    }\n}\n/**\n * Apply OpCodes associated with switching a case on ICU.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n * @param value Value of the case to update to.\n */\nfunction applyIcuSwitchCase(tView, tIcu, lView, value) {\n    // Rebuild a new case for this ICU\n    const caseIndex = getCaseIndex(tIcu, value);\n    let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n    if (activeCaseIndex !== caseIndex) {\n        applyIcuSwitchCaseRemove(tView, tIcu, lView);\n        lView[tIcu.currentCaseLViewIndex] = caseIndex === null ? null : ~caseIndex;\n        if (caseIndex !== null) {\n            // Add the nodes for the new case\n            const anchorRNode = lView[tIcu.anchorIdx];\n            if (anchorRNode) {\n                ngDevMode && assertDomNode(anchorRNode);\n                applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, anchorRNode);\n            }\n        }\n    }\n}\n/**\n * Apply OpCodes associated with tearing ICU case.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n */\nfunction applyIcuSwitchCaseRemove(tView, tIcu, lView) {\n    let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n    if (activeCaseIndex !== null) {\n        const removeCodes = tIcu.remove[activeCaseIndex];\n        for (let i = 0; i < removeCodes.length; i++) {\n            const nodeOrIcuIndex = removeCodes[i];\n            if (nodeOrIcuIndex > 0) {\n                // Positive numbers are `RNode`s.\n                const rNode = getNativeByIndex(nodeOrIcuIndex, lView);\n                rNode !== null && nativeRemoveNode(lView[RENDERER], rNode);\n            }\n            else {\n                // Negative numbers are ICUs\n                applyIcuSwitchCaseRemove(tView, getTIcu(tView, ~nodeOrIcuIndex), lView);\n            }\n        }\n    }\n}\n/**\n * Returns the index of the current case of an ICU expression depending on the main binding value\n *\n * @param icuExpression\n * @param bindingValue The value of the main binding used by this ICU expression\n */\nfunction getCaseIndex(icuExpression, bindingValue) {\n    let index = icuExpression.cases.indexOf(bindingValue);\n    if (index === -1) {\n        switch (icuExpression.type) {\n            case 1 /* plural */: {\n                const resolvedCase = getPluralCase(bindingValue, getLocaleId());\n                index = icuExpression.cases.indexOf(resolvedCase);\n                if (index === -1 && resolvedCase !== 'other') {\n                    index = icuExpression.cases.indexOf('other');\n                }\n                break;\n            }\n            case 0 /* select */: {\n                index = icuExpression.cases.indexOf('other');\n                break;\n            }\n        }\n    }\n    return index === -1 ? null : index;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction loadIcuContainerVisitor() {\n    const _stack = [];\n    let _index = -1;\n    let _lView;\n    let _removes;\n    /**\n     * Retrieves a set of root nodes from `TIcu.remove`. Used by `TNodeType.ICUContainer`\n     * to determine which root belong to the ICU.\n     *\n     * Example of usage.\n     * ```\n     * const nextRNode = icuContainerIteratorStart(tIcuContainerNode, lView);\n     * let rNode: RNode|null;\n     * while(rNode = nextRNode()) {\n     *   console.log(rNode);\n     * }\n     * ```\n     *\n     * @param tIcuContainerNode Current `TIcuContainerNode`\n     * @param lView `LView` where the `RNode`s should be looked up.\n     */\n    function icuContainerIteratorStart(tIcuContainerNode, lView) {\n        _lView = lView;\n        while (_stack.length)\n            _stack.pop();\n        ngDevMode && assertTNodeForLView(tIcuContainerNode, lView);\n        enterIcu(tIcuContainerNode.value, lView);\n        return icuContainerIteratorNext;\n    }\n    function enterIcu(tIcu, lView) {\n        _index = 0;\n        const currentCase = getCurrentICUCaseIndex(tIcu, lView);\n        if (currentCase !== null) {\n            ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1);\n            _removes = tIcu.remove[currentCase];\n        }\n        else {\n            _removes = EMPTY_ARRAY;\n        }\n    }\n    function icuContainerIteratorNext() {\n        if (_index < _removes.length) {\n            const removeOpCode = _removes[_index++];\n            ngDevMode && assertNumber(removeOpCode, 'Expecting OpCode number');\n            if (removeOpCode > 0) {\n                const rNode = _lView[removeOpCode];\n                ngDevMode && assertDomNode(rNode);\n                return rNode;\n            }\n            else {\n                _stack.push(_index, _removes);\n                // ICUs are represented by negative indices\n                const tIcuIndex = ~removeOpCode;\n                const tIcu = _lView[TVIEW].data[tIcuIndex];\n                ngDevMode && assertTIcu(tIcu);\n                enterIcu(tIcu, _lView);\n                return icuContainerIteratorNext();\n            }\n        }\n        else {\n            if (_stack.length === 0) {\n                return null;\n            }\n            else {\n                _removes = _stack.pop();\n                _index = _stack.pop();\n                return icuContainerIteratorNext();\n            }\n        }\n    }\n    return icuContainerIteratorStart;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nfunction i18nCreateOpCodesToString(opcodes) {\n    const createOpCodes = opcodes || (Array.isArray(this) ? this : []);\n    let lines = [];\n    for (let i = 0; i < createOpCodes.length; i++) {\n        const opCode = createOpCodes[i++];\n        const text = createOpCodes[i];\n        const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n        const appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n        const index = opCode >>> I18nCreateOpCode.SHIFT;\n        lines.push(`lView[${index}] = document.${isComment ? 'createComment' : 'createText'}(${JSON.stringify(text)});`);\n        if (appendNow) {\n            lines.push(`parent.appendChild(lView[${index}]);`);\n        }\n    }\n    return lines;\n}\n/**\n * Converts `I18nUpdateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nUpdateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nUpdateOpCodes` if attached as a method.\n * @param opcodes `I18nUpdateOpCodes` if invoked as a function.\n */\nfunction i18nUpdateOpCodesToString(opcodes) {\n    const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n    let lines = [];\n    function consumeOpCode(value) {\n        const ref = value >>> 2 /* SHIFT_REF */;\n        const opCode = value & 3 /* MASK_OPCODE */;\n        switch (opCode) {\n            case 0 /* Text */:\n                return `(lView[${ref}] as Text).textContent = $$$`;\n            case 1 /* Attr */:\n                const attrName = parser.consumeString();\n                const sanitizationFn = parser.consumeFunction();\n                const value = sanitizationFn ? `(${sanitizationFn})($$$)` : '$$$';\n                return `(lView[${ref}] as Element).setAttribute('${attrName}', ${value})`;\n            case 2 /* IcuSwitch */:\n                return `icuSwitchCase(${ref}, $$$)`;\n            case 3 /* IcuUpdate */:\n                return `icuUpdateCase(${ref})`;\n        }\n        throw new Error('unexpected OpCode');\n    }\n    while (parser.hasMore()) {\n        let mask = parser.consumeNumber();\n        let size = parser.consumeNumber();\n        const end = parser.i + size;\n        const statements = [];\n        let statement = '';\n        while (parser.i < end) {\n            let value = parser.consumeNumberOrString();\n            if (typeof value === 'string') {\n                statement += value;\n            }\n            else if (value < 0) {\n                // Negative numbers are ref indexes\n                // Here `i` refers to current binding index. It is to signify that the value is relative,\n                // rather than absolute.\n                statement += '${lView[i' + value + ']}';\n            }\n            else {\n                // Positive numbers are operations.\n                const opCodeText = consumeOpCode(value);\n                statements.push(opCodeText.replace('$$$', '`' + statement + '`') + ';');\n                statement = '';\n            }\n        }\n        lines.push(`if (mask & 0b${mask.toString(2)}) { ${statements.join(' ')} }`);\n    }\n    return lines;\n}\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nfunction icuCreateOpCodesToString(opcodes) {\n    const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n    let lines = [];\n    function consumeOpCode(opCode) {\n        const parent = getParentFromIcuCreateOpCode(opCode);\n        const ref = getRefFromIcuCreateOpCode(opCode);\n        switch (getInstructionFromIcuCreateOpCode(opCode)) {\n            case 0 /* AppendChild */:\n                return `(lView[${parent}] as Element).appendChild(lView[${lastRef}])`;\n            case 1 /* Attr */:\n                return `(lView[${ref}] as Element).setAttribute(\"${parser.consumeString()}\", \"${parser.consumeString()}\")`;\n        }\n        throw new Error('Unexpected OpCode: ' + getInstructionFromIcuCreateOpCode(opCode));\n    }\n    let lastRef = -1;\n    while (parser.hasMore()) {\n        let value = parser.consumeNumberStringOrMarker();\n        if (value === ICU_MARKER) {\n            const text = parser.consumeString();\n            lastRef = parser.consumeNumber();\n            lines.push(`lView[${lastRef}] = document.createComment(\"${text}\")`);\n        }\n        else if (value === ELEMENT_MARKER) {\n            const text = parser.consumeString();\n            lastRef = parser.consumeNumber();\n            lines.push(`lView[${lastRef}] = document.createElement(\"${text}\")`);\n        }\n        else if (typeof value === 'string') {\n            lastRef = parser.consumeNumber();\n            lines.push(`lView[${lastRef}] = document.createTextNode(\"${value}\")`);\n        }\n        else if (typeof value === 'number') {\n            const line = consumeOpCode(value);\n            line && lines.push(line);\n        }\n        else {\n            throw new Error('Unexpected value');\n        }\n    }\n    return lines;\n}\n/**\n * Converts `I18nRemoveOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nRemoveOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nRemoveOpCodes` if attached as a method.\n * @param opcodes `I18nRemoveOpCodes` if invoked as a function.\n */\nfunction i18nRemoveOpCodesToString(opcodes) {\n    const removeCodes = opcodes || (Array.isArray(this) ? this : []);\n    let lines = [];\n    for (let i = 0; i < removeCodes.length; i++) {\n        const nodeOrIcuIndex = removeCodes[i];\n        if (nodeOrIcuIndex > 0) {\n            // Positive numbers are `RNode`s.\n            lines.push(`remove(lView[${nodeOrIcuIndex}])`);\n        }\n        else {\n            // Negative numbers are ICUs\n            lines.push(`removeNestedICU(${~nodeOrIcuIndex})`);\n        }\n    }\n    return lines;\n}\nclass OpCodeParser {\n    constructor(codes) {\n        this.i = 0;\n        this.codes = codes;\n    }\n    hasMore() {\n        return this.i < this.codes.length;\n    }\n    consumeNumber() {\n        let value = this.codes[this.i++];\n        assertNumber(value, 'expecting number in OpCode');\n        return value;\n    }\n    consumeString() {\n        let value = this.codes[this.i++];\n        assertString(value, 'expecting string in OpCode');\n        return value;\n    }\n    consumeFunction() {\n        let value = this.codes[this.i++];\n        if (value === null || typeof value === 'function') {\n            return value;\n        }\n        throw new Error('expecting function in OpCode');\n    }\n    consumeNumberOrString() {\n        let value = this.codes[this.i++];\n        if (typeof value === 'string') {\n            return value;\n        }\n        assertNumber(value, 'expecting number or string in OpCode');\n        return value;\n    }\n    consumeNumberStringOrMarker() {\n        let value = this.codes[this.i++];\n        if (typeof value === 'string' || typeof value === 'number' || value == ICU_MARKER ||\n            value == ELEMENT_MARKER) {\n            return value;\n        }\n        assertNumber(value, 'expecting number, string, ICU_MARKER or ELEMENT_MARKER in OpCode');\n        return value;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst BINDING_REGEXP = /�(\\d+):?\\d*�/gi;\nconst ICU_REGEXP = /({\\s*�\\d+:?\\d*�\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\nconst NESTED_ICU = /�(\\d+)�/;\nconst ICU_BLOCK_REGEXP = /^\\s*(�\\d+:?\\d*�)\\s*,\\s*(select|plural)\\s*,/;\nconst MARKER = `�`;\nconst SUBTEMPLATE_REGEXP = /�\\/?\\*(\\d+:\\d+)�/gi;\nconst PH_REGEXP = /�(\\/?[#*]\\d+):?\\d*�/gi;\n/**\n * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:\n * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32\n * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space. We are re-implementing the same idea here, since translations\n * might contain this special character.\n */\nconst NGSP_UNICODE_REGEXP = /\\uE500/g;\nfunction replaceNgsp(value) {\n    return value.replace(NGSP_UNICODE_REGEXP, ' ');\n}\n/**\n * Create dynamic nodes from i18n translation block.\n *\n * - Text nodes are created synchronously\n * - TNodes are linked into tree lazily\n *\n * @param tView Current `TView`\n * @parentTNodeIndex index to the parent TNode of this i18n block\n * @param lView Current `LView`\n * @param index Index of `ɵɵi18nStart` instruction.\n * @param message Message to translate.\n * @param subTemplateIndex Index into the sub template of message translation. (ie in case of\n *     `ngIf`) (-1 otherwise)\n */\nfunction i18nStartFirstCreatePass(tView, parentTNodeIndex, lView, index, message, subTemplateIndex) {\n    const rootTNode = getCurrentParentTNode();\n    const createOpCodes = [];\n    const updateOpCodes = [];\n    const existingTNodeStack = [[]];\n    if (ngDevMode) {\n        attachDebugGetter(createOpCodes, i18nCreateOpCodesToString);\n        attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n    }\n    message = getTranslationForTemplate(message, subTemplateIndex);\n    const msgParts = replaceNgsp(message).split(PH_REGEXP);\n    for (let i = 0; i < msgParts.length; i++) {\n        let value = msgParts[i];\n        if ((i & 1) === 0) {\n            // Even indexes are text (including bindings & ICU expressions)\n            const parts = i18nParseTextIntoPartsAndICU(value);\n            for (let j = 0; j < parts.length; j++) {\n                let part = parts[j];\n                if ((j & 1) === 0) {\n                    // `j` is odd therefore `part` is string\n                    const text = part;\n                    ngDevMode && assertString(text, 'Parsed ICU part should be string');\n                    if (text !== '') {\n                        i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodeStack[0], createOpCodes, updateOpCodes, lView, text);\n                    }\n                }\n                else {\n                    // `j` is Even therefor `part` is an `ICUExpression`\n                    const icuExpression = part;\n                    // Verify that ICU expression has the right shape. Translations might contain invalid\n                    // constructions (while original messages were correct), so ICU parsing at runtime may\n                    // not succeed (thus `icuExpression` remains a string).\n                    // Note: we intentionally retain the error here by not using `ngDevMode`, because\n                    // the value can change based on the locale and users aren't guaranteed to hit\n                    // an invalid string while they're developing.\n                    if (typeof icuExpression !== 'object') {\n                        throw new Error(`Unable to parse ICU expression in \"${message}\" message.`);\n                    }\n                    const icuContainerTNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodeStack[0], lView, createOpCodes, ngDevMode ? `ICU ${index}:${icuExpression.mainBinding}` : '', true);\n                    const icuNodeIndex = icuContainerTNode.index;\n                    ngDevMode &&\n                        assertGreaterThanOrEqual(icuNodeIndex, HEADER_OFFSET, 'Index must be in absolute LView offset');\n                    icuStart(tView, lView, updateOpCodes, parentTNodeIndex, icuExpression, icuNodeIndex);\n                }\n            }\n        }\n        else {\n            // Odd indexes are placeholders (elements and sub-templates)\n            // At this point value is something like: '/#1:2' (originally coming from '�/#1:2�')\n            const isClosing = value.charCodeAt(0) === 47 /* SLASH */;\n            const type = value.charCodeAt(isClosing ? 1 : 0);\n            ngDevMode && assertOneOf(type, 42 /* STAR */, 35 /* HASH */);\n            const index = HEADER_OFFSET + Number.parseInt(value.substring((isClosing ? 2 : 1)));\n            if (isClosing) {\n                existingTNodeStack.shift();\n                setCurrentTNode(getCurrentParentTNode(), false);\n            }\n            else {\n                const tNode = createTNodePlaceholder(tView, existingTNodeStack[0], index);\n                existingTNodeStack.unshift([]);\n                setCurrentTNode(tNode, true);\n            }\n        }\n    }\n    tView.data[index] = {\n        create: createOpCodes,\n        update: updateOpCodes,\n    };\n}\n/**\n * Allocate space in i18n Range add create OpCode instruction to crete a text or comment node.\n *\n * @param tView Current `TView` needed to allocate space in i18n range.\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will be\n *     added as part of the `i18nStart` instruction or as part of the `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param lView Current `LView` needed to allocate space in i18n range.\n * @param createOpCodes Array storing `I18nCreateOpCodes` where new opCodes will be added.\n * @param text Text to be added when the `Text` or `Comment` node will be created.\n * @param isICU true if a `Comment` node for ICU (instead of `Text`) node should be created.\n */\nfunction createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, text, isICU) {\n    const i18nNodeIdx = allocExpando(tView, lView, 1, null);\n    let opCode = i18nNodeIdx << I18nCreateOpCode.SHIFT;\n    let parentTNode = getCurrentParentTNode();\n    if (rootTNode === parentTNode) {\n        // FIXME(misko): A null `parentTNode` should represent when we fall of the `LView` boundary.\n        // (there is no parent), but in some circumstances (because we are inconsistent about how we set\n        // `previousOrParentTNode`) it could point to `rootTNode` So this is a work around.\n        parentTNode = null;\n    }\n    if (parentTNode === null) {\n        // If we don't have a parent that means that we can eagerly add nodes.\n        // If we have a parent than these nodes can't be added now (as the parent has not been created\n        // yet) and instead the `parentTNode` is responsible for adding it. See\n        // `TNode.insertBeforeIndex`\n        opCode |= I18nCreateOpCode.APPEND_EAGERLY;\n    }\n    if (isICU) {\n        opCode |= I18nCreateOpCode.COMMENT;\n        ensureIcuContainerVisitorLoaded(loadIcuContainerVisitor);\n    }\n    createOpCodes.push(opCode, text === null ? '' : text);\n    // We store `{{?}}` so that when looking at debug `TNodeType.template` we can see where the\n    // bindings are.\n    const tNode = createTNodeAtIndex(tView, i18nNodeIdx, isICU ? 32 /* Icu */ : 1 /* Text */, text === null ? (ngDevMode ? '{{?}}' : '') : text, null);\n    addTNodeAndUpdateInsertBeforeIndex(existingTNodes, tNode);\n    const tNodeIdx = tNode.index;\n    setCurrentTNode(tNode, false /* Text nodes are self closing */);\n    if (parentTNode !== null && rootTNode !== parentTNode) {\n        // We are a child of deeper node (rather than a direct child of `i18nStart` instruction.)\n        // We have to make sure to add ourselves to the parent.\n        setTNodeInsertBeforeIndex(parentTNode, tNodeIdx);\n    }\n    return tNode;\n}\n/**\n * Processes text node in i18n block.\n *\n * Text nodes can have:\n * - Create instruction in `createOpCodes` for creating the text node.\n * - Allocate spec for text node in i18n range of `LView`\n * - If contains binding:\n *    - bindings => allocate space in i18n range of `LView` to store the binding value.\n *    - populate `updateOpCodes` with update instructions.\n *\n * @param tView Current `TView`\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will\n *     be added as part of the `i18nStart` instruction or as part of the\n *     `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param createOpCodes Location where the creation OpCodes will be stored.\n * @param lView Current `LView`\n * @param text The translated text (which may contain binding)\n */\nfunction i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodes, createOpCodes, updateOpCodes, lView, text) {\n    const hasBinding = text.match(BINDING_REGEXP);\n    const tNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, hasBinding ? null : text, false);\n    if (hasBinding) {\n        generateBindingUpdateOpCodes(updateOpCodes, text, tNode.index, null, 0, null);\n    }\n}\n/**\n * See `i18nAttributes` above.\n */\nfunction i18nAttributesFirstPass(tView, index, values) {\n    const previousElement = getCurrentTNode();\n    const previousElementIndex = previousElement.index;\n    const updateOpCodes = [];\n    if (ngDevMode) {\n        attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n    }\n    if (tView.firstCreatePass && tView.data[index] === null) {\n        for (let i = 0; i < values.length; i += 2) {\n            const attrName = values[i];\n            const message = values[i + 1];\n            if (message !== '') {\n                // Check if attribute value contains an ICU and throw an error if that's the case.\n                // ICUs in element attributes are not supported.\n                // Note: we intentionally retain the error here by not using `ngDevMode`, because\n                // the `value` can change based on the locale and users aren't guaranteed to hit\n                // an invalid string while they're developing.\n                if (ICU_REGEXP.test(message)) {\n                    throw new Error(`ICU expressions are not supported in attributes. Message: \"${message}\".`);\n                }\n                // i18n attributes that hit this code path are guaranteed to have bindings, because\n                // the compiler treats static i18n attributes as regular attribute bindings.\n                // Since this may not be the first i18n attribute on this element we need to pass in how\n                // many previous bindings there have already been.\n                generateBindingUpdateOpCodes(updateOpCodes, message, previousElementIndex, attrName, countBindings(updateOpCodes), null);\n            }\n        }\n        tView.data[index] = updateOpCodes;\n    }\n}\n/**\n * Generate the OpCodes to update the bindings of a string.\n *\n * @param updateOpCodes Place where the update opcodes will be stored.\n * @param str The string containing the bindings.\n * @param destinationNode Index of the destination node which will receive the binding.\n * @param attrName Name of the attribute, if the string belongs to an attribute.\n * @param sanitizeFn Sanitization function used to sanitize the string after update, if necessary.\n * @param bindingStart The lView index of the next expression that can be bound via an opCode.\n * @returns The mask value for these bindings\n */\nfunction generateBindingUpdateOpCodes(updateOpCodes, str, destinationNode, attrName, bindingStart, sanitizeFn) {\n    ngDevMode &&\n        assertGreaterThanOrEqual(destinationNode, HEADER_OFFSET, 'Index must be in absolute LView offset');\n    const maskIndex = updateOpCodes.length; // Location of mask\n    const sizeIndex = maskIndex + 1; // location of size for skipping\n    updateOpCodes.push(null, null); // Alloc space for mask and size\n    const startIndex = maskIndex + 2; // location of first allocation.\n    if (ngDevMode) {\n        attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n    }\n    const textParts = str.split(BINDING_REGEXP);\n    let mask = 0;\n    for (let j = 0; j < textParts.length; j++) {\n        const textValue = textParts[j];\n        if (j & 1) {\n            // Odd indexes are bindings\n            const bindingIndex = bindingStart + parseInt(textValue, 10);\n            updateOpCodes.push(-1 - bindingIndex);\n            mask = mask | toMaskBit(bindingIndex);\n        }\n        else if (textValue !== '') {\n            // Even indexes are text\n            updateOpCodes.push(textValue);\n        }\n    }\n    updateOpCodes.push(destinationNode << 2 /* SHIFT_REF */ |\n        (attrName ? 1 /* Attr */ : 0 /* Text */));\n    if (attrName) {\n        updateOpCodes.push(attrName, sanitizeFn);\n    }\n    updateOpCodes[maskIndex] = mask;\n    updateOpCodes[sizeIndex] = updateOpCodes.length - startIndex;\n    return mask;\n}\n/**\n * Count the number of bindings in the given `opCodes`.\n *\n * It could be possible to speed this up, by passing the number of bindings found back from\n * `generateBindingUpdateOpCodes()` to `i18nAttributesFirstPass()` but this would then require more\n * complexity in the code and/or transient objects to be created.\n *\n * Since this function is only called once when the template is instantiated, is trivial in the\n * first instance (since `opCodes` will be an empty array), and it is not common for elements to\n * contain multiple i18n bound attributes, it seems like this is a reasonable compromise.\n */\nfunction countBindings(opCodes) {\n    let count = 0;\n    for (let i = 0; i < opCodes.length; i++) {\n        const opCode = opCodes[i];\n        // Bindings are negative numbers.\n        if (typeof opCode === 'number' && opCode < 0) {\n            count++;\n        }\n    }\n    return count;\n}\n/**\n * Convert binding index to mask bit.\n *\n * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make\n * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to\n * have more than 32 bindings this will be hit very rarely. The downside of hitting this corner\n * case is that we will execute binding code more often than necessary. (penalty of performance)\n */\nfunction toMaskBit(bindingIndex) {\n    return 1 << Math.min(bindingIndex, 31);\n}\nfunction isRootTemplateMessage(subTemplateIndex) {\n    return subTemplateIndex === -1;\n}\n/**\n * Removes everything inside the sub-templates of a message.\n */\nfunction removeInnerTemplateTranslation(message) {\n    let match;\n    let res = '';\n    let index = 0;\n    let inTemplate = false;\n    let tagMatched;\n    while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) {\n        if (!inTemplate) {\n            res += message.substring(index, match.index + match[0].length);\n            tagMatched = match[1];\n            inTemplate = true;\n        }\n        else {\n            if (match[0] === `${MARKER}/*${tagMatched}${MARKER}`) {\n                index = match.index;\n                inTemplate = false;\n            }\n        }\n    }\n    ngDevMode &&\n        assertEqual(inTemplate, false, `Tag mismatch: unable to find the end of the sub-template in the translation \"${message}\"`);\n    res += message.substr(index);\n    return res;\n}\n/**\n * Extracts a part of a message and removes the rest.\n *\n * This method is used for extracting a part of the message associated with a template. A\n * translated message can span multiple templates.\n *\n * Example:\n * ```\n * <div i18n>Translate <span *ngIf>me</span>!</div>\n * ```\n *\n * @param message The message to crop\n * @param subTemplateIndex Index of the sub-template to extract. If undefined it returns the\n * external template and removes all sub-templates.\n */\nfunction getTranslationForTemplate(message, subTemplateIndex) {\n    if (isRootTemplateMessage(subTemplateIndex)) {\n        // We want the root template message, ignore all sub-templates\n        return removeInnerTemplateTranslation(message);\n    }\n    else {\n        // We want a specific sub-template\n        const start = message.indexOf(`:${subTemplateIndex}${MARKER}`) + 2 + subTemplateIndex.toString().length;\n        const end = message.search(new RegExp(`${MARKER}\\\\/\\\\*\\\\d+:${subTemplateIndex}${MARKER}`));\n        return removeInnerTemplateTranslation(message.substring(start, end));\n    }\n}\n/**\n * Generate the OpCodes for ICU expressions.\n *\n * @param icuExpression\n * @param index Index where the anchor is stored and an optional `TIcuContainerNode`\n *   - `lView[anchorIdx]` points to a `Comment` node representing the anchor for the ICU.\n *   - `tView.data[anchorIdx]` points to the `TIcuContainerNode` if ICU is root (`null` otherwise)\n */\nfunction icuStart(tView, lView, updateOpCodes, parentIdx, icuExpression, anchorIdx) {\n    ngDevMode && assertDefined(icuExpression, 'ICU expression must be defined');\n    let bindingMask = 0;\n    const tIcu = {\n        type: icuExpression.type,\n        currentCaseLViewIndex: allocExpando(tView, lView, 1, null),\n        anchorIdx,\n        cases: [],\n        create: [],\n        remove: [],\n        update: []\n    };\n    addUpdateIcuSwitch(updateOpCodes, icuExpression, anchorIdx);\n    setTIcu(tView, anchorIdx, tIcu);\n    const values = icuExpression.values;\n    for (let i = 0; i < values.length; i++) {\n        // Each value is an array of strings & other ICU expressions\n        const valueArr = values[i];\n        const nestedIcus = [];\n        for (let j = 0; j < valueArr.length; j++) {\n            const value = valueArr[j];\n            if (typeof value !== 'string') {\n                // It is an nested ICU expression\n                const icuIndex = nestedIcus.push(value) - 1;\n                // Replace nested ICU expression by a comment node\n                valueArr[j] = `<!--�${icuIndex}�-->`;\n            }\n        }\n        bindingMask = parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, icuExpression.cases[i], valueArr.join(''), nestedIcus) |\n            bindingMask;\n    }\n    if (bindingMask) {\n        addUpdateIcuUpdate(updateOpCodes, bindingMask, anchorIdx);\n    }\n}\n/**\n * Parses text containing an ICU expression and produces a JSON object for it.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern Text containing an ICU expression that needs to be parsed.\n *\n */\nfunction parseICUBlock(pattern) {\n    const cases = [];\n    const values = [];\n    let icuType = 1 /* plural */;\n    let mainBinding = 0;\n    pattern = pattern.replace(ICU_BLOCK_REGEXP, function (str, binding, type) {\n        if (type === 'select') {\n            icuType = 0 /* select */;\n        }\n        else {\n            icuType = 1 /* plural */;\n        }\n        mainBinding = parseInt(binding.substr(1), 10);\n        return '';\n    });\n    const parts = i18nParseTextIntoPartsAndICU(pattern);\n    // Looking for (key block)+ sequence. One of the keys has to be \"other\".\n    for (let pos = 0; pos < parts.length;) {\n        let key = parts[pos++].trim();\n        if (icuType === 1 /* plural */) {\n            // Key can be \"=x\", we just want \"x\"\n            key = key.replace(/\\s*(?:=)?(\\w+)\\s*/, '$1');\n        }\n        if (key.length) {\n            cases.push(key);\n        }\n        const blocks = i18nParseTextIntoPartsAndICU(parts[pos++]);\n        if (cases.length > values.length) {\n            values.push(blocks);\n        }\n    }\n    // TODO(ocombe): support ICU expressions in attributes, see #21615\n    return { type: icuType, mainBinding: mainBinding, cases, values };\n}\n/**\n * Breaks pattern into strings and top level {...} blocks.\n * Can be used to break a message into text and ICU expressions, or to break an ICU expression\n * into keys and cases. Original code from closure library, modified for Angular.\n *\n * @param pattern (sub)Pattern to be broken.\n * @returns An `Array<string|IcuExpression>` where:\n *   - odd positions: `string` => text between ICU expressions\n *   - even positions: `ICUExpression` => ICU expression parsed into `ICUExpression` record.\n */\nfunction i18nParseTextIntoPartsAndICU(pattern) {\n    if (!pattern) {\n        return [];\n    }\n    let prevPos = 0;\n    const braceStack = [];\n    const results = [];\n    const braces = /[{}]/g;\n    // lastIndex doesn't get set to 0 so we have to.\n    braces.lastIndex = 0;\n    let match;\n    while (match = braces.exec(pattern)) {\n        const pos = match.index;\n        if (match[0] == '}') {\n            braceStack.pop();\n            if (braceStack.length == 0) {\n                // End of the block.\n                const block = pattern.substring(prevPos, pos);\n                if (ICU_BLOCK_REGEXP.test(block)) {\n                    results.push(parseICUBlock(block));\n                }\n                else {\n                    results.push(block);\n                }\n                prevPos = pos + 1;\n            }\n        }\n        else {\n            if (braceStack.length == 0) {\n                const substring = pattern.substring(prevPos, pos);\n                results.push(substring);\n                prevPos = pos + 1;\n            }\n            braceStack.push('{');\n        }\n    }\n    const substring = pattern.substring(prevPos);\n    results.push(substring);\n    return results;\n}\n/**\n * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.\n *\n */\nfunction parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, caseName, unsafeCaseHtml, nestedIcus) {\n    const create = [];\n    const remove = [];\n    const update = [];\n    if (ngDevMode) {\n        attachDebugGetter(create, icuCreateOpCodesToString);\n        attachDebugGetter(remove, i18nRemoveOpCodesToString);\n        attachDebugGetter(update, i18nUpdateOpCodesToString);\n    }\n    tIcu.cases.push(caseName);\n    tIcu.create.push(create);\n    tIcu.remove.push(remove);\n    tIcu.update.push(update);\n    const inertBodyHelper = getInertBodyHelper(getDocument());\n    const inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeCaseHtml);\n    ngDevMode && assertDefined(inertBodyElement, 'Unable to generate inert body element');\n    const inertRootNode = getTemplateContent(inertBodyElement) || inertBodyElement;\n    if (inertRootNode) {\n        return walkIcuTree(tView, tIcu, lView, updateOpCodes, create, remove, update, inertRootNode, parentIdx, nestedIcus, 0);\n    }\n    else {\n        return 0;\n    }\n}\nfunction walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, parentNode, parentIdx, nestedIcus, depth) {\n    let bindingMask = 0;\n    let currentNode = parentNode.firstChild;\n    while (currentNode) {\n        const newIndex = allocExpando(tView, lView, 1, null);\n        switch (currentNode.nodeType) {\n            case Node.ELEMENT_NODE:\n                const element = currentNode;\n                const tagName = element.tagName.toLowerCase();\n                if (VALID_ELEMENTS.hasOwnProperty(tagName)) {\n                    addCreateNodeAndAppend(create, ELEMENT_MARKER, tagName, parentIdx, newIndex);\n                    tView.data[newIndex] = tagName;\n                    const elAttrs = element.attributes;\n                    for (let i = 0; i < elAttrs.length; i++) {\n                        const attr = elAttrs.item(i);\n                        const lowerAttrName = attr.name.toLowerCase();\n                        const hasBinding = !!attr.value.match(BINDING_REGEXP);\n                        // we assume the input string is safe, unless it's using a binding\n                        if (hasBinding) {\n                            if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {\n                                if (URI_ATTRS[lowerAttrName]) {\n                                    generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, _sanitizeUrl);\n                                }\n                                else if (SRCSET_ATTRS[lowerAttrName]) {\n                                    generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, sanitizeSrcset);\n                                }\n                                else {\n                                    generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, null);\n                                }\n                            }\n                            else {\n                                ngDevMode &&\n                                    console.warn(`WARNING: ignoring unsafe attribute value ` +\n                                        `${lowerAttrName} on element ${tagName} ` +\n                                        `(see https://g.co/ng/security#xss)`);\n                            }\n                        }\n                        else {\n                            addCreateAttribute(create, newIndex, attr);\n                        }\n                    }\n                    // Parse the children of this node (if any)\n                    bindingMask = walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, currentNode, newIndex, nestedIcus, depth + 1) |\n                        bindingMask;\n                    addRemoveNode(remove, newIndex, depth);\n                }\n                break;\n            case Node.TEXT_NODE:\n                const value = currentNode.textContent || '';\n                const hasBinding = value.match(BINDING_REGEXP);\n                addCreateNodeAndAppend(create, null, hasBinding ? '' : value, parentIdx, newIndex);\n                addRemoveNode(remove, newIndex, depth);\n                if (hasBinding) {\n                    bindingMask =\n                        generateBindingUpdateOpCodes(update, value, newIndex, null, 0, null) | bindingMask;\n                }\n                break;\n            case Node.COMMENT_NODE:\n                // Check if the comment node is a placeholder for a nested ICU\n                const isNestedIcu = NESTED_ICU.exec(currentNode.textContent || '');\n                if (isNestedIcu) {\n                    const nestedIcuIndex = parseInt(isNestedIcu[1], 10);\n                    const icuExpression = nestedIcus[nestedIcuIndex];\n                    // Create the comment node that will anchor the ICU expression\n                    addCreateNodeAndAppend(create, ICU_MARKER, ngDevMode ? `nested ICU ${nestedIcuIndex}` : '', parentIdx, newIndex);\n                    icuStart(tView, lView, sharedUpdateOpCodes, parentIdx, icuExpression, newIndex);\n                    addRemoveNestedIcu(remove, newIndex, depth);\n                }\n                break;\n        }\n        currentNode = currentNode.nextSibling;\n    }\n    return bindingMask;\n}\nfunction addRemoveNode(remove, index, depth) {\n    if (depth === 0) {\n        remove.push(index);\n    }\n}\nfunction addRemoveNestedIcu(remove, index, depth) {\n    if (depth === 0) {\n        remove.push(~index); // remove ICU at `index`\n        remove.push(index); // remove ICU comment at `index`\n    }\n}\nfunction addUpdateIcuSwitch(update, icuExpression, index) {\n    update.push(toMaskBit(icuExpression.mainBinding), 2, -1 - icuExpression.mainBinding, index << 2 /* SHIFT_REF */ | 2 /* IcuSwitch */);\n}\nfunction addUpdateIcuUpdate(update, bindingMask, index) {\n    update.push(bindingMask, 1, index << 2 /* SHIFT_REF */ | 3 /* IcuUpdate */);\n}\nfunction addCreateNodeAndAppend(create, marker, text, appendToParentIdx, createAtIdx) {\n    if (marker !== null) {\n        create.push(marker);\n    }\n    create.push(text, createAtIdx, icuCreateOpCode(0 /* AppendChild */, appendToParentIdx, createAtIdx));\n}\nfunction addCreateAttribute(create, newIndex, attr) {\n    create.push(newIndex << 1 /* SHIFT_REF */ | 1 /* Attr */, attr.name, attr.value);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// i18nPostprocess consts\nconst ROOT_TEMPLATE_ID = 0;\nconst PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]/;\nconst PP_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]|(�\\/?\\*\\d+:\\d+�)/g;\nconst PP_ICU_VARS_REGEXP = /({\\s*)(VAR_(PLURAL|SELECT)(_\\d+)?)(\\s*,)/g;\nconst PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g;\nconst PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\\d+)?)�/g;\nconst PP_CLOSE_TEMPLATE_REGEXP = /\\/\\*/;\nconst PP_TEMPLATE_ID_REGEXP = /\\d+\\:(\\d+)/;\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n *    in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nfunction i18nPostprocess(message, replacements = {}) {\n    /**\n     * Step 1: resolve all multi-value placeholders like [�#5�|�*1:1��#2:1�|�#4:1�]\n     *\n     * Note: due to the way we process nested templates (BFS), multi-value placeholders are typically\n     * grouped by templates, for example: [�#5�|�#6�|�#1:1�|�#3:2�] where �#5� and �#6� belong to root\n     * template, �#1:1� belong to nested template with index 1 and �#1:2� - nested template with index\n     * 3. However in real templates the order might be different: i.e. �#1:1� and/or �#3:2� may go in\n     * front of �#6�. The post processing step restores the right order by keeping track of the\n     * template id stack and looks for placeholders that belong to the currently active template.\n     */\n    let result = message;\n    if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {\n        const matches = {};\n        const templateIdsStack = [ROOT_TEMPLATE_ID];\n        result = result.replace(PP_PLACEHOLDERS_REGEXP, (m, phs, tmpl) => {\n            const content = phs || tmpl;\n            const placeholders = matches[content] || [];\n            if (!placeholders.length) {\n                content.split('|').forEach((placeholder) => {\n                    const match = placeholder.match(PP_TEMPLATE_ID_REGEXP);\n                    const templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;\n                    const isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder);\n                    placeholders.push([templateId, isCloseTemplateTag, placeholder]);\n                });\n                matches[content] = placeholders;\n            }\n            if (!placeholders.length) {\n                throw new Error(`i18n postprocess: unmatched placeholder - ${content}`);\n            }\n            const currentTemplateId = templateIdsStack[templateIdsStack.length - 1];\n            let idx = 0;\n            // find placeholder index that matches current template id\n            for (let i = 0; i < placeholders.length; i++) {\n                if (placeholders[i][0] === currentTemplateId) {\n                    idx = i;\n                    break;\n                }\n            }\n            // update template id stack based on the current tag extracted\n            const [templateId, isCloseTemplateTag, placeholder] = placeholders[idx];\n            if (isCloseTemplateTag) {\n                templateIdsStack.pop();\n            }\n            else if (currentTemplateId !== templateId) {\n                templateIdsStack.push(templateId);\n            }\n            // remove processed tag from the list\n            placeholders.splice(idx, 1);\n            return placeholder;\n        });\n    }\n    // return current result if no replacements specified\n    if (!Object.keys(replacements).length) {\n        return result;\n    }\n    /**\n     * Step 2: replace all ICU vars (like \"VAR_PLURAL\")\n     */\n    result = result.replace(PP_ICU_VARS_REGEXP, (match, start, key, _type, _idx, end) => {\n        return replacements.hasOwnProperty(key) ? `${start}${replacements[key]}${end}` : match;\n    });\n    /**\n     * Step 3: replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n     */\n    result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, (match, key) => {\n        return replacements.hasOwnProperty(key) ? replacements[key] : match;\n    });\n    /**\n     * Step 4: replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) in case\n     * multiple ICUs have the same placeholder name\n     */\n    result = result.replace(PP_ICUS_REGEXP, (match, key) => {\n        if (replacements.hasOwnProperty(key)) {\n            const list = replacements[key];\n            if (!list.length) {\n                throw new Error(`i18n postprocess: unmatched ICU - ${match} with key: ${key}`);\n            }\n            return list.shift();\n        }\n        return match;\n    });\n    return result;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Marks a block of text as translatable.\n *\n * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n *   interpolated into. The placeholder `index` points to the expression binding index. An optional\n *   `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*:  Marks the beginning\n *   and end of DOM element that were embedded in the original translation block. The placeholder\n *   `index` points to the element index in the template instructions set. An optional `block` that\n *   matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n *   split up and translated separately in each angular template function. The `index` points to the\n *   `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nfunction ɵɵi18nStart(index, messageIndex, subTemplateIndex = -1) {\n    const tView = getTView();\n    const lView = getLView();\n    const adjustedIndex = HEADER_OFFSET + index;\n    ngDevMode && assertDefined(tView, `tView should be defined`);\n    const message = getConstant(tView.consts, messageIndex);\n    const parentTNode = getCurrentParentTNode();\n    if (tView.firstCreatePass) {\n        i18nStartFirstCreatePass(tView, parentTNode === null ? 0 : parentTNode.index, lView, adjustedIndex, message, subTemplateIndex);\n    }\n    const tI18n = tView.data[adjustedIndex];\n    const sameViewParentTNode = parentTNode === lView[T_HOST] ? null : parentTNode;\n    const parentRNode = getClosestRElement(tView, sameViewParentTNode, lView);\n    // If `parentTNode` is an `ElementContainer` than it has `<!--ng-container--->`.\n    // When we do inserts we have to make sure to insert in front of `<!--ng-container--->`.\n    const insertInFrontOf = parentTNode && (parentTNode.type & 8 /* ElementContainer */) ?\n        lView[parentTNode.index] :\n        null;\n    applyCreateOpCodes(lView, tI18n.create, parentRNode, insertInFrontOf);\n    setInI18nBlock(true);\n}\n/**\n * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes\n * into the render tree, moves the placeholder nodes and removes the deleted nodes.\n *\n * @codeGenApi\n */\nfunction ɵɵi18nEnd() {\n    setInI18nBlock(false);\n}\n/**\n *\n * Use this instruction to create a translation block that doesn't contain any placeholder.\n * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.\n *\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n *   interpolated into. The placeholder `index` points to the expression binding index. An optional\n *   `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*:  Marks the beginning\n *   and end of DOM element that were embedded in the original translation block. The placeholder\n *   `index` points to the element index in the template instructions set. An optional `block` that\n *   matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n *   split up and translated separately in each angular template function. The `index` points to the\n *   `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nfunction ɵɵi18n(index, messageIndex, subTemplateIndex) {\n    ɵɵi18nStart(index, messageIndex, subTemplateIndex);\n    ɵɵi18nEnd();\n}\n/**\n * Marks a list of attributes as translatable.\n *\n * @param index A unique index in the static block\n * @param values\n *\n * @codeGenApi\n */\nfunction ɵɵi18nAttributes(index, attrsIndex) {\n    const tView = getTView();\n    ngDevMode && assertDefined(tView, `tView should be defined`);\n    const attrs = getConstant(tView.consts, attrsIndex);\n    i18nAttributesFirstPass(tView, index + HEADER_OFFSET, attrs);\n}\n/**\n * Stores the values of the bindings during each update cycle in order to determine if we need to\n * update the translated nodes.\n *\n * @param value The binding's value\n * @returns This function returns itself so that it may be chained\n * (e.g. `i18nExp(ctx.name)(ctx.title)`)\n *\n * @codeGenApi\n */\nfunction ɵɵi18nExp(value) {\n    const lView = getLView();\n    setMaskBit(bindingUpdated(lView, nextBindingIndex(), value));\n    return ɵɵi18nExp;\n}\n/**\n * Updates a translation block or an i18n attribute when the bindings have changed.\n *\n * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}\n * (i18n attribute) on which it should update the content.\n *\n * @codeGenApi\n */\nfunction ɵɵi18nApply(index) {\n    applyI18n(getTView(), getLView(), index + HEADER_OFFSET);\n}\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n *    in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nfunction ɵɵi18nPostprocess(message, replacements = {}) {\n    return i18nPostprocess(message, replacements);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Resolves the providers which are defined in the DirectiveDef.\n *\n * When inserting the tokens and the factories in their respective arrays, we can assume that\n * this method is called first for the component (if any), and then for other directives on the same\n * node.\n * As a consequence,the providers are always processed in that order:\n * 1) The view providers of the component\n * 2) The providers of the component\n * 3) The providers of the other directives\n * This matches the structure of the injectables arrays of a view (for each node).\n * So the tokens and the factories can be pushed at the end of the arrays, except\n * in one case for multi providers.\n *\n * @param def the directive definition\n * @param providers: Array of `providers`.\n * @param viewProviders: Array of `viewProviders`.\n */\nfunction providersResolver(def, providers, viewProviders) {\n    const tView = getTView();\n    if (tView.firstCreatePass) {\n        const isComponent = isComponentDef(def);\n        // The list of view providers is processed first, and the flags are updated\n        resolveProvider$1(viewProviders, tView.data, tView.blueprint, isComponent, true);\n        // Then, the list of providers is processed, and the flags are updated\n        resolveProvider$1(providers, tView.data, tView.blueprint, isComponent, false);\n    }\n}\n/**\n * Resolves a provider and publishes it to the DI system.\n */\nfunction resolveProvider$1(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) {\n    provider = resolveForwardRef(provider);\n    if (Array.isArray(provider)) {\n        // Recursively call `resolveProvider`\n        // Recursion is OK in this case because this code will not be in hot-path once we implement\n        // cloning of the initial state.\n        for (let i = 0; i < provider.length; i++) {\n            resolveProvider$1(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n        }\n    }\n    else {\n        const tView = getTView();\n        const lView = getLView();\n        let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n        let providerFactory = providerToFactory(provider);\n        const tNode = getCurrentTNode();\n        const beginIndex = tNode.providerIndexes & 1048575 /* ProvidersStartIndexMask */;\n        const endIndex = tNode.directiveStart;\n        const cptViewProvidersCount = tNode.providerIndexes >> 20 /* CptViewProvidersCountShift */;\n        if (isTypeProvider(provider) || !provider.multi) {\n            // Single provider case: the factory is created and pushed immediately\n            const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n            const existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);\n            if (existingFactoryIndex === -1) {\n                diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n                registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n                tInjectables.push(token);\n                tNode.directiveStart++;\n                tNode.directiveEnd++;\n                if (isViewProvider) {\n                    tNode.providerIndexes += 1048576 /* CptViewProvidersCountShifter */;\n                }\n                lInjectablesBlueprint.push(factory);\n                lView.push(factory);\n            }\n            else {\n                lInjectablesBlueprint[existingFactoryIndex] = factory;\n                lView[existingFactoryIndex] = factory;\n            }\n        }\n        else {\n            // Multi provider case:\n            // We create a multi factory which is going to aggregate all the values.\n            // Since the output of such a factory depends on content or view injection,\n            // we create two of them, which are linked together.\n            //\n            // The first one (for view providers) is always in the first block of the injectables array,\n            // and the second one (for providers) is always in the second block.\n            // This is important because view providers have higher priority. When a multi token\n            // is being looked up, the view providers should be found first.\n            // Note that it is not possible to have a multi factory in the third block (directive block).\n            //\n            // The algorithm to process multi providers is as follows:\n            // 1) If the multi provider comes from the `viewProviders` of the component:\n            //   a) If the special view providers factory doesn't exist, it is created and pushed.\n            //   b) Else, the multi provider is added to the existing multi factory.\n            // 2) If the multi provider comes from the `providers` of the component or of another\n            // directive:\n            //   a) If the multi factory doesn't exist, it is created and provider pushed into it.\n            //      It is also linked to the multi factory for view providers, if it exists.\n            //   b) Else, the multi provider is added to the existing multi factory.\n            const existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n            const existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n            const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 &&\n                lInjectablesBlueprint[existingProvidersFactoryIndex];\n            const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 &&\n                lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n            if (isViewProvider && !doesViewProvidersFactoryExist ||\n                !isViewProvider && !doesProvidersFactoryExist) {\n                // Cases 1.a and 2.a\n                diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n                const factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n                if (!isViewProvider && doesViewProvidersFactoryExist) {\n                    lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n                }\n                registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n                tInjectables.push(token);\n                tNode.directiveStart++;\n                tNode.directiveEnd++;\n                if (isViewProvider) {\n                    tNode.providerIndexes += 1048576 /* CptViewProvidersCountShifter */;\n                }\n                lInjectablesBlueprint.push(factory);\n                lView.push(factory);\n            }\n            else {\n                // Cases 1.b and 2.b\n                const indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex :\n                    existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n                registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex :\n                    existingViewProvidersFactoryIndex, indexInFactory);\n            }\n            if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n                lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;\n            }\n        }\n    }\n}\n/**\n * Registers the `ngOnDestroy` hook of a provider, if the provider supports destroy hooks.\n * @param tView `TView` in which to register the hook.\n * @param provider Provider whose hook should be registered.\n * @param contextIndex Index under which to find the context for the hook when it's being invoked.\n * @param indexInFactory Only required for `multi` providers. Index of the provider in the multi\n * provider factory.\n */\nfunction registerDestroyHooksIfSupported(tView, provider, contextIndex, indexInFactory) {\n    const providerIsTypeProvider = isTypeProvider(provider);\n    if (providerIsTypeProvider || isClassProvider(provider)) {\n        const prototype = (provider.useClass || provider).prototype;\n        const ngOnDestroy = prototype.ngOnDestroy;\n        if (ngOnDestroy) {\n            const hooks = tView.destroyHooks || (tView.destroyHooks = []);\n            if (!providerIsTypeProvider && provider.multi) {\n                ngDevMode &&\n                    assertDefined(indexInFactory, 'indexInFactory when registering multi factory destroy hook');\n                const existingCallbacksIndex = hooks.indexOf(contextIndex);\n                if (existingCallbacksIndex === -1) {\n                    hooks.push(contextIndex, [indexInFactory, ngOnDestroy]);\n                }\n                else {\n                    hooks[existingCallbacksIndex + 1].push(indexInFactory, ngOnDestroy);\n                }\n            }\n            else {\n                hooks.push(contextIndex, ngOnDestroy);\n            }\n        }\n    }\n}\n/**\n * Add a factory in a multi factory.\n * @returns Index at which the factory was inserted.\n */\nfunction multiFactoryAdd(multiFactory, factory, isComponentProvider) {\n    if (isComponentProvider) {\n        multiFactory.componentProviders++;\n    }\n    return multiFactory.multi.push(factory) - 1;\n}\n/**\n * Returns the index of item in the array, but only in the begin to end range.\n */\nfunction indexOf(item, arr, begin, end) {\n    for (let i = begin; i < end; i++) {\n        if (arr[i] === item)\n            return i;\n    }\n    return -1;\n}\n/**\n * Use this with `multi` `providers`.\n */\nfunction multiProvidersFactoryResolver(_, tData, lData, tNode) {\n    return multiResolve(this.multi, []);\n}\n/**\n * Use this with `multi` `viewProviders`.\n *\n * This factory knows how to concatenate itself with the existing `multi` `providers`.\n */\nfunction multiViewProvidersFactoryResolver(_, tData, lView, tNode) {\n    const factories = this.multi;\n    let result;\n    if (this.providerFactory) {\n        const componentCount = this.providerFactory.componentProviders;\n        const multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode);\n        // Copy the section of the array which contains `multi` `providers` from the component\n        result = multiProviders.slice(0, componentCount);\n        // Insert the `viewProvider` instances.\n        multiResolve(factories, result);\n        // Copy the section of the array which contains `multi` `providers` from other directives\n        for (let i = componentCount; i < multiProviders.length; i++) {\n            result.push(multiProviders[i]);\n        }\n    }\n    else {\n        result = [];\n        // Insert the `viewProvider` instances.\n        multiResolve(factories, result);\n    }\n    return result;\n}\n/**\n * Maps an array of factories into an array of values.\n */\nfunction multiResolve(factories, result) {\n    for (let i = 0; i < factories.length; i++) {\n        const factory = factories[i];\n        result.push(factory());\n    }\n    return result;\n}\n/**\n * Creates a multi factory.\n */\nfunction multiFactory(factoryFn, index, isViewProvider, isComponent, f) {\n    const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);\n    factory.multi = [];\n    factory.index = index;\n    factory.componentProviders = 0;\n    multiFactoryAdd(factory, f, isComponent && !isViewProvider);\n    return factory;\n}\n\n/**\n * This feature resolves the providers of a directive (or component),\n * and publish them into the DI system, making it visible to others for injection.\n *\n * For example:\n * ```ts\n * class ComponentWithProviders {\n *   constructor(private greeter: GreeterDE) {}\n *\n *   static ɵcmp = defineComponent({\n *     type: ComponentWithProviders,\n *     selectors: [['component-with-providers']],\n *    factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),\n *    decls: 1,\n *    vars: 1,\n *    template: function(fs: RenderFlags, ctx: ComponentWithProviders) {\n *      if (fs & RenderFlags.Create) {\n *        ɵɵtext(0);\n *      }\n *      if (fs & RenderFlags.Update) {\n *        ɵɵtextInterpolate(ctx.greeter.greet());\n *      }\n *    },\n *    features: [ɵɵProvidersFeature([GreeterDE])]\n *  });\n * }\n * ```\n *\n * @param definition\n *\n * @codeGenApi\n */\nfunction ɵɵProvidersFeature(providers, viewProviders = []) {\n    return (definition) => {\n        definition.providersResolver =\n            (def, processProvidersFn) => {\n                return providersResolver(def, //\n                processProvidersFn ? processProvidersFn(providers) : providers, //\n                viewProviders);\n            };\n    };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents a component created by a `ComponentFactory`.\n * Provides access to the component instance and related objects,\n * and provides the means of destroying the instance.\n *\n * @publicApi\n */\nclass ComponentRef {\n}\n/**\n * Base class for a factory that can create a component dynamically.\n * Instantiate a factory for a given type of component with `resolveComponentFactory()`.\n * Use the resulting `ComponentFactory.create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n *\n * @publicApi\n */\nclass ComponentFactory {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction noComponentFactoryError(component) {\n    const error = Error(`No component factory found for ${stringify(component)}. Did you add it to @NgModule.entryComponents?`);\n    error[ERROR_COMPONENT] = component;\n    return error;\n}\nconst ERROR_COMPONENT = 'ngComponent';\nfunction getComponent$1(error) {\n    return error[ERROR_COMPONENT];\n}\nclass _NullComponentFactoryResolver {\n    resolveComponentFactory(component) {\n        throw noComponentFactoryError(component);\n    }\n}\n/**\n * A simple registry that maps `Components` to generated `ComponentFactory` classes\n * that can be used to create instances of components.\n * Use to obtain the factory for a given component type,\n * then use the factory's `create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n * @see [Usage Example](guide/dynamic-component-loader#resolving-components)\n * @see <live-example name=\"dynamic-component-loader\" noDownload></live-example>\nof the code in this cookbook\n * @publicApi\n */\nclass ComponentFactoryResolver {\n}\nComponentFactoryResolver.NULL = new _NullComponentFactoryResolver();\nclass CodegenComponentFactoryResolver {\n    constructor(factories, _parent, _ngModule) {\n        this._parent = _parent;\n        this._ngModule = _ngModule;\n        this._factories = new Map();\n        for (let i = 0; i < factories.length; i++) {\n            const factory = factories[i];\n            this._factories.set(factory.componentType, factory);\n        }\n    }\n    resolveComponentFactory(component) {\n        let factory = this._factories.get(component);\n        if (!factory && this._parent) {\n            factory = this._parent.resolveComponentFactory(component);\n        }\n        if (!factory) {\n            throw noComponentFactoryError(component);\n        }\n        return new ComponentFactoryBoundToModule(factory, this._ngModule);\n    }\n}\nclass ComponentFactoryBoundToModule extends ComponentFactory {\n    constructor(factory, ngModule) {\n        super();\n        this.factory = factory;\n        this.ngModule = ngModule;\n        this.selector = factory.selector;\n        this.componentType = factory.componentType;\n        this.ngContentSelectors = factory.ngContentSelectors;\n        this.inputs = factory.inputs;\n        this.outputs = factory.outputs;\n    }\n    create(injector, projectableNodes, rootSelectorOrNode, ngModule) {\n        return this.factory.create(injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction noop(...args) {\n    // Do nothing.\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Creates an ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\nfunction injectElementRef() {\n    return createElementRef(getCurrentTNode(), getLView());\n}\n/**\n * Creates an ElementRef given a node.\n *\n * @param tNode The node for which you'd like an ElementRef\n * @param lView The view to which the node belongs\n * @returns The ElementRef instance to use\n */\nfunction createElementRef(tNode, lView) {\n    return new ElementRef(getNativeByTNode(tNode, lView));\n}\nconst SWITCH_ELEMENT_REF_FACTORY__POST_R3__ = injectElementRef;\nconst SWITCH_ELEMENT_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_ELEMENT_REF_FACTORY = SWITCH_ELEMENT_REF_FACTORY__POST_R3__;\n/**\n * A wrapper around a native element inside of a View.\n *\n * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM\n * element.\n *\n * @security Permitting direct access to the DOM can make your application more vulnerable to\n * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the\n * [Security Guide](https://g.co/ng/security).\n *\n * @publicApi\n */\n// Note: We don't expose things like `Injector`, `ViewContainer`, ... here,\n// i.e. users have to ask for what they need. With that, we can build better analysis tools\n// and could do better codegen in the future.\nclass ElementRef {\n    constructor(nativeElement) {\n        this.nativeElement = nativeElement;\n    }\n}\n/**\n * @internal\n * @nocollapse\n */\nElementRef.__NG_ELEMENT_ID__ = SWITCH_ELEMENT_REF_FACTORY;\n/**\n * Unwraps `ElementRef` and return the `nativeElement`.\n *\n * @param value value to unwrap\n * @returns `nativeElement` if `ElementRef` otherwise returns value as is.\n */\nfunction unwrapElementRef(value) {\n    return value instanceof ElementRef ? value.nativeElement : value;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');\n/**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\nclass RendererFactory2 {\n}\n/**\n * Extend this base class to implement custom rendering. By default, Angular\n * renders a template into DOM. You can use custom rendering to intercept\n * rendering calls, or to render to something other than DOM.\n *\n * Create your custom renderer using `RendererFactory2`.\n *\n * Use a custom renderer to bypass Angular's templating and\n * make custom UI changes that can't be expressed declaratively.\n * For example if you need to set a property or an attribute whose name is\n * not statically known, use the `setProperty()` or\n * `setAttribute()` method.\n *\n * @publicApi\n */\nclass Renderer2 {\n}\n/**\n * @internal\n * @nocollapse\n */\nRenderer2.__NG_ELEMENT_ID__ = () => SWITCH_RENDERER2_FACTORY();\nconst SWITCH_RENDERER2_FACTORY__POST_R3__ = injectRenderer2;\nconst SWITCH_RENDERER2_FACTORY__PRE_R3__ = noop;\nconst SWITCH_RENDERER2_FACTORY = SWITCH_RENDERER2_FACTORY__POST_R3__;\n/** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */\nfunction getOrCreateRenderer2(lView) {\n    const renderer = lView[RENDERER];\n    if (ngDevMode && !isProceduralRenderer(renderer)) {\n        throw new Error('Cannot inject Renderer2 when the application uses Renderer3!');\n    }\n    return renderer;\n}\n/** Injects a Renderer2 for the current component. */\nfunction injectRenderer2() {\n    // We need the Renderer to be based on the component that it's being injected into, however since\n    // DI happens before we've entered its view, `getLView` will return the parent view instead.\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    const nodeAtIndex = getComponentLViewByIndex(tNode.index, lView);\n    return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n * @publicApi\n */\nclass Sanitizer {\n}\n/** @nocollapse */\nSanitizer.ɵprov = ɵɵdefineInjectable({\n    token: Sanitizer,\n    providedIn: 'root',\n    factory: () => null,\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description Represents the version of Angular\n *\n * @publicApi\n */\nclass Version {\n    constructor(full) {\n        this.full = full;\n        this.major = full.split('.')[0];\n        this.minor = full.split('.')[1];\n        this.patch = full.split('.').slice(2).join('.');\n    }\n}\n/**\n * @publicApi\n */\nconst VERSION = new Version('12.2.5');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass DefaultIterableDifferFactory {\n    constructor() { }\n    supports(obj) {\n        return isListLikeIterable(obj);\n    }\n    create(trackByFn) {\n        return new DefaultIterableDiffer(trackByFn);\n    }\n}\nconst trackByIdentity = (index, item) => item;\nconst ɵ0$b = trackByIdentity;\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\nclass DefaultIterableDiffer {\n    constructor(trackByFn) {\n        this.length = 0;\n        // Keeps track of the used records at any point in time (during & across `_check()` calls)\n        this._linkedRecords = null;\n        // Keeps track of the removed records at any point in time during `_check()` calls.\n        this._unlinkedRecords = null;\n        this._previousItHead = null;\n        this._itHead = null;\n        this._itTail = null;\n        this._additionsHead = null;\n        this._additionsTail = null;\n        this._movesHead = null;\n        this._movesTail = null;\n        this._removalsHead = null;\n        this._removalsTail = null;\n        // Keeps track of records where custom track by is the same, but item identity has changed\n        this._identityChangesHead = null;\n        this._identityChangesTail = null;\n        this._trackByFn = trackByFn || trackByIdentity;\n    }\n    forEachItem(fn) {\n        let record;\n        for (record = this._itHead; record !== null; record = record._next) {\n            fn(record);\n        }\n    }\n    forEachOperation(fn) {\n        let nextIt = this._itHead;\n        let nextRemove = this._removalsHead;\n        let addRemoveOffset = 0;\n        let moveOffsets = null;\n        while (nextIt || nextRemove) {\n            // Figure out which is the next record to process\n            // Order: remove, add, move\n            const record = !nextRemove ||\n                nextIt &&\n                    nextIt.currentIndex <\n                        getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?\n                nextIt :\n                nextRemove;\n            const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n            const currentIndex = record.currentIndex;\n            // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n            if (record === nextRemove) {\n                addRemoveOffset--;\n                nextRemove = nextRemove._nextRemoved;\n            }\n            else {\n                nextIt = nextIt._next;\n                if (record.previousIndex == null) {\n                    addRemoveOffset++;\n                }\n                else {\n                    // INVARIANT:  currentIndex < previousIndex\n                    if (!moveOffsets)\n                        moveOffsets = [];\n                    const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n                    const localCurrentIndex = currentIndex - addRemoveOffset;\n                    if (localMovePreviousIndex != localCurrentIndex) {\n                        for (let i = 0; i < localMovePreviousIndex; i++) {\n                            const offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n                            const index = offset + i;\n                            if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n                                moveOffsets[i] = offset + 1;\n                            }\n                        }\n                        const previousIndex = record.previousIndex;\n                        moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n                    }\n                }\n            }\n            if (adjPreviousIndex !== currentIndex) {\n                fn(record, adjPreviousIndex, currentIndex);\n            }\n        }\n    }\n    forEachPreviousItem(fn) {\n        let record;\n        for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n            fn(record);\n        }\n    }\n    forEachAddedItem(fn) {\n        let record;\n        for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n            fn(record);\n        }\n    }\n    forEachMovedItem(fn) {\n        let record;\n        for (record = this._movesHead; record !== null; record = record._nextMoved) {\n            fn(record);\n        }\n    }\n    forEachRemovedItem(fn) {\n        let record;\n        for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n            fn(record);\n        }\n    }\n    forEachIdentityChange(fn) {\n        let record;\n        for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n            fn(record);\n        }\n    }\n    diff(collection) {\n        if (collection == null)\n            collection = [];\n        if (!isListLikeIterable(collection)) {\n            throw new Error(`Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`);\n        }\n        if (this.check(collection)) {\n            return this;\n        }\n        else {\n            return null;\n        }\n    }\n    onDestroy() { }\n    check(collection) {\n        this._reset();\n        let record = this._itHead;\n        let mayBeDirty = false;\n        let index;\n        let item;\n        let itemTrackBy;\n        if (Array.isArray(collection)) {\n            this.length = collection.length;\n            for (let index = 0; index < this.length; index++) {\n                item = collection[index];\n                itemTrackBy = this._trackByFn(index, item);\n                if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n                    record = this._mismatch(record, item, itemTrackBy, index);\n                    mayBeDirty = true;\n                }\n                else {\n                    if (mayBeDirty) {\n                        // TODO(misko): can we limit this to duplicates only?\n                        record = this._verifyReinsertion(record, item, itemTrackBy, index);\n                    }\n                    if (!Object.is(record.item, item))\n                        this._addIdentityChange(record, item);\n                }\n                record = record._next;\n            }\n        }\n        else {\n            index = 0;\n            iterateListLike(collection, (item) => {\n                itemTrackBy = this._trackByFn(index, item);\n                if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n                    record = this._mismatch(record, item, itemTrackBy, index);\n                    mayBeDirty = true;\n                }\n                else {\n                    if (mayBeDirty) {\n                        // TODO(misko): can we limit this to duplicates only?\n                        record = this._verifyReinsertion(record, item, itemTrackBy, index);\n                    }\n                    if (!Object.is(record.item, item))\n                        this._addIdentityChange(record, item);\n                }\n                record = record._next;\n                index++;\n            });\n            this.length = index;\n        }\n        this._truncate(record);\n        this.collection = collection;\n        return this.isDirty;\n    }\n    /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n     * changes.\n     */\n    get isDirty() {\n        return this._additionsHead !== null || this._movesHead !== null ||\n            this._removalsHead !== null || this._identityChangesHead !== null;\n    }\n    /**\n     * Reset the state of the change objects to show no changes. This means set previousKey to\n     * currentKey, and clear all of the queues (additions, moves, removals).\n     * Set the previousIndexes of moved and added items to their currentIndexes\n     * Reset the list of additions, moves and removals\n     *\n     * @internal\n     */\n    _reset() {\n        if (this.isDirty) {\n            let record;\n            for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n                record._nextPrevious = record._next;\n            }\n            for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n                record.previousIndex = record.currentIndex;\n            }\n            this._additionsHead = this._additionsTail = null;\n            for (record = this._movesHead; record !== null; record = record._nextMoved) {\n                record.previousIndex = record.currentIndex;\n            }\n            this._movesHead = this._movesTail = null;\n            this._removalsHead = this._removalsTail = null;\n            this._identityChangesHead = this._identityChangesTail = null;\n            // TODO(vicb): when assert gets supported\n            // assert(!this.isDirty);\n        }\n    }\n    /**\n     * This is the core function which handles differences between collections.\n     *\n     * - `record` is the record which we saw at this position last time. If null then it is a new\n     *   item.\n     * - `item` is the current item in the collection\n     * - `index` is the position of the item in the collection\n     *\n     * @internal\n     */\n    _mismatch(record, item, itemTrackBy, index) {\n        // The previous record after which we will append the current one.\n        let previousRecord;\n        if (record === null) {\n            previousRecord = this._itTail;\n        }\n        else {\n            previousRecord = record._prev;\n            // Remove the record from the collection since we know it does not match the item.\n            this._remove(record);\n        }\n        // See if we have evicted the item, which used to be at some anterior position of _itHead list.\n        record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n        if (record !== null) {\n            // It is an item which we have evicted earlier: reinsert it back into the list.\n            // But first we need to check if identity changed, so we can update in view if necessary.\n            if (!Object.is(record.item, item))\n                this._addIdentityChange(record, item);\n            this._reinsertAfter(record, previousRecord, index);\n        }\n        else {\n            // Attempt to see if the item is at some posterior position of _itHead list.\n            record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n            if (record !== null) {\n                // We have the item in _itHead at/after `index` position. We need to move it forward in the\n                // collection.\n                // But first we need to check if identity changed, so we can update in view if necessary.\n                if (!Object.is(record.item, item))\n                    this._addIdentityChange(record, item);\n                this._moveAfter(record, previousRecord, index);\n            }\n            else {\n                // It is a new item: add it.\n                record =\n                    this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);\n            }\n        }\n        return record;\n    }\n    /**\n     * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n     *\n     * Use case: `[a, a]` => `[b, a, a]`\n     *\n     * If we did not have this check then the insertion of `b` would:\n     *   1) evict first `a`\n     *   2) insert `b` at `0` index.\n     *   3) leave `a` at index `1` as is. <-- this is wrong!\n     *   3) reinsert `a` at index 2. <-- this is wrong!\n     *\n     * The correct behavior is:\n     *   1) evict first `a`\n     *   2) insert `b` at `0` index.\n     *   3) reinsert `a` at index 1.\n     *   3) move `a` at from `1` to `2`.\n     *\n     *\n     * Double check that we have not evicted a duplicate item. We need to check if the item type may\n     * have already been removed:\n     * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n     * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n     * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n     * at the end.\n     *\n     * @internal\n     */\n    _verifyReinsertion(record, item, itemTrackBy, index) {\n        let reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n        if (reinsertRecord !== null) {\n            record = this._reinsertAfter(reinsertRecord, record._prev, index);\n        }\n        else if (record.currentIndex != index) {\n            record.currentIndex = index;\n            this._addToMoves(record, index);\n        }\n        return record;\n    }\n    /**\n     * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n     *\n     * - `record` The first excess {@link IterableChangeRecord_}.\n     *\n     * @internal\n     */\n    _truncate(record) {\n        // Anything after that needs to be removed;\n        while (record !== null) {\n            const nextRecord = record._next;\n            this._addToRemovals(this._unlink(record));\n            record = nextRecord;\n        }\n        if (this._unlinkedRecords !== null) {\n            this._unlinkedRecords.clear();\n        }\n        if (this._additionsTail !== null) {\n            this._additionsTail._nextAdded = null;\n        }\n        if (this._movesTail !== null) {\n            this._movesTail._nextMoved = null;\n        }\n        if (this._itTail !== null) {\n            this._itTail._next = null;\n        }\n        if (this._removalsTail !== null) {\n            this._removalsTail._nextRemoved = null;\n        }\n        if (this._identityChangesTail !== null) {\n            this._identityChangesTail._nextIdentityChange = null;\n        }\n    }\n    /** @internal */\n    _reinsertAfter(record, prevRecord, index) {\n        if (this._unlinkedRecords !== null) {\n            this._unlinkedRecords.remove(record);\n        }\n        const prev = record._prevRemoved;\n        const next = record._nextRemoved;\n        if (prev === null) {\n            this._removalsHead = next;\n        }\n        else {\n            prev._nextRemoved = next;\n        }\n        if (next === null) {\n            this._removalsTail = prev;\n        }\n        else {\n            next._prevRemoved = prev;\n        }\n        this._insertAfter(record, prevRecord, index);\n        this._addToMoves(record, index);\n        return record;\n    }\n    /** @internal */\n    _moveAfter(record, prevRecord, index) {\n        this._unlink(record);\n        this._insertAfter(record, prevRecord, index);\n        this._addToMoves(record, index);\n        return record;\n    }\n    /** @internal */\n    _addAfter(record, prevRecord, index) {\n        this._insertAfter(record, prevRecord, index);\n        if (this._additionsTail === null) {\n            // TODO(vicb):\n            // assert(this._additionsHead === null);\n            this._additionsTail = this._additionsHead = record;\n        }\n        else {\n            // TODO(vicb):\n            // assert(_additionsTail._nextAdded === null);\n            // assert(record._nextAdded === null);\n            this._additionsTail = this._additionsTail._nextAdded = record;\n        }\n        return record;\n    }\n    /** @internal */\n    _insertAfter(record, prevRecord, index) {\n        // TODO(vicb):\n        // assert(record != prevRecord);\n        // assert(record._next === null);\n        // assert(record._prev === null);\n        const next = prevRecord === null ? this._itHead : prevRecord._next;\n        // TODO(vicb):\n        // assert(next != record);\n        // assert(prevRecord != record);\n        record._next = next;\n        record._prev = prevRecord;\n        if (next === null) {\n            this._itTail = record;\n        }\n        else {\n            next._prev = record;\n        }\n        if (prevRecord === null) {\n            this._itHead = record;\n        }\n        else {\n            prevRecord._next = record;\n        }\n        if (this._linkedRecords === null) {\n            this._linkedRecords = new _DuplicateMap();\n        }\n        this._linkedRecords.put(record);\n        record.currentIndex = index;\n        return record;\n    }\n    /** @internal */\n    _remove(record) {\n        return this._addToRemovals(this._unlink(record));\n    }\n    /** @internal */\n    _unlink(record) {\n        if (this._linkedRecords !== null) {\n            this._linkedRecords.remove(record);\n        }\n        const prev = record._prev;\n        const next = record._next;\n        // TODO(vicb):\n        // assert((record._prev = null) === null);\n        // assert((record._next = null) === null);\n        if (prev === null) {\n            this._itHead = next;\n        }\n        else {\n            prev._next = next;\n        }\n        if (next === null) {\n            this._itTail = prev;\n        }\n        else {\n            next._prev = prev;\n        }\n        return record;\n    }\n    /** @internal */\n    _addToMoves(record, toIndex) {\n        // TODO(vicb):\n        // assert(record._nextMoved === null);\n        if (record.previousIndex === toIndex) {\n            return record;\n        }\n        if (this._movesTail === null) {\n            // TODO(vicb):\n            // assert(_movesHead === null);\n            this._movesTail = this._movesHead = record;\n        }\n        else {\n            // TODO(vicb):\n            // assert(_movesTail._nextMoved === null);\n            this._movesTail = this._movesTail._nextMoved = record;\n        }\n        return record;\n    }\n    _addToRemovals(record) {\n        if (this._unlinkedRecords === null) {\n            this._unlinkedRecords = new _DuplicateMap();\n        }\n        this._unlinkedRecords.put(record);\n        record.currentIndex = null;\n        record._nextRemoved = null;\n        if (this._removalsTail === null) {\n            // TODO(vicb):\n            // assert(_removalsHead === null);\n            this._removalsTail = this._removalsHead = record;\n            record._prevRemoved = null;\n        }\n        else {\n            // TODO(vicb):\n            // assert(_removalsTail._nextRemoved === null);\n            // assert(record._nextRemoved === null);\n            record._prevRemoved = this._removalsTail;\n            this._removalsTail = this._removalsTail._nextRemoved = record;\n        }\n        return record;\n    }\n    /** @internal */\n    _addIdentityChange(record, item) {\n        record.item = item;\n        if (this._identityChangesTail === null) {\n            this._identityChangesTail = this._identityChangesHead = record;\n        }\n        else {\n            this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n        }\n        return record;\n    }\n}\nclass IterableChangeRecord_ {\n    constructor(item, trackById) {\n        this.item = item;\n        this.trackById = trackById;\n        this.currentIndex = null;\n        this.previousIndex = null;\n        /** @internal */\n        this._nextPrevious = null;\n        /** @internal */\n        this._prev = null;\n        /** @internal */\n        this._next = null;\n        /** @internal */\n        this._prevDup = null;\n        /** @internal */\n        this._nextDup = null;\n        /** @internal */\n        this._prevRemoved = null;\n        /** @internal */\n        this._nextRemoved = null;\n        /** @internal */\n        this._nextAdded = null;\n        /** @internal */\n        this._nextMoved = null;\n        /** @internal */\n        this._nextIdentityChange = null;\n    }\n}\n// A linked list of IterableChangeRecords with the same IterableChangeRecord_.item\nclass _DuplicateItemRecordList {\n    constructor() {\n        /** @internal */\n        this._head = null;\n        /** @internal */\n        this._tail = null;\n    }\n    /**\n     * Append the record to the list of duplicates.\n     *\n     * Note: by design all records in the list of duplicates hold the same value in record.item.\n     */\n    add(record) {\n        if (this._head === null) {\n            this._head = this._tail = record;\n            record._nextDup = null;\n            record._prevDup = null;\n        }\n        else {\n            // TODO(vicb):\n            // assert(record.item ==  _head.item ||\n            //       record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);\n            this._tail._nextDup = record;\n            record._prevDup = this._tail;\n            record._nextDup = null;\n            this._tail = record;\n        }\n    }\n    // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n    // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n    get(trackById, atOrAfterIndex) {\n        let record;\n        for (record = this._head; record !== null; record = record._nextDup) {\n            if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) &&\n                Object.is(record.trackById, trackById)) {\n                return record;\n            }\n        }\n        return null;\n    }\n    /**\n     * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n     *\n     * Returns whether the list of duplicates is empty.\n     */\n    remove(record) {\n        // TODO(vicb):\n        // assert(() {\n        //  // verify that the record being removed is in the list.\n        //  for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {\n        //    if (identical(cursor, record)) return true;\n        //  }\n        //  return false;\n        //});\n        const prev = record._prevDup;\n        const next = record._nextDup;\n        if (prev === null) {\n            this._head = next;\n        }\n        else {\n            prev._nextDup = next;\n        }\n        if (next === null) {\n            this._tail = prev;\n        }\n        else {\n            next._prevDup = prev;\n        }\n        return this._head === null;\n    }\n}\nclass _DuplicateMap {\n    constructor() {\n        this.map = new Map();\n    }\n    put(record) {\n        const key = record.trackById;\n        let duplicates = this.map.get(key);\n        if (!duplicates) {\n            duplicates = new _DuplicateItemRecordList();\n            this.map.set(key, duplicates);\n        }\n        duplicates.add(record);\n    }\n    /**\n     * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n     * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n     *\n     * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n     * have any more `a`s needs to return the second `a`.\n     */\n    get(trackById, atOrAfterIndex) {\n        const key = trackById;\n        const recordList = this.map.get(key);\n        return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\n    }\n    /**\n     * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n     *\n     * The list of duplicates also is removed from the map if it gets empty.\n     */\n    remove(record) {\n        const key = record.trackById;\n        const recordList = this.map.get(key);\n        // Remove the list of duplicates when it gets empty\n        if (recordList.remove(record)) {\n            this.map.delete(key);\n        }\n        return record;\n    }\n    get isEmpty() {\n        return this.map.size === 0;\n    }\n    clear() {\n        this.map.clear();\n    }\n}\nfunction getPreviousIndex(item, addRemoveOffset, moveOffsets) {\n    const previousIndex = item.previousIndex;\n    if (previousIndex === null)\n        return previousIndex;\n    let moveOffset = 0;\n    if (moveOffsets && previousIndex < moveOffsets.length) {\n        moveOffset = moveOffsets[previousIndex];\n    }\n    return previousIndex + addRemoveOffset + moveOffset;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass DefaultKeyValueDifferFactory {\n    constructor() { }\n    supports(obj) {\n        return obj instanceof Map || isJsObject(obj);\n    }\n    create() {\n        return new DefaultKeyValueDiffer();\n    }\n}\nclass DefaultKeyValueDiffer {\n    constructor() {\n        this._records = new Map();\n        this._mapHead = null;\n        // _appendAfter is used in the check loop\n        this._appendAfter = null;\n        this._previousMapHead = null;\n        this._changesHead = null;\n        this._changesTail = null;\n        this._additionsHead = null;\n        this._additionsTail = null;\n        this._removalsHead = null;\n        this._removalsTail = null;\n    }\n    get isDirty() {\n        return this._additionsHead !== null || this._changesHead !== null ||\n            this._removalsHead !== null;\n    }\n    forEachItem(fn) {\n        let record;\n        for (record = this._mapHead; record !== null; record = record._next) {\n            fn(record);\n        }\n    }\n    forEachPreviousItem(fn) {\n        let record;\n        for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n            fn(record);\n        }\n    }\n    forEachChangedItem(fn) {\n        let record;\n        for (record = this._changesHead; record !== null; record = record._nextChanged) {\n            fn(record);\n        }\n    }\n    forEachAddedItem(fn) {\n        let record;\n        for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n            fn(record);\n        }\n    }\n    forEachRemovedItem(fn) {\n        let record;\n        for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n            fn(record);\n        }\n    }\n    diff(map) {\n        if (!map) {\n            map = new Map();\n        }\n        else if (!(map instanceof Map || isJsObject(map))) {\n            throw new Error(`Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`);\n        }\n        return this.check(map) ? this : null;\n    }\n    onDestroy() { }\n    /**\n     * Check the current state of the map vs the previous.\n     * The algorithm is optimised for when the keys do no change.\n     */\n    check(map) {\n        this._reset();\n        let insertBefore = this._mapHead;\n        this._appendAfter = null;\n        this._forEach(map, (value, key) => {\n            if (insertBefore && insertBefore.key === key) {\n                this._maybeAddToChanges(insertBefore, value);\n                this._appendAfter = insertBefore;\n                insertBefore = insertBefore._next;\n            }\n            else {\n                const record = this._getOrCreateRecordForKey(key, value);\n                insertBefore = this._insertBeforeOrAppend(insertBefore, record);\n            }\n        });\n        // Items remaining at the end of the list have been deleted\n        if (insertBefore) {\n            if (insertBefore._prev) {\n                insertBefore._prev._next = null;\n            }\n            this._removalsHead = insertBefore;\n            for (let record = insertBefore; record !== null; record = record._nextRemoved) {\n                if (record === this._mapHead) {\n                    this._mapHead = null;\n                }\n                this._records.delete(record.key);\n                record._nextRemoved = record._next;\n                record.previousValue = record.currentValue;\n                record.currentValue = null;\n                record._prev = null;\n                record._next = null;\n            }\n        }\n        // Make sure tails have no next records from previous runs\n        if (this._changesTail)\n            this._changesTail._nextChanged = null;\n        if (this._additionsTail)\n            this._additionsTail._nextAdded = null;\n        return this.isDirty;\n    }\n    /**\n     * Inserts a record before `before` or append at the end of the list when `before` is null.\n     *\n     * Notes:\n     * - This method appends at `this._appendAfter`,\n     * - This method updates `this._appendAfter`,\n     * - The return value is the new value for the insertion pointer.\n     */\n    _insertBeforeOrAppend(before, record) {\n        if (before) {\n            const prev = before._prev;\n            record._next = before;\n            record._prev = prev;\n            before._prev = record;\n            if (prev) {\n                prev._next = record;\n            }\n            if (before === this._mapHead) {\n                this._mapHead = record;\n            }\n            this._appendAfter = before;\n            return before;\n        }\n        if (this._appendAfter) {\n            this._appendAfter._next = record;\n            record._prev = this._appendAfter;\n        }\n        else {\n            this._mapHead = record;\n        }\n        this._appendAfter = record;\n        return null;\n    }\n    _getOrCreateRecordForKey(key, value) {\n        if (this._records.has(key)) {\n            const record = this._records.get(key);\n            this._maybeAddToChanges(record, value);\n            const prev = record._prev;\n            const next = record._next;\n            if (prev) {\n                prev._next = next;\n            }\n            if (next) {\n                next._prev = prev;\n            }\n            record._next = null;\n            record._prev = null;\n            return record;\n        }\n        const record = new KeyValueChangeRecord_(key);\n        this._records.set(key, record);\n        record.currentValue = value;\n        this._addToAdditions(record);\n        return record;\n    }\n    /** @internal */\n    _reset() {\n        if (this.isDirty) {\n            let record;\n            // let `_previousMapHead` contain the state of the map before the changes\n            this._previousMapHead = this._mapHead;\n            for (record = this._previousMapHead; record !== null; record = record._next) {\n                record._nextPrevious = record._next;\n            }\n            // Update `record.previousValue` with the value of the item before the changes\n            // We need to update all changed items (that's those which have been added and changed)\n            for (record = this._changesHead; record !== null; record = record._nextChanged) {\n                record.previousValue = record.currentValue;\n            }\n            for (record = this._additionsHead; record != null; record = record._nextAdded) {\n                record.previousValue = record.currentValue;\n            }\n            this._changesHead = this._changesTail = null;\n            this._additionsHead = this._additionsTail = null;\n            this._removalsHead = null;\n        }\n    }\n    // Add the record or a given key to the list of changes only when the value has actually changed\n    _maybeAddToChanges(record, newValue) {\n        if (!Object.is(newValue, record.currentValue)) {\n            record.previousValue = record.currentValue;\n            record.currentValue = newValue;\n            this._addToChanges(record);\n        }\n    }\n    _addToAdditions(record) {\n        if (this._additionsHead === null) {\n            this._additionsHead = this._additionsTail = record;\n        }\n        else {\n            this._additionsTail._nextAdded = record;\n            this._additionsTail = record;\n        }\n    }\n    _addToChanges(record) {\n        if (this._changesHead === null) {\n            this._changesHead = this._changesTail = record;\n        }\n        else {\n            this._changesTail._nextChanged = record;\n            this._changesTail = record;\n        }\n    }\n    /** @internal */\n    _forEach(obj, fn) {\n        if (obj instanceof Map) {\n            obj.forEach(fn);\n        }\n        else {\n            Object.keys(obj).forEach(k => fn(obj[k], k));\n        }\n    }\n}\nclass KeyValueChangeRecord_ {\n    constructor(key) {\n        this.key = key;\n        this.previousValue = null;\n        this.currentValue = null;\n        /** @internal */\n        this._nextPrevious = null;\n        /** @internal */\n        this._next = null;\n        /** @internal */\n        this._prev = null;\n        /** @internal */\n        this._nextAdded = null;\n        /** @internal */\n        this._nextRemoved = null;\n        /** @internal */\n        this._nextChanged = null;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction defaultIterableDiffersFactory() {\n    return new IterableDiffers([new DefaultIterableDifferFactory()]);\n}\n/**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n * @publicApi\n */\nclass IterableDiffers {\n    constructor(factories) {\n        this.factories = factories;\n    }\n    static create(factories, parent) {\n        if (parent != null) {\n            const copied = parent.factories.slice();\n            factories = factories.concat(copied);\n        }\n        return new IterableDiffers(factories);\n    }\n    /**\n     * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n     * inherited {@link IterableDiffers} instance with the provided factories and return a new\n     * {@link IterableDiffers} instance.\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * The following example shows how to extend an existing list of factories,\n     * which will only be applied to the injector for this component and its children.\n     * This step is all that's required to make a new {@link IterableDiffer} available.\n     *\n     * ```\n     * @Component({\n     *   viewProviders: [\n     *     IterableDiffers.extend([new ImmutableListDiffer()])\n     *   ]\n     * })\n     * ```\n     */\n    static extend(factories) {\n        return {\n            provide: IterableDiffers,\n            useFactory: (parent) => {\n                // if parent is null, it means that we are in the root injector and we have just overridden\n                // the default injection mechanism for IterableDiffers, in such a case just assume\n                // `defaultIterableDiffersFactory`.\n                return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory());\n            },\n            // Dependency technically isn't optional, but we can provide a better error message this way.\n            deps: [[IterableDiffers, new SkipSelf(), new Optional()]]\n        };\n    }\n    find(iterable) {\n        const factory = this.factories.find(f => f.supports(iterable));\n        if (factory != null) {\n            return factory;\n        }\n        else {\n            throw new Error(`Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(iterable)}'`);\n        }\n    }\n}\n/** @nocollapse */\nIterableDiffers.ɵprov = ɵɵdefineInjectable({ token: IterableDiffers, providedIn: 'root', factory: defaultIterableDiffersFactory });\nfunction getTypeNameForDebugging(type) {\n    return type['name'] || typeof type;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction defaultKeyValueDiffersFactory() {\n    return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);\n}\n/**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n * @publicApi\n */\nclass KeyValueDiffers {\n    constructor(factories) {\n        this.factories = factories;\n    }\n    static create(factories, parent) {\n        if (parent) {\n            const copied = parent.factories.slice();\n            factories = factories.concat(copied);\n        }\n        return new KeyValueDiffers(factories);\n    }\n    /**\n     * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n     * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n     * {@link KeyValueDiffers} instance.\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * The following example shows how to extend an existing list of factories,\n     * which will only be applied to the injector for this component and its children.\n     * This step is all that's required to make a new {@link KeyValueDiffer} available.\n     *\n     * ```\n     * @Component({\n     *   viewProviders: [\n     *     KeyValueDiffers.extend([new ImmutableMapDiffer()])\n     *   ]\n     * })\n     * ```\n     */\n    static extend(factories) {\n        return {\n            provide: KeyValueDiffers,\n            useFactory: (parent) => {\n                // if parent is null, it means that we are in the root injector and we have just overridden\n                // the default injection mechanism for KeyValueDiffers, in such a case just assume\n                // `defaultKeyValueDiffersFactory`.\n                return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory());\n            },\n            // Dependency technically isn't optional, but we can provide a better error message this way.\n            deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]\n        };\n    }\n    find(kv) {\n        const factory = this.factories.find(f => f.supports(kv));\n        if (factory) {\n            return factory;\n        }\n        throw new Error(`Cannot find a differ supporting object '${kv}'`);\n    }\n}\n/** @nocollapse */\nKeyValueDiffers.ɵprov = ɵɵdefineInjectable({ token: KeyValueDiffers, providedIn: 'root', factory: defaultKeyValueDiffersFactory });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction collectNativeNodes(tView, lView, tNode, result, isProjection = false) {\n    while (tNode !== null) {\n        ngDevMode &&\n            assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */ | 16 /* Projection */ | 32 /* Icu */);\n        const lNode = lView[tNode.index];\n        if (lNode !== null) {\n            result.push(unwrapRNode(lNode));\n        }\n        // A given lNode can represent either a native node or a LContainer (when it is a host of a\n        // ViewContainerRef). When we find a LContainer we need to descend into it to collect root nodes\n        // from the views in this container.\n        if (isLContainer(lNode)) {\n            for (let i = CONTAINER_HEADER_OFFSET; i < lNode.length; i++) {\n                const lViewInAContainer = lNode[i];\n                const lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild;\n                if (lViewFirstChildTNode !== null) {\n                    collectNativeNodes(lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result);\n                }\n            }\n        }\n        const tNodeType = tNode.type;\n        if (tNodeType & 8 /* ElementContainer */) {\n            collectNativeNodes(tView, lView, tNode.child, result);\n        }\n        else if (tNodeType & 32 /* Icu */) {\n            const nextRNode = icuContainerIterate(tNode, lView);\n            let rNode;\n            while (rNode = nextRNode()) {\n                result.push(rNode);\n            }\n        }\n        else if (tNodeType & 16 /* Projection */) {\n            const nodesInSlot = getProjectionNodes(lView, tNode);\n            if (Array.isArray(nodesInSlot)) {\n                result.push(...nodesInSlot);\n            }\n            else {\n                const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n                ngDevMode && assertParentView(parentView);\n                collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);\n            }\n        }\n        tNode = isProjection ? tNode.projectionNext : tNode.next;\n    }\n    return result;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass ViewRef {\n    constructor(\n    /**\n     * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.\n     *\n     * When ViewRef is created for a dynamic component, this also represents the `LView` for the\n     * component.\n     *\n     * For a \"regular\" ViewRef created for an embedded view, this is the `LView` for the embedded\n     * view.\n     *\n     * @internal\n     */\n    _lView, \n    /**\n     * This represents the `LView` associated with the point where `ChangeDetectorRef` was\n     * requested.\n     *\n     * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.\n     */\n    _cdRefInjectingView) {\n        this._lView = _lView;\n        this._cdRefInjectingView = _cdRefInjectingView;\n        this._appRef = null;\n        this._attachedToViewContainer = false;\n    }\n    get rootNodes() {\n        const lView = this._lView;\n        const tView = lView[TVIEW];\n        return collectNativeNodes(tView, lView, tView.firstChild, []);\n    }\n    get context() {\n        return this._lView[CONTEXT];\n    }\n    set context(value) {\n        this._lView[CONTEXT] = value;\n    }\n    get destroyed() {\n        return (this._lView[FLAGS] & 256 /* Destroyed */) === 256 /* Destroyed */;\n    }\n    destroy() {\n        if (this._appRef) {\n            this._appRef.detachView(this);\n        }\n        else if (this._attachedToViewContainer) {\n            const parent = this._lView[PARENT];\n            if (isLContainer(parent)) {\n                const viewRefs = parent[VIEW_REFS];\n                const index = viewRefs ? viewRefs.indexOf(this) : -1;\n                if (index > -1) {\n                    ngDevMode &&\n                        assertEqual(index, parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET, 'An attached view should be in the same position within its container as its ViewRef in the VIEW_REFS array.');\n                    detachView(parent, index);\n                    removeFromArray(viewRefs, index);\n                }\n            }\n            this._attachedToViewContainer = false;\n        }\n        destroyLView(this._lView[TVIEW], this._lView);\n    }\n    onDestroy(callback) {\n        storeCleanupWithContext(this._lView[TVIEW], this._lView, null, callback);\n    }\n    /**\n     * Marks a view and all of its ancestors dirty.\n     *\n     * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is\n     * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n     * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n     *\n     * <!-- TODO: Add a link to a chapter on OnPush components -->\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * ```typescript\n     * @Component({\n     *   selector: 'app-root',\n     *   template: `Number of ticks: {{numberOfTicks}}`\n     *   changeDetection: ChangeDetectionStrategy.OnPush,\n     * })\n     * class AppComponent {\n     *   numberOfTicks = 0;\n     *\n     *   constructor(private ref: ChangeDetectorRef) {\n     *     setInterval(() => {\n     *       this.numberOfTicks++;\n     *       // the following is required, otherwise the view will not be updated\n     *       this.ref.markForCheck();\n     *     }, 1000);\n     *   }\n     * }\n     * ```\n     */\n    markForCheck() {\n        markViewDirty(this._cdRefInjectingView || this._lView);\n    }\n    /**\n     * Detaches the view from the change detection tree.\n     *\n     * Detached views will not be checked during change detection runs until they are\n     * re-attached, even if they are dirty. `detach` can be used in combination with\n     * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change\n     * detection checks.\n     *\n     * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n     * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * The following example defines a component with a large list of readonly data.\n     * Imagine the data changes constantly, many times per second. For performance reasons,\n     * we want to check and update the list every five seconds. We can do that by detaching\n     * the component's change detector and doing a local check every five seconds.\n     *\n     * ```typescript\n     * class DataProvider {\n     *   // in a real application the returned data will be different every time\n     *   get data() {\n     *     return [1,2,3,4,5];\n     *   }\n     * }\n     *\n     * @Component({\n     *   selector: 'giant-list',\n     *   template: `\n     *     <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n     *   `,\n     * })\n     * class GiantList {\n     *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n     *     ref.detach();\n     *     setInterval(() => {\n     *       this.ref.detectChanges();\n     *     }, 5000);\n     *   }\n     * }\n     *\n     * @Component({\n     *   selector: 'app',\n     *   providers: [DataProvider],\n     *   template: `\n     *     <giant-list><giant-list>\n     *   `,\n     * })\n     * class App {\n     * }\n     * ```\n     */\n    detach() {\n        this._lView[FLAGS] &= ~128 /* Attached */;\n    }\n    /**\n     * Re-attaches a view to the change detection tree.\n     *\n     * This can be used to re-attach views that were previously detached from the tree\n     * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.\n     *\n     * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * The following example creates a component displaying `live` data. The component will detach\n     * its change detector from the main change detector tree when the component's live property\n     * is set to false.\n     *\n     * ```typescript\n     * class DataProvider {\n     *   data = 1;\n     *\n     *   constructor() {\n     *     setInterval(() => {\n     *       this.data = this.data * 2;\n     *     }, 500);\n     *   }\n     * }\n     *\n     * @Component({\n     *   selector: 'live-data',\n     *   inputs: ['live'],\n     *   template: 'Data: {{dataProvider.data}}'\n     * })\n     * class LiveData {\n     *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n     *\n     *   set live(value) {\n     *     if (value) {\n     *       this.ref.reattach();\n     *     } else {\n     *       this.ref.detach();\n     *     }\n     *   }\n     * }\n     *\n     * @Component({\n     *   selector: 'app-root',\n     *   providers: [DataProvider],\n     *   template: `\n     *     Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n     *     <live-data [live]=\"live\"><live-data>\n     *   `,\n     * })\n     * class AppComponent {\n     *   live = true;\n     * }\n     * ```\n     */\n    reattach() {\n        this._lView[FLAGS] |= 128 /* Attached */;\n    }\n    /**\n     * Checks the view and its children.\n     *\n     * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement\n     * local change detection checks.\n     *\n     * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n     * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * The following example defines a component with a large list of readonly data.\n     * Imagine, the data changes constantly, many times per second. For performance reasons,\n     * we want to check and update the list every five seconds.\n     *\n     * We can do that by detaching the component's change detector and doing a local change detection\n     * check every five seconds.\n     *\n     * See {@link ChangeDetectorRef#detach detach} for more information.\n     */\n    detectChanges() {\n        detectChangesInternal(this._lView[TVIEW], this._lView, this.context);\n    }\n    /**\n     * Checks the change detector and its children, and throws if any changes are detected.\n     *\n     * This is used in development mode to verify that running change detection doesn't\n     * introduce other changes.\n     */\n    checkNoChanges() {\n        checkNoChangesInternal(this._lView[TVIEW], this._lView, this.context);\n    }\n    attachToViewContainerRef() {\n        if (this._appRef) {\n            throw new Error('This view is already attached directly to the ApplicationRef!');\n        }\n        this._attachedToViewContainer = true;\n    }\n    detachFromAppRef() {\n        this._appRef = null;\n        renderDetachView(this._lView[TVIEW], this._lView);\n    }\n    attachToAppRef(appRef) {\n        if (this._attachedToViewContainer) {\n            throw new Error('This view is already attached to a ViewContainer!');\n        }\n        this._appRef = appRef;\n    }\n}\n/** @internal */\nclass RootViewRef extends ViewRef {\n    constructor(_view) {\n        super(_view);\n        this._view = _view;\n    }\n    detectChanges() {\n        detectChangesInRootView(this._view);\n    }\n    checkNoChanges() {\n        checkNoChangesInRootView(this._view);\n    }\n    get context() {\n        return null;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = injectChangeDetectorRef;\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY = SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__;\n/**\n * Base class that provides change detection functionality.\n * A change-detection tree collects all views that are to be checked for changes.\n * Use the methods to add and remove views from the tree, initiate change-detection,\n * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.\n *\n * @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks)\n * @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection)\n *\n * @usageNotes\n *\n * The following examples demonstrate how to modify default change-detection behavior\n * to perform explicit detection when needed.\n *\n * ### Use `markForCheck()` with `CheckOnce` strategy\n *\n * The following example sets the `OnPush` change-detection strategy for a component\n * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check\n * after an interval. See [live demo](https://plnkr.co/edit/GC512b?p=preview).\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\"\n * region=\"mark-for-check\"></code-example>\n *\n * ### Detach change detector to limit how often check occurs\n *\n * The following example defines a component with a large list of read-only data\n * that is expected to change constantly, many times per second.\n * To improve performance, we want to check and update the list\n * less often than the changes actually occur. To do that, we detach\n * the component's change detector and perform an explicit local check every five seconds.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"detach\"></code-example>\n *\n *\n * ### Reattaching a detached component\n *\n * The following example creates a component displaying live data.\n * The component detaches its change detector from the main change detector tree\n * when the `live` property is set to false, and reattaches it when the property\n * becomes true.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"reattach\"></code-example>\n *\n * @publicApi\n */\nclass ChangeDetectorRef {\n}\n/**\n * @internal\n * @nocollapse\n */\nChangeDetectorRef.__NG_ELEMENT_ID__ = SWITCH_CHANGE_DETECTOR_REF_FACTORY;\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nfunction injectChangeDetectorRef(flags) {\n    return createViewRef(getCurrentTNode(), getLView(), (flags & 16 /* ForPipe */) === 16 /* ForPipe */);\n}\n/**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n *\n * @param tNode The node that is requesting a ChangeDetectorRef\n * @param lView The view to which the node belongs\n * @param isPipe Whether the view is being injected into a pipe.\n * @returns The ChangeDetectorRef to use\n */\nfunction createViewRef(tNode, lView, isPipe) {\n    if (isComponentHost(tNode) && !isPipe) {\n        // The LView represents the location where the component is declared.\n        // Instead we want the LView for the component View and so we need to look it up.\n        const componentView = getComponentLViewByIndex(tNode.index, lView); // look down\n        return new ViewRef(componentView, componentView);\n    }\n    else if (tNode.type & (3 /* AnyRNode */ | 12 /* AnyContainer */ | 32 /* Icu */)) {\n        // The LView represents the location where the injection is requested from.\n        // We need to locate the containing LView (in case where the `lView` is an embedded view)\n        const hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up\n        return new ViewRef(hostComponentView, lView);\n    }\n    return null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Structural diffing for `Object`s and `Map`s.\n */\nconst keyValDiff = [new DefaultKeyValueDifferFactory()];\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nconst iterableDiff = [new DefaultIterableDifferFactory()];\nconst defaultIterableDiffers = new IterableDiffers(iterableDiff);\nconst defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = injectTemplateRef;\nconst SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_TEMPLATE_REF_FACTORY = SWITCH_TEMPLATE_REF_FACTORY__POST_R3__;\n/**\n * Represents an embedded template that can be used to instantiate embedded views.\n * To instantiate embedded views based on a template, use the `ViewContainerRef`\n * method `createEmbeddedView()`.\n *\n * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`\n * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view\n * is injected into the constructor of the directive,\n * using the `TemplateRef` token.\n *\n * You can also use a `Query` to find a `TemplateRef` associated with\n * a component or a directive.\n *\n * @see `ViewContainerRef`\n * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)\n *\n * @publicApi\n */\nclass TemplateRef {\n}\n/**\n * @internal\n * @nocollapse\n */\nTemplateRef.__NG_ELEMENT_ID__ = SWITCH_TEMPLATE_REF_FACTORY;\nconst ViewEngineTemplateRef = TemplateRef;\nconst R3TemplateRef = class TemplateRef extends ViewEngineTemplateRef {\n    constructor(_declarationLView, _declarationTContainer, elementRef) {\n        super();\n        this._declarationLView = _declarationLView;\n        this._declarationTContainer = _declarationTContainer;\n        this.elementRef = elementRef;\n    }\n    createEmbeddedView(context) {\n        const embeddedTView = this._declarationTContainer.tViews;\n        const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.declTNode, null, null, null, null);\n        const declarationLContainer = this._declarationLView[this._declarationTContainer.index];\n        ngDevMode && assertLContainer(declarationLContainer);\n        embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;\n        const declarationViewLQueries = this._declarationLView[QUERIES];\n        if (declarationViewLQueries !== null) {\n            embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n        }\n        renderView(embeddedTView, embeddedLView, context);\n        return new ViewRef(embeddedLView);\n    }\n};\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\nfunction injectTemplateRef() {\n    return createTemplateRef(getCurrentTNode(), getLView());\n}\n/**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param hostTNode The node on which a TemplateRef is requested\n * @param hostLView The `LView` to which the node belongs\n * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type\n */\nfunction createTemplateRef(hostTNode, hostLView) {\n    if (hostTNode.type & 4 /* Container */) {\n        ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');\n        return new R3TemplateRef(hostLView, hostTNode, createElementRef(hostTNode, hostLView));\n    }\n    return null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents an instance of an `NgModule` created by an `NgModuleFactory`.\n * Provides access to the `NgModule` instance and related objects.\n *\n * @publicApi\n */\nclass NgModuleRef {\n}\n/**\n * @publicApi\n */\nclass NgModuleFactory {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = injectViewContainerRef;\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY = SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__;\n/**\n * Represents a container where one or more views can be attached to a component.\n *\n * Can contain *host views* (created by instantiating a\n * component with the `createComponent()` method), and *embedded views*\n * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).\n *\n * A view container instance can contain other view containers,\n * creating a [view hierarchy](guide/glossary#view-tree).\n *\n * @see `ComponentRef`\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\nclass ViewContainerRef {\n}\n/**\n * @internal\n * @nocollapse\n */\nViewContainerRef.__NG_ELEMENT_ID__ = SWITCH_VIEW_CONTAINER_REF_FACTORY;\n/**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\nfunction injectViewContainerRef() {\n    const previousTNode = getCurrentTNode();\n    return createContainerRef(previousTNode, getLView());\n}\nconst VE_ViewContainerRef = ViewContainerRef;\nconst R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {\n    constructor(_lContainer, _hostTNode, _hostLView) {\n        super();\n        this._lContainer = _lContainer;\n        this._hostTNode = _hostTNode;\n        this._hostLView = _hostLView;\n    }\n    get element() {\n        return createElementRef(this._hostTNode, this._hostLView);\n    }\n    get injector() {\n        return new NodeInjector(this._hostTNode, this._hostLView);\n    }\n    /** @deprecated No replacement */\n    get parentInjector() {\n        const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView);\n        if (hasParentInjector(parentLocation)) {\n            const parentView = getParentInjectorView(parentLocation, this._hostLView);\n            const injectorIndex = getParentInjectorIndex(parentLocation);\n            ngDevMode && assertNodeInjector(parentView, injectorIndex);\n            const parentTNode = parentView[TVIEW].data[injectorIndex + 8 /* TNODE */];\n            return new NodeInjector(parentTNode, parentView);\n        }\n        else {\n            return new NodeInjector(null, this._hostLView);\n        }\n    }\n    clear() {\n        while (this.length > 0) {\n            this.remove(this.length - 1);\n        }\n    }\n    get(index) {\n        const viewRefs = getViewRefs(this._lContainer);\n        return viewRefs !== null && viewRefs[index] || null;\n    }\n    get length() {\n        return this._lContainer.length - CONTAINER_HEADER_OFFSET;\n    }\n    createEmbeddedView(templateRef, context, index) {\n        const viewRef = templateRef.createEmbeddedView(context || {});\n        this.insert(viewRef, index);\n        return viewRef;\n    }\n    createComponent(componentFactory, index, injector, projectableNodes, ngModuleRef) {\n        const contextInjector = injector || this.parentInjector;\n        if (!ngModuleRef && componentFactory.ngModule == null && contextInjector) {\n            // DO NOT REFACTOR. The code here used to have a `value || undefined` expression\n            // which seems to cause internal google apps to fail. This is documented in the\n            // following internal bug issue: go/b/142967802\n            const result = contextInjector.get(NgModuleRef, null);\n            if (result) {\n                ngModuleRef = result;\n            }\n        }\n        const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n        this.insert(componentRef.hostView, index);\n        return componentRef;\n    }\n    insert(viewRef, index) {\n        const lView = viewRef._lView;\n        const tView = lView[TVIEW];\n        if (ngDevMode && viewRef.destroyed) {\n            throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n        }\n        if (viewAttachedToContainer(lView)) {\n            // If view is already attached, detach it first so we clean up references appropriately.\n            const prevIdx = this.indexOf(viewRef);\n            // A view might be attached either to this or a different container. The `prevIdx` for\n            // those cases will be:\n            // equal to -1 for views attached to this ViewContainerRef\n            // >= 0 for views attached to a different ViewContainerRef\n            if (prevIdx !== -1) {\n                this.detach(prevIdx);\n            }\n            else {\n                const prevLContainer = lView[PARENT];\n                ngDevMode &&\n                    assertEqual(isLContainer(prevLContainer), true, 'An attached view should have its PARENT point to a container.');\n                // We need to re-create a R3ViewContainerRef instance since those are not stored on\n                // LView (nor anywhere else).\n                const prevVCRef = new R3ViewContainerRef(prevLContainer, prevLContainer[T_HOST], prevLContainer[PARENT]);\n                prevVCRef.detach(prevVCRef.indexOf(viewRef));\n            }\n        }\n        // Logical operation of adding `LView` to `LContainer`\n        const adjustedIdx = this._adjustIndex(index);\n        const lContainer = this._lContainer;\n        insertView(tView, lView, lContainer, adjustedIdx);\n        // Physical operation of adding the DOM nodes.\n        const beforeNode = getBeforeNodeForView(adjustedIdx, lContainer);\n        const renderer = lView[RENDERER];\n        const parentRNode = nativeParentNode(renderer, lContainer[NATIVE]);\n        if (parentRNode !== null) {\n            addViewToContainer(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);\n        }\n        viewRef.attachToViewContainerRef();\n        addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef);\n        return viewRef;\n    }\n    move(viewRef, newIndex) {\n        if (ngDevMode && viewRef.destroyed) {\n            throw new Error('Cannot move a destroyed View in a ViewContainer!');\n        }\n        return this.insert(viewRef, newIndex);\n    }\n    indexOf(viewRef) {\n        const viewRefsArr = getViewRefs(this._lContainer);\n        return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;\n    }\n    remove(index) {\n        const adjustedIdx = this._adjustIndex(index, -1);\n        const detachedView = detachView(this._lContainer, adjustedIdx);\n        if (detachedView) {\n            // Before destroying the view, remove it from the container's array of `ViewRef`s.\n            // This ensures the view container length is updated before calling\n            // `destroyLView`, which could recursively call view container methods that\n            // rely on an accurate container length.\n            // (e.g. a method on this view container being called by a child directive's OnDestroy\n            // lifecycle hook)\n            removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx);\n            destroyLView(detachedView[TVIEW], detachedView);\n        }\n    }\n    detach(index) {\n        const adjustedIdx = this._adjustIndex(index, -1);\n        const view = detachView(this._lContainer, adjustedIdx);\n        const wasDetached = view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null;\n        return wasDetached ? new ViewRef(view) : null;\n    }\n    _adjustIndex(index, shift = 0) {\n        if (index == null) {\n            return this.length + shift;\n        }\n        if (ngDevMode) {\n            assertGreaterThan(index, -1, `ViewRef index must be positive, got ${index}`);\n            // +1 because it's legal to insert at the end.\n            assertLessThan(index, this.length + 1 + shift, 'index');\n        }\n        return index;\n    }\n};\nfunction getViewRefs(lContainer) {\n    return lContainer[VIEW_REFS];\n}\nfunction getOrCreateViewRefs(lContainer) {\n    return (lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = []));\n}\n/**\n * Creates a ViewContainerRef and stores it on the injector.\n *\n * @param ViewContainerRefToken The ViewContainerRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node that is requesting a ViewContainerRef\n * @param hostLView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\nfunction createContainerRef(hostTNode, hostLView) {\n    ngDevMode && assertTNodeType(hostTNode, 12 /* AnyContainer */ | 3 /* AnyRNode */);\n    let lContainer;\n    const slotValue = hostLView[hostTNode.index];\n    if (isLContainer(slotValue)) {\n        // If the host is a container, we don't need to create a new LContainer\n        lContainer = slotValue;\n    }\n    else {\n        let commentNode;\n        // If the host is an element container, the native host element is guaranteed to be a\n        // comment and we can reuse that comment as anchor element for the new LContainer.\n        // The comment node in question is already part of the DOM structure so we don't need to append\n        // it again.\n        if (hostTNode.type & 8 /* ElementContainer */) {\n            commentNode = unwrapRNode(slotValue);\n        }\n        else {\n            // If the host is a regular element, we have to insert a comment node manually which will\n            // be used as an anchor when inserting elements. In this specific case we use low-level DOM\n            // manipulation to insert it.\n            const renderer = hostLView[RENDERER];\n            ngDevMode && ngDevMode.rendererCreateComment++;\n            commentNode = renderer.createComment(ngDevMode ? 'container' : '');\n            const hostNative = getNativeByTNode(hostTNode, hostLView);\n            const parentOfHostNative = nativeParentNode(renderer, hostNative);\n            nativeInsertBefore(renderer, parentOfHostNative, commentNode, nativeNextSibling(renderer, hostNative), false);\n        }\n        hostLView[hostTNode.index] = lContainer =\n            createLContainer(slotValue, hostLView, commentNode, hostTNode);\n        addToViewTree(hostLView, lContainer);\n    }\n    return new R3ViewContainerRef(lContainer, hostTNode, hostLView);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction expressionChangedAfterItHasBeenCheckedError(context, oldValue, currValue, isFirstCheck) {\n    let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${oldValue}'. Current value: '${currValue}'.`;\n    if (isFirstCheck) {\n        msg +=\n            ` It seems like the view has been created after its parent and its children have been dirty checked.` +\n                ` Has it been created in a change detection hook ?`;\n    }\n    return viewDebugError(msg, context);\n}\nfunction viewWrappedDebugError(err, context) {\n    if (!(err instanceof Error)) {\n        // errors that are not Error instances don't have a stack,\n        // so it is ok to wrap them into a new Error object...\n        err = new Error(err.toString());\n    }\n    _addDebugContext(err, context);\n    return err;\n}\nfunction viewDebugError(msg, context) {\n    const err = new Error(msg);\n    _addDebugContext(err, context);\n    return err;\n}\nfunction _addDebugContext(err, context) {\n    err[ERROR_DEBUG_CONTEXT] = context;\n    err[ERROR_LOGGER] = context.logError.bind(context);\n}\nfunction isViewDebugError(err) {\n    return !!getDebugContext(err);\n}\nfunction viewDestroyedError(action) {\n    return new Error(`ViewDestroyedError: Attempt to use a destroyed view: ${action}`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Called before each cycle of a view's check to detect whether this is in the\n// initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit\n// lifecycle methods. Returns true if this check cycle should call lifecycle\n// methods.\nfunction shiftInitState(view, priorInitState, newInitState) {\n    // Only update the InitState if we are currently in the prior state.\n    // For example, only move into CallingInit if we are in BeforeInit. Only\n    // move into CallingContentInit if we are in CallingInit. Normally this will\n    // always be true because of how checkCycle is called in checkAndUpdateView.\n    // However, if checkAndUpdateView is called recursively or if an exception is\n    // thrown while checkAndUpdateView is running, checkAndUpdateView starts over\n    // from the beginning. This ensures the state is monotonically increasing,\n    // terminating in the AfterInit state, which ensures the Init methods are called\n    // at least once and only once.\n    const state = view.state;\n    const initState = state & 1792 /* InitState_Mask */;\n    if (initState === priorInitState) {\n        view.state = (state & ~1792 /* InitState_Mask */) | newInitState;\n        view.initIndex = -1;\n        return true;\n    }\n    return initState === newInitState;\n}\n// Returns true if the lifecycle init method should be called for the node with\n// the given init index.\nfunction shouldCallLifecycleInitHook(view, initState, index) {\n    if ((view.state & 1792 /* InitState_Mask */) === initState && view.initIndex <= index) {\n        view.initIndex = index + 1;\n        return true;\n    }\n    return false;\n}\n/**\n * Node instance data.\n *\n * We have a separate type per NodeType to save memory\n * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>)\n *\n * To keep our code monomorphic,\n * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...).\n * This way, no usage site can get a `NodeData` from view.nodes and then use it for different\n * purposes.\n */\nclass NodeData {\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asTextData(view, index) {\n    return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asElementData(view, index) {\n    return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asProviderData(view, index) {\n    return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asPureExpressionData(view, index) {\n    return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asQueryList(view, index) {\n    return view.nodes[index];\n}\nclass DebugContext {\n}\n/**\n * This object is used to prevent cycles in the source files and to have a place where\n * debug mode can hook it. It is lazily filled when `isDevMode` is known.\n */\nconst Services = {\n    setCurrentNode: undefined,\n    createRootView: undefined,\n    createEmbeddedView: undefined,\n    createComponentView: undefined,\n    createNgModuleRef: undefined,\n    overrideProvider: undefined,\n    overrideComponentView: undefined,\n    clearOverrides: undefined,\n    checkAndUpdateView: undefined,\n    checkNoChangesView: undefined,\n    destroyView: undefined,\n    resolveDep: undefined,\n    createDebugContext: undefined,\n    handleEvent: undefined,\n    updateDirectives: undefined,\n    updateRenderer: undefined,\n    dirtyParentQueries: undefined,\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NOOP = () => { };\nconst _tokenKeyCache = new Map();\nfunction tokenKey(token) {\n    let key = _tokenKeyCache.get(token);\n    if (!key) {\n        key = stringify(token) + '_' + _tokenKeyCache.size;\n        _tokenKeyCache.set(token, key);\n    }\n    return key;\n}\nfunction unwrapValue(view, nodeIdx, bindingIdx, value) {\n    if (WrappedValue.isWrapped(value)) {\n        value = WrappedValue.unwrap(value);\n        const globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;\n        const oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);\n        view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);\n    }\n    return value;\n}\nconst UNDEFINED_RENDERER_TYPE_ID = '$$undefined';\nconst EMPTY_RENDERER_TYPE_ID = '$$empty';\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nfunction createRendererType2(values) {\n    return {\n        id: UNDEFINED_RENDERER_TYPE_ID,\n        styles: values.styles,\n        encapsulation: values.encapsulation,\n        data: values.data\n    };\n}\nlet _renderCompCount$1 = 0;\nfunction resolveRendererType2(type) {\n    if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {\n        // first time we see this RendererType2. Initialize it...\n        const isFilled = ((type.encapsulation != null && type.encapsulation !== ViewEncapsulation.None) ||\n            type.styles.length || Object.keys(type.data).length);\n        if (isFilled) {\n            type.id = `c${_renderCompCount$1++}`;\n        }\n        else {\n            type.id = EMPTY_RENDERER_TYPE_ID;\n        }\n    }\n    if (type && type.id === EMPTY_RENDERER_TYPE_ID) {\n        type = null;\n    }\n    return type || null;\n}\nfunction checkBinding(view, def, bindingIdx, value) {\n    const oldValues = view.oldValues;\n    if ((view.state & 2 /* FirstCheck */) ||\n        !Object.is(oldValues[def.bindingIndex + bindingIdx], value)) {\n        return true;\n    }\n    return false;\n}\nfunction checkAndUpdateBinding(view, def, bindingIdx, value) {\n    if (checkBinding(view, def, bindingIdx, value)) {\n        view.oldValues[def.bindingIndex + bindingIdx] = value;\n        return true;\n    }\n    return false;\n}\nfunction checkBindingNoChanges(view, def, bindingIdx, value) {\n    const oldValue = view.oldValues[def.bindingIndex + bindingIdx];\n    if ((view.state & 1 /* BeforeFirstCheck */) || !devModeEqual(oldValue, value)) {\n        const bindingName = def.bindings[bindingIdx].name;\n        throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, def.nodeIndex), `${bindingName}: ${oldValue}`, `${bindingName}: ${value}`, (view.state & 1 /* BeforeFirstCheck */) !== 0);\n    }\n}\nfunction markParentViewsForCheck(view) {\n    let currView = view;\n    while (currView) {\n        if (currView.def.flags & 2 /* OnPush */) {\n            currView.state |= 8 /* ChecksEnabled */;\n        }\n        currView = currView.viewContainerParent || currView.parent;\n    }\n}\nfunction markParentViewsForCheckProjectedViews(view, endView) {\n    let currView = view;\n    while (currView && currView !== endView) {\n        currView.state |= 64 /* CheckProjectedViews */;\n        currView = currView.viewContainerParent || currView.parent;\n    }\n}\nfunction dispatchEvent(view, nodeIndex, eventName, event) {\n    try {\n        const nodeDef = view.def.nodes[nodeIndex];\n        const startView = nodeDef.flags & 33554432 /* ComponentView */ ?\n            asElementData(view, nodeIndex).componentView :\n            view;\n        markParentViewsForCheck(startView);\n        return Services.handleEvent(view, nodeIndex, eventName, event);\n    }\n    catch (e) {\n        // Attention: Don't rethrow, as it would cancel Observable subscriptions!\n        view.root.errorHandler.handleError(e);\n    }\n}\nfunction declaredViewContainer(view) {\n    if (view.parent) {\n        const parentView = view.parent;\n        return asElementData(parentView, view.parentNodeDef.nodeIndex);\n    }\n    return null;\n}\n/**\n * for component views, this is the host element.\n * for embedded views, this is the index of the parent node\n * that contains the view container.\n */\nfunction viewParentEl(view) {\n    const parentView = view.parent;\n    if (parentView) {\n        return view.parentNodeDef.parent;\n    }\n    else {\n        return null;\n    }\n}\nfunction renderNode(view, def) {\n    switch (def.flags & 201347067 /* Types */) {\n        case 1 /* TypeElement */:\n            return asElementData(view, def.nodeIndex).renderElement;\n        case 2 /* TypeText */:\n            return asTextData(view, def.nodeIndex).renderText;\n    }\n}\nfunction elementEventFullName(target, name) {\n    return target ? `${target}:${name}` : name;\n}\nfunction isComponentView(view) {\n    return !!view.parent && !!(view.parentNodeDef.flags & 32768 /* Component */);\n}\nfunction isEmbeddedView(view) {\n    return !!view.parent && !(view.parentNodeDef.flags & 32768 /* Component */);\n}\nfunction filterQueryId(queryId) {\n    return 1 << (queryId % 32);\n}\nfunction splitMatchedQueriesDsl(matchedQueriesDsl) {\n    const matchedQueries = {};\n    let matchedQueryIds = 0;\n    const references = {};\n    if (matchedQueriesDsl) {\n        matchedQueriesDsl.forEach(([queryId, valueType]) => {\n            if (typeof queryId === 'number') {\n                matchedQueries[queryId] = valueType;\n                matchedQueryIds |= filterQueryId(queryId);\n            }\n            else {\n                references[queryId] = valueType;\n            }\n        });\n    }\n    return { matchedQueries, references, matchedQueryIds };\n}\nfunction splitDepsDsl(deps, sourceName) {\n    return deps.map(value => {\n        let token;\n        let flags;\n        if (Array.isArray(value)) {\n            [flags, token] = value;\n        }\n        else {\n            flags = 0 /* None */;\n            token = value;\n        }\n        if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {\n            Object.defineProperty(token, SOURCE, { value: sourceName, configurable: true });\n        }\n        return { flags, token, tokenKey: tokenKey(token) };\n    });\n}\nfunction getParentRenderElement(view, renderHost, def) {\n    let renderParent = def.renderParent;\n    if (renderParent) {\n        if ((renderParent.flags & 1 /* TypeElement */) === 0 ||\n            (renderParent.flags & 33554432 /* ComponentView */) === 0 ||\n            (renderParent.element.componentRendererType &&\n                (renderParent.element.componentRendererType.encapsulation ===\n                    ViewEncapsulation.ShadowDom ||\n                    // TODO(FW-2290): remove the `encapsulation === 1` fallback logic in v12.\n                    // @ts-ignore TODO: Remove as part of FW-2290. TS complains about us dealing with an enum\n                    // value that is not known (but previously was the value for ViewEncapsulation.Native)\n                    renderParent.element.componentRendererType.encapsulation === 1))) {\n            // only children of non components, or children of components with native encapsulation should\n            // be attached.\n            return asElementData(view, def.renderParent.nodeIndex).renderElement;\n        }\n    }\n    else {\n        return renderHost;\n    }\n}\nconst DEFINITION_CACHE = new WeakMap();\nfunction resolveDefinition(factory) {\n    let value = DEFINITION_CACHE.get(factory);\n    if (!value) {\n        value = factory(() => NOOP);\n        value.factory = factory;\n        DEFINITION_CACHE.set(factory, value);\n    }\n    return value;\n}\nfunction rootRenderNodes(view) {\n    const renderNodes = [];\n    visitRootRenderNodes(view, 0 /* Collect */, undefined, undefined, renderNodes);\n    return renderNodes;\n}\nfunction visitRootRenderNodes(view, action, parentNode, nextSibling, target) {\n    // We need to re-compute the parent node in case the nodes have been moved around manually\n    if (action === 3 /* RemoveChild */) {\n        parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode));\n    }\n    visitSiblingRenderNodes(view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);\n}\nfunction visitSiblingRenderNodes(view, action, startIndex, endIndex, parentNode, nextSibling, target) {\n    for (let i = startIndex; i <= endIndex; i++) {\n        const nodeDef = view.def.nodes[i];\n        if (nodeDef.flags & (1 /* TypeElement */ | 2 /* TypeText */ | 8 /* TypeNgContent */)) {\n            visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target);\n        }\n        // jump to next sibling\n        i += nodeDef.childCount;\n    }\n}\nfunction visitProjectedRenderNodes(view, ngContentIndex, action, parentNode, nextSibling, target) {\n    let compView = view;\n    while (compView && !isComponentView(compView)) {\n        compView = compView.parent;\n    }\n    const hostView = compView.parent;\n    const hostElDef = viewParentEl(compView);\n    const startIndex = hostElDef.nodeIndex + 1;\n    const endIndex = hostElDef.nodeIndex + hostElDef.childCount;\n    for (let i = startIndex; i <= endIndex; i++) {\n        const nodeDef = hostView.def.nodes[i];\n        if (nodeDef.ngContentIndex === ngContentIndex) {\n            visitRenderNode(hostView, nodeDef, action, parentNode, nextSibling, target);\n        }\n        // jump to next sibling\n        i += nodeDef.childCount;\n    }\n    if (!hostView.parent) {\n        // a root view\n        const projectedNodes = view.root.projectableNodes[ngContentIndex];\n        if (projectedNodes) {\n            for (let i = 0; i < projectedNodes.length; i++) {\n                execRenderNodeAction(view, projectedNodes[i], action, parentNode, nextSibling, target);\n            }\n        }\n    }\n}\nfunction visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target) {\n    if (nodeDef.flags & 8 /* TypeNgContent */) {\n        visitProjectedRenderNodes(view, nodeDef.ngContent.index, action, parentNode, nextSibling, target);\n    }\n    else {\n        const rn = renderNode(view, nodeDef);\n        if (action === 3 /* RemoveChild */ && (nodeDef.flags & 33554432 /* ComponentView */) &&\n            (nodeDef.bindingFlags & 48 /* CatSyntheticProperty */)) {\n            // Note: we might need to do both actions.\n            if (nodeDef.bindingFlags & (16 /* SyntheticProperty */)) {\n                execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n            }\n            if (nodeDef.bindingFlags & (32 /* SyntheticHostProperty */)) {\n                const compView = asElementData(view, nodeDef.nodeIndex).componentView;\n                execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target);\n            }\n        }\n        else {\n            execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n        }\n        if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n            const embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer._embeddedViews;\n            for (let k = 0; k < embeddedViews.length; k++) {\n                visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target);\n            }\n        }\n        if (nodeDef.flags & 1 /* TypeElement */ && !nodeDef.element.name) {\n            visitSiblingRenderNodes(view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode, nextSibling, target);\n        }\n    }\n}\nfunction execRenderNodeAction(view, renderNode, action, parentNode, nextSibling, target) {\n    const renderer = view.renderer;\n    switch (action) {\n        case 1 /* AppendChild */:\n            renderer.appendChild(parentNode, renderNode);\n            break;\n        case 2 /* InsertBefore */:\n            renderer.insertBefore(parentNode, renderNode, nextSibling);\n            break;\n        case 3 /* RemoveChild */:\n            renderer.removeChild(parentNode, renderNode);\n            break;\n        case 0 /* Collect */:\n            target.push(renderNode);\n            break;\n    }\n}\nconst NS_PREFIX_RE = /^:([^:]+):(.+)$/;\nfunction splitNamespace(name) {\n    if (name[0] === ':') {\n        const match = name.match(NS_PREFIX_RE);\n        return [match[1], match[2]];\n    }\n    return ['', name];\n}\nfunction calcBindingFlags(bindings) {\n    let flags = 0;\n    for (let i = 0; i < bindings.length; i++) {\n        flags |= bindings[i].flags;\n    }\n    return flags;\n}\nfunction interpolate(valueCount, constAndInterp) {\n    let result = '';\n    for (let i = 0; i < valueCount * 2; i = i + 2) {\n        result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]);\n    }\n    return result + constAndInterp[valueCount * 2];\n}\nfunction inlineInterpolate(valueCount, c0, a1, c1, a2, c2, a3, c3, a4, c4, a5, c5, a6, c6, a7, c7, a8, c8, a9, c9) {\n    switch (valueCount) {\n        case 1:\n            return c0 + _toStringWithNull(a1) + c1;\n        case 2:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2;\n        case 3:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n                c3;\n        case 4:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n                c3 + _toStringWithNull(a4) + c4;\n        case 5:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5;\n        case 6:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6;\n        case 7:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n                c6 + _toStringWithNull(a7) + c7;\n        case 8:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n                c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8;\n        case 9:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n                c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9;\n        default:\n            throw new Error(`Does not support more than 9 expressions`);\n    }\n}\nfunction _toStringWithNull(v) {\n    return v != null ? v.toString() : '';\n}\nconst EMPTY_MAP = {};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst UNDEFINED_VALUE = {};\nconst InjectorRefTokenKey = tokenKey(Injector);\nconst INJECTORRefTokenKey = tokenKey(INJECTOR$1);\nconst NgModuleRefTokenKey = tokenKey(NgModuleRef);\nfunction moduleProvideDef(flags, token, value, deps) {\n    // Need to resolve forwardRefs as e.g. for `useValue` we\n    // lowered the expression and then stopped evaluating it,\n    // i.e. also didn't unwrap it.\n    value = resolveForwardRef(value);\n    const depDefs = splitDepsDsl(deps, stringify(token));\n    return {\n        // will bet set by the module definition\n        index: -1,\n        deps: depDefs,\n        flags,\n        token,\n        value\n    };\n}\nfunction moduleDef(providers) {\n    const providersByKey = {};\n    const modules = [];\n    let scope = null;\n    for (let i = 0; i < providers.length; i++) {\n        const provider = providers[i];\n        if (provider.token === INJECTOR_SCOPE) {\n            scope = provider.value;\n        }\n        if (provider.flags & 1073741824 /* TypeNgModule */) {\n            modules.push(provider.token);\n        }\n        provider.index = i;\n        providersByKey[tokenKey(provider.token)] = provider;\n    }\n    return {\n        // Will be filled later...\n        factory: null,\n        providersByKey,\n        providers,\n        modules,\n        scope: scope,\n    };\n}\nfunction initNgModule(data) {\n    const def = data._def;\n    const providers = data._providers = newArray(def.providers.length);\n    for (let i = 0; i < def.providers.length; i++) {\n        const provDef = def.providers[i];\n        if (!(provDef.flags & 4096 /* LazyProvider */)) {\n            // Make sure the provider has not been already initialized outside this loop.\n            if (providers[i] === undefined) {\n                providers[i] = _createProviderInstance(data, provDef);\n            }\n        }\n    }\n}\nfunction resolveNgModuleDep(data, depDef, notFoundValue = Injector.THROW_IF_NOT_FOUND) {\n    const former = setCurrentInjector(data);\n    try {\n        if (depDef.flags & 8 /* Value */) {\n            return depDef.token;\n        }\n        if (depDef.flags & 2 /* Optional */) {\n            notFoundValue = null;\n        }\n        if (depDef.flags & 1 /* SkipSelf */) {\n            return data._parent.get(depDef.token, notFoundValue);\n        }\n        const tokenKey = depDef.tokenKey;\n        switch (tokenKey) {\n            case InjectorRefTokenKey:\n            case INJECTORRefTokenKey:\n            case NgModuleRefTokenKey:\n                return data;\n        }\n        const providerDef = data._def.providersByKey[tokenKey];\n        let injectableDef;\n        if (providerDef) {\n            let providerInstance = data._providers[providerDef.index];\n            if (providerInstance === undefined) {\n                providerInstance = data._providers[providerDef.index] =\n                    _createProviderInstance(data, providerDef);\n            }\n            return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;\n        }\n        else if ((injectableDef = getInjectableDef(depDef.token)) && targetsModule(data, injectableDef)) {\n            const index = data._providers.length;\n            data._def.providers[index] = data._def.providersByKey[depDef.tokenKey] = {\n                flags: 1024 /* TypeFactoryProvider */ | 4096 /* LazyProvider */,\n                value: injectableDef.factory,\n                deps: [],\n                index,\n                token: depDef.token,\n            };\n            data._providers[index] = UNDEFINED_VALUE;\n            return (data._providers[index] =\n                _createProviderInstance(data, data._def.providersByKey[depDef.tokenKey]));\n        }\n        else if (depDef.flags & 4 /* Self */) {\n            return notFoundValue;\n        }\n        return data._parent.get(depDef.token, notFoundValue);\n    }\n    finally {\n        setCurrentInjector(former);\n    }\n}\nfunction moduleTransitivelyPresent(ngModule, scope) {\n    return ngModule._def.modules.indexOf(scope) > -1;\n}\nfunction targetsModule(ngModule, def) {\n    const providedIn = resolveForwardRef(def.providedIn);\n    return providedIn != null &&\n        (providedIn === 'any' || providedIn === ngModule._def.scope ||\n            moduleTransitivelyPresent(ngModule, providedIn));\n}\nfunction _createProviderInstance(ngModule, providerDef) {\n    let injectable;\n    switch (providerDef.flags & 201347067 /* Types */) {\n        case 512 /* TypeClassProvider */:\n            injectable = _createClass(ngModule, providerDef.value, providerDef.deps);\n            break;\n        case 1024 /* TypeFactoryProvider */:\n            injectable = _callFactory(ngModule, providerDef.value, providerDef.deps);\n            break;\n        case 2048 /* TypeUseExistingProvider */:\n            injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]);\n            break;\n        case 256 /* TypeValueProvider */:\n            injectable = providerDef.value;\n            break;\n    }\n    // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be\n    // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be\n    // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already\n    // set (ngOnDestroy was detected statically).\n    if (injectable !== UNDEFINED_VALUE && injectable !== null && typeof injectable === 'object' &&\n        !(providerDef.flags & 131072 /* OnDestroy */) && typeof injectable.ngOnDestroy === 'function') {\n        providerDef.flags |= 131072 /* OnDestroy */;\n    }\n    return injectable === undefined ? UNDEFINED_VALUE : injectable;\n}\nfunction _createClass(ngModule, ctor, deps) {\n    const len = deps.length;\n    switch (len) {\n        case 0:\n            return new ctor();\n        case 1:\n            return new ctor(resolveNgModuleDep(ngModule, deps[0]));\n        case 2:\n            return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n        case 3:\n            return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));\n        default:\n            const depValues = [];\n            for (let i = 0; i < len; i++) {\n                depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n            }\n            return new ctor(...depValues);\n    }\n}\nfunction _callFactory(ngModule, factory, deps) {\n    const len = deps.length;\n    switch (len) {\n        case 0:\n            return factory();\n        case 1:\n            return factory(resolveNgModuleDep(ngModule, deps[0]));\n        case 2:\n            return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n        case 3:\n            return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));\n        default:\n            const depValues = [];\n            for (let i = 0; i < len; i++) {\n                depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n            }\n            return factory(...depValues);\n    }\n}\nfunction callNgModuleLifecycle(ngModule, lifecycles) {\n    const def = ngModule._def;\n    const destroyed = new Set();\n    for (let i = 0; i < def.providers.length; i++) {\n        const provDef = def.providers[i];\n        if (provDef.flags & 131072 /* OnDestroy */) {\n            const instance = ngModule._providers[i];\n            if (instance && instance !== UNDEFINED_VALUE) {\n                const onDestroy = instance.ngOnDestroy;\n                if (typeof onDestroy === 'function' && !destroyed.has(instance)) {\n                    onDestroy.apply(instance);\n                    destroyed.add(instance);\n                }\n            }\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction attachEmbeddedView(parentView, elementData, viewIndex, view) {\n    let embeddedViews = elementData.viewContainer._embeddedViews;\n    if (viewIndex === null || viewIndex === undefined) {\n        viewIndex = embeddedViews.length;\n    }\n    view.viewContainerParent = parentView;\n    addToArray(embeddedViews, viewIndex, view);\n    attachProjectedView(elementData, view);\n    Services.dirtyParentQueries(view);\n    const prevView = viewIndex > 0 ? embeddedViews[viewIndex - 1] : null;\n    renderAttachEmbeddedView(elementData, prevView, view);\n}\nfunction attachProjectedView(vcElementData, view) {\n    const dvcElementData = declaredViewContainer(view);\n    if (!dvcElementData || dvcElementData === vcElementData ||\n        view.state & 16 /* IsProjectedView */) {\n        return;\n    }\n    // Note: For performance reasons, we\n    // - add a view to template._projectedViews only 1x throughout its lifetime,\n    //   and remove it not until the view is destroyed.\n    //   (hard, as when a parent view is attached/detached we would need to attach/detach all\n    //    nested projected views as well, even across component boundaries).\n    // - don't track the insertion order of views in the projected views array\n    //   (hard, as when the views of the same template are inserted different view containers)\n    view.state |= 16 /* IsProjectedView */;\n    let projectedViews = dvcElementData.template._projectedViews;\n    if (!projectedViews) {\n        projectedViews = dvcElementData.template._projectedViews = [];\n    }\n    projectedViews.push(view);\n    // Note: we are changing the NodeDef here as we cannot calculate\n    // the fact whether a template is used for projection during compilation.\n    markNodeAsProjectedTemplate(view.parent.def, view.parentNodeDef);\n}\nfunction markNodeAsProjectedTemplate(viewDef, nodeDef) {\n    if (nodeDef.flags & 4 /* ProjectedTemplate */) {\n        return;\n    }\n    viewDef.nodeFlags |= 4 /* ProjectedTemplate */;\n    nodeDef.flags |= 4 /* ProjectedTemplate */;\n    let parentNodeDef = nodeDef.parent;\n    while (parentNodeDef) {\n        parentNodeDef.childFlags |= 4 /* ProjectedTemplate */;\n        parentNodeDef = parentNodeDef.parent;\n    }\n}\nfunction detachEmbeddedView(elementData, viewIndex) {\n    const embeddedViews = elementData.viewContainer._embeddedViews;\n    if (viewIndex == null || viewIndex >= embeddedViews.length) {\n        viewIndex = embeddedViews.length - 1;\n    }\n    if (viewIndex < 0) {\n        return null;\n    }\n    const view = embeddedViews[viewIndex];\n    view.viewContainerParent = null;\n    removeFromArray(embeddedViews, viewIndex);\n    // See attachProjectedView for why we don't update projectedViews here.\n    Services.dirtyParentQueries(view);\n    renderDetachView$1(view);\n    return view;\n}\nfunction detachProjectedView(view) {\n    if (!(view.state & 16 /* IsProjectedView */)) {\n        return;\n    }\n    const dvcElementData = declaredViewContainer(view);\n    if (dvcElementData) {\n        const projectedViews = dvcElementData.template._projectedViews;\n        if (projectedViews) {\n            removeFromArray(projectedViews, projectedViews.indexOf(view));\n            Services.dirtyParentQueries(view);\n        }\n    }\n}\nfunction moveEmbeddedView(elementData, oldViewIndex, newViewIndex) {\n    const embeddedViews = elementData.viewContainer._embeddedViews;\n    const view = embeddedViews[oldViewIndex];\n    removeFromArray(embeddedViews, oldViewIndex);\n    if (newViewIndex == null) {\n        newViewIndex = embeddedViews.length;\n    }\n    addToArray(embeddedViews, newViewIndex, view);\n    // Note: Don't need to change projectedViews as the order in there\n    // as always invalid...\n    Services.dirtyParentQueries(view);\n    renderDetachView$1(view);\n    const prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;\n    renderAttachEmbeddedView(elementData, prevView, view);\n    return view;\n}\nfunction renderAttachEmbeddedView(elementData, prevView, view) {\n    const prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode) : elementData.renderElement;\n    const parentNode = view.renderer.parentNode(prevRenderNode);\n    const nextSibling = view.renderer.nextSibling(prevRenderNode);\n    // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be!\n    // However, browsers automatically do `appendChild` when there is no `nextSibling`.\n    visitRootRenderNodes(view, 2 /* InsertBefore */, parentNode, nextSibling, undefined);\n}\nfunction renderDetachView$1(view) {\n    visitRootRenderNodes(view, 3 /* RemoveChild */, null, null, undefined);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst EMPTY_CONTEXT = {};\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nfunction createComponentFactory(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors) {\n    return new ComponentFactory_(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);\n}\nfunction getComponentViewDefinitionFactory(componentFactory) {\n    return componentFactory.viewDefFactory;\n}\nclass ComponentFactory_ extends ComponentFactory {\n    constructor(selector, componentType, viewDefFactory, _inputs, _outputs, ngContentSelectors) {\n        // Attention: this ctor is called as top level function.\n        // Putting any logic in here will destroy closure tree shaking!\n        super();\n        this.selector = selector;\n        this.componentType = componentType;\n        this._inputs = _inputs;\n        this._outputs = _outputs;\n        this.ngContentSelectors = ngContentSelectors;\n        this.viewDefFactory = viewDefFactory;\n    }\n    get inputs() {\n        const inputsArr = [];\n        const inputs = this._inputs;\n        for (let propName in inputs) {\n            const templateName = inputs[propName];\n            inputsArr.push({ propName, templateName });\n        }\n        return inputsArr;\n    }\n    get outputs() {\n        const outputsArr = [];\n        for (let propName in this._outputs) {\n            const templateName = this._outputs[propName];\n            outputsArr.push({ propName, templateName });\n        }\n        return outputsArr;\n    }\n    /**\n     * Creates a new component.\n     */\n    create(injector, projectableNodes, rootSelectorOrNode, ngModule) {\n        if (!ngModule) {\n            throw new Error('ngModule should be provided');\n        }\n        const viewDef = resolveDefinition(this.viewDefFactory);\n        const componentNodeIndex = viewDef.nodes[0].element.componentProvider.nodeIndex;\n        const view = Services.createRootView(injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);\n        const component = asProviderData(view, componentNodeIndex).instance;\n        if (rootSelectorOrNode) {\n            view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full);\n        }\n        return new ComponentRef_(view, new ViewRef_(view), component);\n    }\n}\nclass ComponentRef_ extends ComponentRef {\n    constructor(_view, _viewRef, _component) {\n        super();\n        this._view = _view;\n        this._viewRef = _viewRef;\n        this._component = _component;\n        this._elDef = this._view.def.nodes[0];\n        this.hostView = _viewRef;\n        this.changeDetectorRef = _viewRef;\n        this.instance = _component;\n    }\n    get location() {\n        return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);\n    }\n    get injector() {\n        return new Injector_(this._view, this._elDef);\n    }\n    get componentType() {\n        return this._component.constructor;\n    }\n    destroy() {\n        this._viewRef.destroy();\n    }\n    onDestroy(callback) {\n        this._viewRef.onDestroy(callback);\n    }\n}\nfunction createViewContainerData(view, elDef, elData) {\n    return new ViewContainerRef_(view, elDef, elData);\n}\nclass ViewContainerRef_ {\n    constructor(_view, _elDef, _data) {\n        this._view = _view;\n        this._elDef = _elDef;\n        this._data = _data;\n        /**\n         * @internal\n         */\n        this._embeddedViews = [];\n    }\n    get element() {\n        return new ElementRef(this._data.renderElement);\n    }\n    get injector() {\n        return new Injector_(this._view, this._elDef);\n    }\n    /** @deprecated No replacement */\n    get parentInjector() {\n        let view = this._view;\n        let elDef = this._elDef.parent;\n        while (!elDef && view) {\n            elDef = viewParentEl(view);\n            view = view.parent;\n        }\n        return view ? new Injector_(view, elDef) : new Injector_(this._view, null);\n    }\n    clear() {\n        const len = this._embeddedViews.length;\n        for (let i = len - 1; i >= 0; i--) {\n            const view = detachEmbeddedView(this._data, i);\n            Services.destroyView(view);\n        }\n    }\n    get(index) {\n        const view = this._embeddedViews[index];\n        if (view) {\n            const ref = new ViewRef_(view);\n            ref.attachToViewContainerRef(this);\n            return ref;\n        }\n        return null;\n    }\n    get length() {\n        return this._embeddedViews.length;\n    }\n    createEmbeddedView(templateRef, context, index) {\n        const viewRef = templateRef.createEmbeddedView(context || {});\n        this.insert(viewRef, index);\n        return viewRef;\n    }\n    createComponent(componentFactory, index, injector, projectableNodes, ngModuleRef) {\n        const contextInjector = injector || this.parentInjector;\n        if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {\n            ngModuleRef = contextInjector.get(NgModuleRef);\n        }\n        const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n        this.insert(componentRef.hostView, index);\n        return componentRef;\n    }\n    insert(viewRef, index) {\n        if (viewRef.destroyed) {\n            throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n        }\n        const viewRef_ = viewRef;\n        const viewData = viewRef_._view;\n        attachEmbeddedView(this._view, this._data, index, viewData);\n        viewRef_.attachToViewContainerRef(this);\n        return viewRef;\n    }\n    move(viewRef, currentIndex) {\n        if (viewRef.destroyed) {\n            throw new Error('Cannot move a destroyed View in a ViewContainer!');\n        }\n        const previousIndex = this._embeddedViews.indexOf(viewRef._view);\n        moveEmbeddedView(this._data, previousIndex, currentIndex);\n        return viewRef;\n    }\n    indexOf(viewRef) {\n        return this._embeddedViews.indexOf(viewRef._view);\n    }\n    remove(index) {\n        const viewData = detachEmbeddedView(this._data, index);\n        if (viewData) {\n            Services.destroyView(viewData);\n        }\n    }\n    detach(index) {\n        const view = detachEmbeddedView(this._data, index);\n        return view ? new ViewRef_(view) : null;\n    }\n}\nfunction createChangeDetectorRef(view) {\n    return new ViewRef_(view);\n}\nclass ViewRef_ {\n    constructor(_view) {\n        this._view = _view;\n        this._viewContainerRef = null;\n        this._appRef = null;\n    }\n    get rootNodes() {\n        return rootRenderNodes(this._view);\n    }\n    get context() {\n        return this._view.context;\n    }\n    set context(value) {\n        this._view.context = value;\n    }\n    get destroyed() {\n        return (this._view.state & 128 /* Destroyed */) !== 0;\n    }\n    markForCheck() {\n        markParentViewsForCheck(this._view);\n    }\n    detach() {\n        this._view.state &= ~4 /* Attached */;\n    }\n    detectChanges() {\n        const fs = this._view.root.rendererFactory;\n        if (fs.begin) {\n            fs.begin();\n        }\n        try {\n            Services.checkAndUpdateView(this._view);\n        }\n        finally {\n            if (fs.end) {\n                fs.end();\n            }\n        }\n    }\n    checkNoChanges() {\n        Services.checkNoChangesView(this._view);\n    }\n    reattach() {\n        this._view.state |= 4 /* Attached */;\n    }\n    onDestroy(callback) {\n        if (!this._view.disposables) {\n            this._view.disposables = [];\n        }\n        this._view.disposables.push(callback);\n    }\n    destroy() {\n        if (this._appRef) {\n            this._appRef.detachView(this);\n        }\n        else if (this._viewContainerRef) {\n            this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));\n        }\n        Services.destroyView(this._view);\n    }\n    detachFromAppRef() {\n        this._appRef = null;\n        renderDetachView$1(this._view);\n        Services.dirtyParentQueries(this._view);\n    }\n    attachToAppRef(appRef) {\n        if (this._viewContainerRef) {\n            throw new Error('This view is already attached to a ViewContainer!');\n        }\n        this._appRef = appRef;\n    }\n    attachToViewContainerRef(vcRef) {\n        if (this._appRef) {\n            throw new Error('This view is already attached directly to the ApplicationRef!');\n        }\n        this._viewContainerRef = vcRef;\n    }\n}\nfunction createTemplateData(view, def) {\n    return new TemplateRef_(view, def);\n}\nclass TemplateRef_ extends TemplateRef {\n    constructor(_parentView, _def) {\n        super();\n        this._parentView = _parentView;\n        this._def = _def;\n    }\n    createEmbeddedView(context) {\n        return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, this._def.element.template, context));\n    }\n    get elementRef() {\n        return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);\n    }\n}\nfunction createInjector$1(view, elDef) {\n    return new Injector_(view, elDef);\n}\nclass Injector_ {\n    constructor(view, elDef) {\n        this.view = view;\n        this.elDef = elDef;\n    }\n    get(token, notFoundValue = Injector.THROW_IF_NOT_FOUND) {\n        const allowPrivateServices = this.elDef ? (this.elDef.flags & 33554432 /* ComponentView */) !== 0 : false;\n        return Services.resolveDep(this.view, this.elDef, allowPrivateServices, { flags: 0 /* None */, token, tokenKey: tokenKey(token) }, notFoundValue);\n    }\n}\nfunction nodeValue(view, index) {\n    const def = view.def.nodes[index];\n    if (def.flags & 1 /* TypeElement */) {\n        const elData = asElementData(view, def.nodeIndex);\n        return def.element.template ? elData.template : elData.renderElement;\n    }\n    else if (def.flags & 2 /* TypeText */) {\n        return asTextData(view, def.nodeIndex).renderText;\n    }\n    else if (def.flags & (20224 /* CatProvider */ | 16 /* TypePipe */)) {\n        return asProviderData(view, def.nodeIndex).instance;\n    }\n    throw new Error(`Illegal state: read nodeValue for node index ${index}`);\n}\nfunction createNgModuleRef(moduleType, parent, bootstrapComponents, def) {\n    return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);\n}\nclass NgModuleRef_ {\n    constructor(_moduleType, _parent, _bootstrapComponents, _def) {\n        this._moduleType = _moduleType;\n        this._parent = _parent;\n        this._bootstrapComponents = _bootstrapComponents;\n        this._def = _def;\n        this._destroyListeners = [];\n        this._destroyed = false;\n        this.injector = this;\n        initNgModule(this);\n    }\n    get(token, notFoundValue = Injector.THROW_IF_NOT_FOUND, injectFlags = InjectFlags.Default) {\n        let flags = 0 /* None */;\n        if (injectFlags & InjectFlags.SkipSelf) {\n            flags |= 1 /* SkipSelf */;\n        }\n        else if (injectFlags & InjectFlags.Self) {\n            flags |= 4 /* Self */;\n        }\n        return resolveNgModuleDep(this, { token: token, tokenKey: tokenKey(token), flags: flags }, notFoundValue);\n    }\n    get instance() {\n        return this.get(this._moduleType);\n    }\n    get componentFactoryResolver() {\n        return this.get(ComponentFactoryResolver);\n    }\n    destroy() {\n        if (this._destroyed) {\n            throw new Error(`The ng module ${stringify(this.instance.constructor)} has already been destroyed.`);\n        }\n        this._destroyed = true;\n        callNgModuleLifecycle(this, 131072 /* OnDestroy */);\n        this._destroyListeners.forEach((listener) => listener());\n    }\n    onDestroy(callback) {\n        this._destroyListeners.push(callback);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst Renderer2TokenKey = tokenKey(Renderer2);\nconst ElementRefTokenKey = tokenKey(ElementRef);\nconst ViewContainerRefTokenKey = tokenKey(ViewContainerRef);\nconst TemplateRefTokenKey = tokenKey(TemplateRef);\nconst ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);\nconst InjectorRefTokenKey$1 = tokenKey(Injector);\nconst INJECTORRefTokenKey$1 = tokenKey(INJECTOR$1);\nfunction directiveDef(checkIndex, flags, matchedQueries, childCount, ctor, deps, props, outputs) {\n    const bindings = [];\n    if (props) {\n        for (let prop in props) {\n            const [bindingIndex, nonMinifiedName] = props[prop];\n            bindings[bindingIndex] = {\n                flags: 8 /* TypeProperty */,\n                name: prop,\n                nonMinifiedName,\n                ns: null,\n                securityContext: null,\n                suffix: null\n            };\n        }\n    }\n    const outputDefs = [];\n    if (outputs) {\n        for (let propName in outputs) {\n            outputDefs.push({ type: 1 /* DirectiveOutput */, propName, target: null, eventName: outputs[propName] });\n        }\n    }\n    flags |= 16384 /* TypeDirective */;\n    return _def(checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs);\n}\nfunction pipeDef(flags, ctor, deps) {\n    flags |= 16 /* TypePipe */;\n    return _def(-1, flags, null, 0, ctor, ctor, deps);\n}\nfunction providerDef(flags, matchedQueries, token, value, deps) {\n    return _def(-1, flags, matchedQueries, 0, token, value, deps);\n}\nfunction _def(checkIndex, flags, matchedQueriesDsl, childCount, token, value, deps, bindings, outputs) {\n    const { matchedQueries, references, matchedQueryIds } = splitMatchedQueriesDsl(matchedQueriesDsl);\n    if (!outputs) {\n        outputs = [];\n    }\n    if (!bindings) {\n        bindings = [];\n    }\n    // Need to resolve forwardRefs as e.g. for `useValue` we\n    // lowered the expression and then stopped evaluating it,\n    // i.e. also didn't unwrap it.\n    value = resolveForwardRef(value);\n    const depDefs = splitDepsDsl(deps, stringify(token));\n    return {\n        // will bet set by the view definition\n        nodeIndex: -1,\n        parent: null,\n        renderParent: null,\n        bindingIndex: -1,\n        outputIndex: -1,\n        // regular values\n        checkIndex,\n        flags,\n        childFlags: 0,\n        directChildFlags: 0,\n        childMatchedQueries: 0,\n        matchedQueries,\n        matchedQueryIds,\n        references,\n        ngContentIndex: -1,\n        childCount,\n        bindings,\n        bindingFlags: calcBindingFlags(bindings),\n        outputs,\n        element: null,\n        provider: { token, value, deps: depDefs },\n        text: null,\n        query: null,\n        ngContent: null\n    };\n}\nfunction createProviderInstance(view, def) {\n    return _createProviderInstance$1(view, def);\n}\nfunction createPipeInstance(view, def) {\n    // deps are looked up from component.\n    let compView = view;\n    while (compView.parent && !isComponentView(compView)) {\n        compView = compView.parent;\n    }\n    // pipes can see the private services of the component\n    const allowPrivateServices = true;\n    // pipes are always eager and classes!\n    return createClass(compView.parent, viewParentEl(compView), allowPrivateServices, def.provider.value, def.provider.deps);\n}\nfunction createDirectiveInstance(view, def) {\n    // components can see other private services, other directives can't.\n    const allowPrivateServices = (def.flags & 32768 /* Component */) > 0;\n    // directives are always eager and classes!\n    const instance = createClass(view, def.parent, allowPrivateServices, def.provider.value, def.provider.deps);\n    if (def.outputs.length) {\n        for (let i = 0; i < def.outputs.length; i++) {\n            const output = def.outputs[i];\n            const outputObservable = instance[output.propName];\n            if (isObservable(outputObservable)) {\n                const subscription = outputObservable.subscribe(eventHandlerClosure(view, def.parent.nodeIndex, output.eventName));\n                view.disposables[def.outputIndex + i] = subscription.unsubscribe.bind(subscription);\n            }\n            else {\n                throw new Error(`@Output ${output.propName} not initialized in '${instance.constructor.name}'.`);\n            }\n        }\n    }\n    return instance;\n}\nfunction eventHandlerClosure(view, index, eventName) {\n    return (event) => dispatchEvent(view, index, eventName, event);\n}\nfunction checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    const providerData = asProviderData(view, def.nodeIndex);\n    const directive = providerData.instance;\n    let changed = false;\n    let changes = undefined;\n    const bindLen = def.bindings.length;\n    if (bindLen > 0 && checkBinding(view, def, 0, v0)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 0, v0, changes);\n    }\n    if (bindLen > 1 && checkBinding(view, def, 1, v1)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 1, v1, changes);\n    }\n    if (bindLen > 2 && checkBinding(view, def, 2, v2)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 2, v2, changes);\n    }\n    if (bindLen > 3 && checkBinding(view, def, 3, v3)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 3, v3, changes);\n    }\n    if (bindLen > 4 && checkBinding(view, def, 4, v4)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 4, v4, changes);\n    }\n    if (bindLen > 5 && checkBinding(view, def, 5, v5)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 5, v5, changes);\n    }\n    if (bindLen > 6 && checkBinding(view, def, 6, v6)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 6, v6, changes);\n    }\n    if (bindLen > 7 && checkBinding(view, def, 7, v7)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 7, v7, changes);\n    }\n    if (bindLen > 8 && checkBinding(view, def, 8, v8)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 8, v8, changes);\n    }\n    if (bindLen > 9 && checkBinding(view, def, 9, v9)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 9, v9, changes);\n    }\n    if (changes) {\n        directive.ngOnChanges(changes);\n    }\n    if ((def.flags & 65536 /* OnInit */) &&\n        shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {\n        directive.ngOnInit();\n    }\n    if (def.flags & 262144 /* DoCheck */) {\n        directive.ngDoCheck();\n    }\n    return changed;\n}\nfunction checkAndUpdateDirectiveDynamic(view, def, values) {\n    const providerData = asProviderData(view, def.nodeIndex);\n    const directive = providerData.instance;\n    let changed = false;\n    let changes = undefined;\n    for (let i = 0; i < values.length; i++) {\n        if (checkBinding(view, def, i, values[i])) {\n            changed = true;\n            changes = updateProp(view, providerData, def, i, values[i], changes);\n        }\n    }\n    if (changes) {\n        directive.ngOnChanges(changes);\n    }\n    if ((def.flags & 65536 /* OnInit */) &&\n        shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {\n        directive.ngOnInit();\n    }\n    if (def.flags & 262144 /* DoCheck */) {\n        directive.ngDoCheck();\n    }\n    return changed;\n}\nfunction _createProviderInstance$1(view, def) {\n    // private services can see other private services\n    const allowPrivateServices = (def.flags & 8192 /* PrivateProvider */) > 0;\n    const providerDef = def.provider;\n    switch (def.flags & 201347067 /* Types */) {\n        case 512 /* TypeClassProvider */:\n            return createClass(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);\n        case 1024 /* TypeFactoryProvider */:\n            return callFactory(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);\n        case 2048 /* TypeUseExistingProvider */:\n            return resolveDep(view, def.parent, allowPrivateServices, providerDef.deps[0]);\n        case 256 /* TypeValueProvider */:\n            return providerDef.value;\n    }\n}\nfunction createClass(view, elDef, allowPrivateServices, ctor, deps) {\n    const len = deps.length;\n    switch (len) {\n        case 0:\n            return new ctor();\n        case 1:\n            return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n        case 2:\n            return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));\n        case 3:\n            return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));\n        default:\n            const depValues = [];\n            for (let i = 0; i < len; i++) {\n                depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i]));\n            }\n            return new ctor(...depValues);\n    }\n}\nfunction callFactory(view, elDef, allowPrivateServices, factory, deps) {\n    const len = deps.length;\n    switch (len) {\n        case 0:\n            return factory();\n        case 1:\n            return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n        case 2:\n            return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));\n        case 3:\n            return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));\n        default:\n            const depValues = [];\n            for (let i = 0; i < len; i++) {\n                depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i]));\n            }\n            return factory(...depValues);\n    }\n}\n// This default value is when checking the hierarchy for a token.\n//\n// It means both:\n// - the token is not provided by the current injector,\n// - only the element injectors should be checked (ie do not check module injectors\n//\n//          mod1\n//         /\n//       el1   mod2\n//         \\  /\n//         el2\n//\n// When requesting el2.injector.get(token), we should check in the following order and return the\n// first found value:\n// - el2.injector.get(token, default)\n// - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module\n// - mod2.injector.get(token, default)\nconst NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\nfunction resolveDep(view, elDef, allowPrivateServices, depDef, notFoundValue = Injector.THROW_IF_NOT_FOUND) {\n    if (depDef.flags & 8 /* Value */) {\n        return depDef.token;\n    }\n    const startView = view;\n    if (depDef.flags & 2 /* Optional */) {\n        notFoundValue = null;\n    }\n    const tokenKey = depDef.tokenKey;\n    if (tokenKey === ChangeDetectorRefTokenKey) {\n        // directives on the same element as a component should be able to control the change detector\n        // of that component as well.\n        allowPrivateServices = !!(elDef && elDef.element.componentView);\n    }\n    if (elDef && (depDef.flags & 1 /* SkipSelf */)) {\n        allowPrivateServices = false;\n        elDef = elDef.parent;\n    }\n    let searchView = view;\n    while (searchView) {\n        if (elDef) {\n            switch (tokenKey) {\n                case Renderer2TokenKey: {\n                    const compView = findCompView(searchView, elDef, allowPrivateServices);\n                    return compView.renderer;\n                }\n                case ElementRefTokenKey:\n                    return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement);\n                case ViewContainerRefTokenKey:\n                    return asElementData(searchView, elDef.nodeIndex).viewContainer;\n                case TemplateRefTokenKey: {\n                    if (elDef.element.template) {\n                        return asElementData(searchView, elDef.nodeIndex).template;\n                    }\n                    break;\n                }\n                case ChangeDetectorRefTokenKey: {\n                    let cdView = findCompView(searchView, elDef, allowPrivateServices);\n                    return createChangeDetectorRef(cdView);\n                }\n                case InjectorRefTokenKey$1:\n                case INJECTORRefTokenKey$1:\n                    return createInjector$1(searchView, elDef);\n                default:\n                    const providerDef = (allowPrivateServices ? elDef.element.allProviders :\n                        elDef.element.publicProviders)[tokenKey];\n                    if (providerDef) {\n                        let providerData = asProviderData(searchView, providerDef.nodeIndex);\n                        if (!providerData) {\n                            providerData = { instance: _createProviderInstance$1(searchView, providerDef) };\n                            searchView.nodes[providerDef.nodeIndex] = providerData;\n                        }\n                        return providerData.instance;\n                    }\n            }\n        }\n        allowPrivateServices = isComponentView(searchView);\n        elDef = viewParentEl(searchView);\n        searchView = searchView.parent;\n        if (depDef.flags & 4 /* Self */) {\n            searchView = null;\n        }\n    }\n    const value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);\n    if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n        notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n        // Return the value from the root element injector when\n        // - it provides it\n        //   (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n        // - the module injector should not be checked\n        //   (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n        return value;\n    }\n    return startView.root.ngModule.injector.get(depDef.token, notFoundValue);\n}\nfunction findCompView(view, elDef, allowPrivateServices) {\n    let compView;\n    if (allowPrivateServices) {\n        compView = asElementData(view, elDef.nodeIndex).componentView;\n    }\n    else {\n        compView = view;\n        while (compView.parent && !isComponentView(compView)) {\n            compView = compView.parent;\n        }\n    }\n    return compView;\n}\nfunction updateProp(view, providerData, def, bindingIdx, value, changes) {\n    if (def.flags & 32768 /* Component */) {\n        const compView = asElementData(view, def.parent.nodeIndex).componentView;\n        if (compView.def.flags & 2 /* OnPush */) {\n            compView.state |= 8 /* ChecksEnabled */;\n        }\n    }\n    const binding = def.bindings[bindingIdx];\n    const propName = binding.name;\n    // Note: This is still safe with Closure Compiler as\n    // the user passed in the property name as an object has to `providerDef`,\n    // so Closure Compiler will have renamed the property correctly already.\n    providerData.instance[propName] = value;\n    if (def.flags & 524288 /* OnChanges */) {\n        changes = changes || {};\n        const oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);\n        const binding = def.bindings[bindingIdx];\n        changes[binding.nonMinifiedName] =\n            new SimpleChange(oldValue, value, (view.state & 2 /* FirstCheck */) !== 0);\n    }\n    view.oldValues[def.bindingIndex + bindingIdx] = value;\n    return changes;\n}\n// This function calls the ngAfterContentCheck, ngAfterContentInit,\n// ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node\n// flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are\n// called during a pre-order traversal of the view tree (that is calling the\n// parent hooks before the child hooks) these events are sent in using a\n// post-order traversal of the tree (children before parents). This changes the\n// meaning of initIndex in the view state. For ngOnInit, initIndex tracks the\n// expected nodeIndex which a ngOnInit should be called. When sending\n// ngAfterContentInit and ngAfterViewInit it is the expected count of\n// ngAfterContentInit or ngAfterViewInit methods that have been called. This\n// ensure that despite being called recursively or after picking up after an\n// exception, the ngAfterContentInit or ngAfterViewInit will be called on the\n// correct nodes. Consider for example, the following (where E is an element\n// and D is a directive)\n//  Tree:       pre-order index  post-order index\n//    E1        0                6\n//      E2      1                1\n//       D3     2                0\n//      E4      3                5\n//       E5     4                4\n//        E6    5                2\n//        E7    6                3\n// As can be seen, the post-order index has an unclear relationship to the\n// pre-order index (postOrderIndex === preOrderIndex - parentCount +\n// childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit\n// are stable (will be the same for the same view regardless of exceptions or\n// recursion) we just need to count them which will roughly correspond to the\n// post-order index (it skips elements and directives that do not have\n// lifecycle hooks).\n//\n// For example, if an exception is raised in the E6.onAfterViewInit() the\n// initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to\n// initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will\n// not have their ngAfterViewInit() called but, starting with E7, the rest of\n// the view will begin getting ngAfterViewInit() called until a check and\n// pass is complete.\n//\n// This algorthim also handles recursion. Consider if E4's ngAfterViewInit()\n// indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected\n// initIndex is set to 6, the recusive checkAndUpdateView() starts walk again.\n// D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1.\n// When the recursion returns the initIndex will be 7 so E1 is skipped as it\n// has already been called in the recursively called checkAnUpdateView().\nfunction callLifecycleHooksChildrenFirst(view, lifecycles) {\n    if (!(view.def.nodeFlags & lifecycles)) {\n        return;\n    }\n    const nodes = view.def.nodes;\n    let initIndex = 0;\n    for (let i = 0; i < nodes.length; i++) {\n        const nodeDef = nodes[i];\n        let parent = nodeDef.parent;\n        if (!parent && nodeDef.flags & lifecycles) {\n            // matching root node (e.g. a pipe)\n            callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n        }\n        if ((nodeDef.childFlags & lifecycles) === 0) {\n            // no child matches one of the lifecycles\n            i += nodeDef.childCount;\n        }\n        while (parent && (parent.flags & 1 /* TypeElement */) &&\n            i === parent.nodeIndex + parent.childCount) {\n            // last child of an element\n            if (parent.directChildFlags & lifecycles) {\n                initIndex = callElementProvidersLifecycles(view, parent, lifecycles, initIndex);\n            }\n            parent = parent.parent;\n        }\n    }\n}\nfunction callElementProvidersLifecycles(view, elDef, lifecycles, initIndex) {\n    for (let i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {\n        const nodeDef = view.def.nodes[i];\n        if (nodeDef.flags & lifecycles) {\n            callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n        }\n        // only visit direct children\n        i += nodeDef.childCount;\n    }\n    return initIndex;\n}\nfunction callProviderLifecycles(view, index, lifecycles, initIndex) {\n    const providerData = asProviderData(view, index);\n    if (!providerData) {\n        return;\n    }\n    const provider = providerData.instance;\n    if (!provider) {\n        return;\n    }\n    Services.setCurrentNode(view, index);\n    if (lifecycles & 1048576 /* AfterContentInit */ &&\n        shouldCallLifecycleInitHook(view, 512 /* InitState_CallingAfterContentInit */, initIndex)) {\n        provider.ngAfterContentInit();\n    }\n    if (lifecycles & 2097152 /* AfterContentChecked */) {\n        provider.ngAfterContentChecked();\n    }\n    if (lifecycles & 4194304 /* AfterViewInit */ &&\n        shouldCallLifecycleInitHook(view, 768 /* InitState_CallingAfterViewInit */, initIndex)) {\n        provider.ngAfterViewInit();\n    }\n    if (lifecycles & 8388608 /* AfterViewChecked */) {\n        provider.ngAfterViewChecked();\n    }\n    if (lifecycles & 131072 /* OnDestroy */) {\n        provider.ngOnDestroy();\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass ComponentFactoryResolver$1 extends ComponentFactoryResolver {\n    /**\n     * @param ngModule The NgModuleRef to which all resolved factories are bound.\n     */\n    constructor(ngModule) {\n        super();\n        this.ngModule = ngModule;\n    }\n    resolveComponentFactory(component) {\n        ngDevMode && assertComponentType(component);\n        const componentDef = getComponentDef(component);\n        return new ComponentFactory$1(componentDef, this.ngModule);\n    }\n}\nfunction toRefArray(map) {\n    const array = [];\n    for (let nonMinified in map) {\n        if (map.hasOwnProperty(nonMinified)) {\n            const minified = map[nonMinified];\n            array.push({ propName: minified, templateName: nonMinified });\n        }\n    }\n    return array;\n}\nfunction getNamespace$1(elementName) {\n    const name = elementName.toLowerCase();\n    return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);\n}\n/**\n * A change detection scheduler token for {@link RootContext}. This token is the default value used\n * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.\n */\nconst SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', {\n    providedIn: 'root',\n    factory: () => defaultScheduler,\n});\nfunction createChainedInjector(rootViewInjector, moduleInjector) {\n    return {\n        get: (token, notFoundValue, flags) => {\n            const value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);\n            if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n                notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n                // Return the value from the root element injector when\n                // - it provides it\n                //   (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n                // - the module injector should not be checked\n                //   (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n                return value;\n            }\n            return moduleInjector.get(token, notFoundValue, flags);\n        }\n    };\n}\n/**\n * Render3 implementation of {@link viewEngine_ComponentFactory}.\n */\nclass ComponentFactory$1 extends ComponentFactory {\n    /**\n     * @param componentDef The component definition.\n     * @param ngModule The NgModuleRef to which the factory is bound.\n     */\n    constructor(componentDef, ngModule) {\n        super();\n        this.componentDef = componentDef;\n        this.ngModule = ngModule;\n        this.componentType = componentDef.type;\n        this.selector = stringifyCSSSelectorList(componentDef.selectors);\n        this.ngContentSelectors =\n            componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];\n        this.isBoundToModule = !!ngModule;\n    }\n    get inputs() {\n        return toRefArray(this.componentDef.inputs);\n    }\n    get outputs() {\n        return toRefArray(this.componentDef.outputs);\n    }\n    create(injector, projectableNodes, rootSelectorOrNode, ngModule) {\n        ngModule = ngModule || this.ngModule;\n        const rootViewInjector = ngModule ? createChainedInjector(injector, ngModule.injector) : injector;\n        const rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3);\n        const sanitizer = rootViewInjector.get(Sanitizer, null);\n        const hostRenderer = rendererFactory.createRenderer(null, this.componentDef);\n        // Determine a tag name used for creating host elements when this component is created\n        // dynamically. Default to 'div' if this component did not specify any tag name in its selector.\n        const elementName = this.componentDef.selectors[0][0] || 'div';\n        const hostRNode = rootSelectorOrNode ?\n            locateHostElement(hostRenderer, rootSelectorOrNode, this.componentDef.encapsulation) :\n            createElementNode(rendererFactory.createRenderer(null, this.componentDef), elementName, getNamespace$1(elementName));\n        const rootFlags = this.componentDef.onPush ? 64 /* Dirty */ | 512 /* IsRoot */ :\n            16 /* CheckAlways */ | 512 /* IsRoot */;\n        const rootContext = createRootContext();\n        // Create the root view. Uses empty TView and ContentTemplate.\n        const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null);\n        const rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector);\n        // rootView is the parent when bootstrapping\n        // TODO(misko): it looks like we are entering view here but we don't really need to as\n        // `renderView` does that. However as the code is written it is needed because\n        // `createRootComponentView` and `createRootComponent` both read global state. Fixing those\n        // issues would allow us to drop this.\n        enterView(rootLView);\n        let component;\n        let tElementNode;\n        try {\n            const componentView = createRootComponentView(hostRNode, this.componentDef, rootLView, rendererFactory, hostRenderer);\n            if (hostRNode) {\n                if (rootSelectorOrNode) {\n                    setUpAttributes(hostRenderer, hostRNode, ['ng-version', VERSION.full]);\n                }\n                else {\n                    // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`\n                    // is not defined), also apply attributes and classes extracted from component selector.\n                    // Extract attributes and classes from the first selector only to match VE behavior.\n                    const { attrs, classes } = extractAttrsAndClassesFromSelector(this.componentDef.selectors[0]);\n                    if (attrs) {\n                        setUpAttributes(hostRenderer, hostRNode, attrs);\n                    }\n                    if (classes && classes.length > 0) {\n                        writeDirectClass(hostRenderer, hostRNode, classes.join(' '));\n                    }\n                }\n            }\n            tElementNode = getTNode(rootTView, HEADER_OFFSET);\n            if (projectableNodes !== undefined) {\n                const projection = tElementNode.projection = [];\n                for (let i = 0; i < this.ngContentSelectors.length; i++) {\n                    const nodesforSlot = projectableNodes[i];\n                    // Projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade\n                    // case). Here we do normalize passed data structure to be an array of arrays to avoid\n                    // complex checks down the line.\n                    // We also normalize the length of the passed in projectable nodes (to match the number of\n                    // <ng-container> slots defined by a component).\n                    projection.push(nodesforSlot != null ? Array.from(nodesforSlot) : null);\n                }\n            }\n            // TODO: should LifecycleHooksFeature and other host features be generated by the compiler and\n            // executed here?\n            // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref\n            component = createRootComponent(componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]);\n            renderView(rootTView, rootLView, null);\n        }\n        finally {\n            leaveView();\n        }\n        return new ComponentRef$1(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode);\n    }\n}\nconst componentFactoryResolver = new ComponentFactoryResolver$1();\n/**\n * Creates a ComponentFactoryResolver and stores it on the injector. Or, if the\n * ComponentFactoryResolver\n * already exists, retrieves the existing ComponentFactoryResolver.\n *\n * @returns The ComponentFactoryResolver instance to use\n */\nfunction injectComponentFactoryResolver() {\n    return componentFactoryResolver;\n}\n/**\n * Represents an instance of a Component created via a {@link ComponentFactory}.\n *\n * `ComponentRef` provides access to the Component Instance as well other objects related to this\n * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}\n * method.\n *\n */\nclass ComponentRef$1 extends ComponentRef {\n    constructor(componentType, instance, location, _rootLView, _tNode) {\n        super();\n        this.location = location;\n        this._rootLView = _rootLView;\n        this._tNode = _tNode;\n        this.instance = instance;\n        this.hostView = this.changeDetectorRef = new RootViewRef(_rootLView);\n        this.componentType = componentType;\n    }\n    get injector() {\n        return new NodeInjector(this._tNode, this._rootLView);\n    }\n    destroy() {\n        this.hostView.destroy();\n    }\n    onDestroy(callback) {\n        this.hostView.onDestroy(callback);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Adds decorator, constructor, and property metadata to a given type via static metadata fields\n * on the type.\n *\n * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.\n *\n * Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments\n * being tree-shaken away during production builds.\n */\nfunction setClassMetadata(type, decorators, ctorParameters, propDecorators) {\n    return noSideEffects(() => {\n        const clazz = type;\n        if (decorators !== null) {\n            if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) {\n                clazz.decorators.push(...decorators);\n            }\n            else {\n                clazz.decorators = decorators;\n            }\n        }\n        if (ctorParameters !== null) {\n            // Rather than merging, clobber the existing parameters. If other projects exist which\n            // use tsickle-style annotations and reflect over them in the same way, this could\n            // cause issues, but that is vanishingly unlikely.\n            clazz.ctorParameters = ctorParameters;\n        }\n        if (propDecorators !== null) {\n            // The property decorator objects are merged as it is possible different fields have\n            // different decorator types. Decorators on individual fields are not merged, as it's\n            // also incredibly unlikely that a field will be decorated both with an Angular\n            // decorator and a non-Angular decorator that's also been downleveled.\n            if (clazz.hasOwnProperty('propDecorators') && clazz.propDecorators !== undefined) {\n                clazz.propDecorators = Object.assign(Object.assign({}, clazz.propDecorators), propDecorators);\n            }\n            else {\n                clazz.propDecorators = propDecorators;\n            }\n        }\n    });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Map of module-id to the corresponding NgModule.\n * - In pre Ivy we track NgModuleFactory,\n * - In post Ivy we track the NgModuleType\n */\nconst modules = new Map();\n/**\n * Registers a loaded module. Should only be called from generated NgModuleFactory code.\n * @publicApi\n */\nfunction registerModuleFactory(id, factory) {\n    const existing = modules.get(id);\n    assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);\n    modules.set(id, factory);\n}\nfunction assertSameOrNotExisting(id, type, incoming) {\n    if (type && type !== incoming) {\n        throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);\n    }\n}\nfunction registerNgModuleType(ngModuleType) {\n    const visited = new Set();\n    recurse(ngModuleType);\n    function recurse(ngModuleType) {\n        // The imports array of an NgModule must refer to other NgModules,\n        // so an error is thrown if no module definition is available.\n        const def = getNgModuleDef(ngModuleType, /* throwNotFound */ true);\n        const id = def.id;\n        if (id !== null) {\n            const existing = modules.get(id);\n            assertSameOrNotExisting(id, existing, ngModuleType);\n            modules.set(id, ngModuleType);\n        }\n        const imports = maybeUnwrapFn(def.imports);\n        for (const i of imports) {\n            if (!visited.has(i)) {\n                visited.add(i);\n                recurse(i);\n            }\n        }\n    }\n}\nfunction clearModulesForTest() {\n    modules.clear();\n}\nfunction getRegisteredNgModuleType(id) {\n    return modules.get(id) || autoRegisterModuleById[id];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass NgModuleRef$1 extends NgModuleRef {\n    constructor(ngModuleType, _parent) {\n        super();\n        this._parent = _parent;\n        // tslint:disable-next-line:require-internal-with-underscore\n        this._bootstrapComponents = [];\n        this.injector = this;\n        this.destroyCbs = [];\n        // When bootstrapping a module we have a dependency graph that looks like this:\n        // ApplicationRef -> ComponentFactoryResolver -> NgModuleRef. The problem is that if the\n        // module being resolved tries to inject the ComponentFactoryResolver, it'll create a\n        // circular dependency which will result in a runtime error, because the injector doesn't\n        // exist yet. We work around the issue by creating the ComponentFactoryResolver ourselves\n        // and providing it, rather than letting the injector resolve it.\n        this.componentFactoryResolver = new ComponentFactoryResolver$1(this);\n        const ngModuleDef = getNgModuleDef(ngModuleType);\n        ngDevMode &&\n            assertDefined(ngModuleDef, `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`);\n        const ngLocaleIdDef = getNgLocaleIdDef(ngModuleType);\n        ngLocaleIdDef && setLocaleId(ngLocaleIdDef);\n        this._bootstrapComponents = maybeUnwrapFn(ngModuleDef.bootstrap);\n        this._r3Injector = createInjectorWithoutInjectorInstances(ngModuleType, _parent, [\n            { provide: NgModuleRef, useValue: this }, {\n                provide: ComponentFactoryResolver,\n                useValue: this.componentFactoryResolver\n            }\n        ], stringify(ngModuleType));\n        // We need to resolve the injector types separately from the injector creation, because\n        // the module might be trying to use this ref in its contructor for DI which will cause a\n        // circular error that will eventually error out, because the injector isn't created yet.\n        this._r3Injector._resolveInjectorDefTypes();\n        this.instance = this.get(ngModuleType);\n    }\n    get(token, notFoundValue = Injector.THROW_IF_NOT_FOUND, injectFlags = InjectFlags.Default) {\n        if (token === Injector || token === NgModuleRef || token === INJECTOR$1) {\n            return this;\n        }\n        return this._r3Injector.get(token, notFoundValue, injectFlags);\n    }\n    destroy() {\n        ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n        const injector = this._r3Injector;\n        !injector.destroyed && injector.destroy();\n        this.destroyCbs.forEach(fn => fn());\n        this.destroyCbs = null;\n    }\n    onDestroy(callback) {\n        ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n        this.destroyCbs.push(callback);\n    }\n}\nclass NgModuleFactory$1 extends NgModuleFactory {\n    constructor(moduleType) {\n        super();\n        this.moduleType = moduleType;\n        const ngModuleDef = getNgModuleDef(moduleType);\n        if (ngModuleDef !== null) {\n            // Register the NgModule with Angular's module registry. The location (and hence timing) of\n            // this call is critical to ensure this works correctly (modules get registered when expected)\n            // without bloating bundles (modules are registered when otherwise not referenced).\n            //\n            // In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has\n            // several practical consequences:\n            //\n            // - If an .ngfactory file is not imported from, the module won't be registered (and can be\n            //   tree shaken).\n            // - If an .ngfactory file is imported from, the module will be registered even if an instance\n            //   is not actually created (via `create` below).\n            // - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's\n            //   imports,\n            //\n            // In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are\n            // not a required API to use - there are other ways to obtain an NgModuleFactory for a given\n            // NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead,\n            // the side effect of registration is added here, in the constructor of NgModuleFactory,\n            // ensuring no matter how a factory is created, the module is registered correctly.\n            //\n            // An alternative would be to include the registration side effect inline following the actual\n            // NgModule definition. This also has the correct timing, but breaks tree-shaking - modules\n            // will be registered and retained even if they're otherwise never referenced.\n            registerNgModuleType(moduleType);\n        }\n    }\n    create(parentInjector) {\n        return new NgModuleRef$1(this.moduleType, parentInjector);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Bindings for pure functions are stored after regular bindings.\n *\n * |-------decls------|---------vars---------|                 |----- hostVars (dir1) ------|\n * ------------------------------------------------------------------------------------------\n * | nodes/refs/pipes | bindings | fn slots  | injector | dir1 | host bindings | host slots |\n * ------------------------------------------------------------------------------------------\n *                    ^                      ^\n *      TView.bindingStartIndex      TView.expandoStartIndex\n *\n * Pure function instructions are given an offset from the binding root. Adding the offset to the\n * binding root gives the first index where the bindings are stored. In component views, the binding\n * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +\n * any directive instances + any hostVars in directives evaluated before it.\n *\n * See VIEW_DATA.md for more information about host binding resolution.\n */\n/**\n * If the value hasn't been saved, calls the pure function to store and return the\n * value. If it has been saved, returns the saved value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns a value\n * @param thisArg Optional calling context of pureFn\n * @returns value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction0(slotOffset, pureFn, thisArg) {\n    const bindingIndex = getBindingRoot() + slotOffset;\n    const lView = getLView();\n    return lView[bindingIndex] === NO_CHANGE ?\n        updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) :\n        getBinding(lView, bindingIndex);\n}\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction1(slotOffset, pureFn, exp, thisArg) {\n    return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction2(slotOffset, pureFn, exp1, exp2, thisArg) {\n    return pureFunction2Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction3(slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n    return pureFunction3Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction4(slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n    return pureFunction4Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction5(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {\n    const bindingIndex = getBindingRoot() + slotOffset;\n    const lView = getLView();\n    const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n    return bindingUpdated(lView, bindingIndex + 4, exp5) || different ?\n        updateBinding(lView, bindingIndex + 5, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) :\n            pureFn(exp1, exp2, exp3, exp4, exp5)) :\n        getBinding(lView, bindingIndex + 5);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction6(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {\n    const bindingIndex = getBindingRoot() + slotOffset;\n    const lView = getLView();\n    const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n    return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different ?\n        updateBinding(lView, bindingIndex + 6, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) :\n            pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) :\n        getBinding(lView, bindingIndex + 6);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {\n    const bindingIndex = getBindingRoot() + slotOffset;\n    const lView = getLView();\n    let different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n    return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different ?\n        updateBinding(lView, bindingIndex + 7, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) :\n            pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) :\n        getBinding(lView, bindingIndex + 7);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {\n    const bindingIndex = getBindingRoot() + slotOffset;\n    const lView = getLView();\n    const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n    return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different ?\n        updateBinding(lView, bindingIndex + 8, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) :\n            pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) :\n        getBinding(lView, bindingIndex + 8);\n}\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunctionV(slotOffset, pureFn, exps, thisArg) {\n    return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg);\n}\n/**\n * Results of a pure function invocation are stored in LView in a dedicated slot that is initialized\n * to NO_CHANGE. In rare situations a pure pipe might throw an exception on the very first\n * invocation and not produce any valid results. In this case LView would keep holding the NO_CHANGE\n * value. The NO_CHANGE is not something that we can use in expressions / bindings thus we convert\n * it to `undefined`.\n */\nfunction getPureFunctionReturnValue(lView, returnValueIndex) {\n    ngDevMode && assertIndexInRange(lView, returnValueIndex);\n    const lastReturnValue = lView[returnValueIndex];\n    return lastReturnValue === NO_CHANGE ? undefined : lastReturnValue;\n}\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction1Internal(lView, bindingRoot, slotOffset, pureFn, exp, thisArg) {\n    const bindingIndex = bindingRoot + slotOffset;\n    return bindingUpdated(lView, bindingIndex, exp) ?\n        updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n        getPureFunctionReturnValue(lView, bindingIndex + 1);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction2Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, thisArg) {\n    const bindingIndex = bindingRoot + slotOffset;\n    return bindingUpdated2(lView, bindingIndex, exp1, exp2) ?\n        updateBinding(lView, bindingIndex + 2, thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n        getPureFunctionReturnValue(lView, bindingIndex + 2);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction3Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n    const bindingIndex = bindingRoot + slotOffset;\n    return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ?\n        updateBinding(lView, bindingIndex + 3, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :\n        getPureFunctionReturnValue(lView, bindingIndex + 3);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n */\nfunction pureFunction4Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n    const bindingIndex = bindingRoot + slotOffset;\n    return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) ?\n        updateBinding(lView, bindingIndex + 4, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :\n        getPureFunctionReturnValue(lView, bindingIndex + 4);\n}\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunctionVInternal(lView, bindingRoot, slotOffset, pureFn, exps, thisArg) {\n    let bindingIndex = bindingRoot + slotOffset;\n    let different = false;\n    for (let i = 0; i < exps.length; i++) {\n        bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);\n    }\n    return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) :\n        getPureFunctionReturnValue(lView, bindingIndex);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Create a pipe.\n *\n * @param index Pipe index where the pipe will be stored.\n * @param pipeName The name of the pipe\n * @returns T the instance of the pipe.\n *\n * @codeGenApi\n */\nfunction ɵɵpipe(index, pipeName) {\n    const tView = getTView();\n    let pipeDef;\n    const adjustedIndex = index + HEADER_OFFSET;\n    if (tView.firstCreatePass) {\n        pipeDef = getPipeDef$1(pipeName, tView.pipeRegistry);\n        tView.data[adjustedIndex] = pipeDef;\n        if (pipeDef.onDestroy) {\n            (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);\n        }\n    }\n    else {\n        pipeDef = tView.data[adjustedIndex];\n    }\n    const pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true));\n    const previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject);\n    try {\n        // DI for pipes is supposed to behave like directives when placed on a component\n        // host node, which means that we have to disable access to `viewProviders`.\n        const previousIncludeViewProviders = setIncludeViewProviders(false);\n        const pipeInstance = pipeFactory();\n        setIncludeViewProviders(previousIncludeViewProviders);\n        store(tView, getLView(), adjustedIndex, pipeInstance);\n        return pipeInstance;\n    }\n    finally {\n        // we have to restore the injector implementation in finally, just in case the creation of the\n        // pipe throws an error.\n        setInjectImplementation(previousInjectImplementation);\n    }\n}\n/**\n * Searches the pipe registry for a pipe with the given name. If one is found,\n * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.\n *\n * @param name Name of pipe to resolve\n * @param registry Full list of available pipes\n * @returns Matching PipeDef\n */\nfunction getPipeDef$1(name, registry) {\n    if (registry) {\n        for (let i = registry.length - 1; i >= 0; i--) {\n            const pipeDef = registry[i];\n            if (name === pipeDef.name) {\n                return pipeDef;\n            }\n        }\n    }\n    throw new RuntimeError(\"302\" /* PIPE_NOT_FOUND */, `The pipe '${name}' could not be found!`);\n}\n/**\n * Invokes a pipe with 1 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind1(index, slotOffset, v1) {\n    const adjustedIndex = index + HEADER_OFFSET;\n    const lView = getLView();\n    const pipeInstance = load(lView, adjustedIndex);\n    return unwrapValue$1(lView, isPure(lView, adjustedIndex) ?\n        pureFunction1Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, pipeInstance) :\n        pipeInstance.transform(v1));\n}\n/**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind2(index, slotOffset, v1, v2) {\n    const adjustedIndex = index + HEADER_OFFSET;\n    const lView = getLView();\n    const pipeInstance = load(lView, adjustedIndex);\n    return unwrapValue$1(lView, isPure(lView, adjustedIndex) ?\n        pureFunction2Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, pipeInstance) :\n        pipeInstance.transform(v1, v2));\n}\n/**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 4rd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind3(index, slotOffset, v1, v2, v3) {\n    const adjustedIndex = index + HEADER_OFFSET;\n    const lView = getLView();\n    const pipeInstance = load(lView, adjustedIndex);\n    return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction3Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) :\n        pipeInstance.transform(v1, v2, v3));\n}\n/**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 3rd argument to {@link PipeTransform#transform}.\n * @param v4 4th argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind4(index, slotOffset, v1, v2, v3, v4) {\n    const adjustedIndex = index + HEADER_OFFSET;\n    const lView = getLView();\n    const pipeInstance = load(lView, adjustedIndex);\n    return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction4Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :\n        pipeInstance.transform(v1, v2, v3, v4));\n}\n/**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBindV(index, slotOffset, values) {\n    const adjustedIndex = index + HEADER_OFFSET;\n    const lView = getLView();\n    const pipeInstance = load(lView, adjustedIndex);\n    return unwrapValue$1(lView, isPure(lView, adjustedIndex) ?\n        pureFunctionVInternal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, values, pipeInstance) :\n        pipeInstance.transform.apply(pipeInstance, values));\n}\nfunction isPure(lView, index) {\n    return lView[TVIEW].data[index].pure;\n}\n/**\n * Unwrap the output of a pipe transformation.\n * In order to trick change detection into considering that the new value is always different from\n * the old one, the old value is overwritten by NO_CHANGE.\n *\n * @param newValue the pipe transformation output.\n */\nfunction unwrapValue$1(lView, newValue) {\n    if (WrappedValue.isWrapped(newValue)) {\n        newValue = WrappedValue.unwrap(newValue);\n        // The NO_CHANGE value needs to be written at the index where the impacted binding value is\n        // stored\n        const bindingToInvalidateIdx = getBindingIndex();\n        lView[bindingToInvalidateIdx] = NO_CHANGE;\n    }\n    return newValue;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass EventEmitter_ extends Subject {\n    constructor(isAsync = false) {\n        super();\n        this.__isAsync = isAsync;\n    }\n    emit(value) {\n        super.next(value);\n    }\n    subscribe(observerOrNext, error, complete) {\n        var _a, _b, _c;\n        let nextFn = observerOrNext;\n        let errorFn = error || (() => null);\n        let completeFn = complete;\n        if (observerOrNext && typeof observerOrNext === 'object') {\n            const observer = observerOrNext;\n            nextFn = (_a = observer.next) === null || _a === void 0 ? void 0 : _a.bind(observer);\n            errorFn = (_b = observer.error) === null || _b === void 0 ? void 0 : _b.bind(observer);\n            completeFn = (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.bind(observer);\n        }\n        if (this.__isAsync) {\n            errorFn = _wrapInTimeout(errorFn);\n            if (nextFn) {\n                nextFn = _wrapInTimeout(nextFn);\n            }\n            if (completeFn) {\n                completeFn = _wrapInTimeout(completeFn);\n            }\n        }\n        const sink = super.subscribe({ next: nextFn, error: errorFn, complete: completeFn });\n        if (observerOrNext instanceof Subscription) {\n            observerOrNext.add(sink);\n        }\n        return sink;\n    }\n}\nfunction _wrapInTimeout(fn) {\n    return (value) => {\n        setTimeout(fn, undefined, value);\n    };\n}\n/**\n * @publicApi\n */\nconst EventEmitter = EventEmitter_;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction symbolIterator() {\n    return this._results[getSymbolIterator()]();\n}\n/**\n * An unmodifiable list of items that Angular keeps up to date when the state\n * of the application changes.\n *\n * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}\n * provide.\n *\n * Implements an iterable interface, therefore it can be used in both ES6\n * javascript `for (var i of items)` loops as well as in Angular templates with\n * `*ngFor=\"let i of myList\"`.\n *\n * Changes can be observed by subscribing to the changes `Observable`.\n *\n * NOTE: In the future this class will implement an `Observable` interface.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * @Component({...})\n * class Container {\n *   @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n * @publicApi\n */\nclass QueryList {\n    /**\n     * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change\n     *     has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in\n     *     the same result)\n     */\n    constructor(_emitDistinctChangesOnly = false) {\n        this._emitDistinctChangesOnly = _emitDistinctChangesOnly;\n        this.dirty = true;\n        this._results = [];\n        this._changesDetected = false;\n        this._changes = null;\n        this.length = 0;\n        this.first = undefined;\n        this.last = undefined;\n        // This function should be declared on the prototype, but doing so there will cause the class\n        // declaration to have side-effects and become not tree-shakable. For this reason we do it in\n        // the constructor.\n        // [getSymbolIterator()](): Iterator<T> { ... }\n        const symbol = getSymbolIterator();\n        const proto = QueryList.prototype;\n        if (!proto[symbol])\n            proto[symbol] = symbolIterator;\n    }\n    /**\n     * Returns `Observable` of `QueryList` notifying the subscriber of changes.\n     */\n    get changes() {\n        return this._changes || (this._changes = new EventEmitter());\n    }\n    /**\n     * Returns the QueryList entry at `index`.\n     */\n    get(index) {\n        return this._results[index];\n    }\n    /**\n     * See\n     * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n     */\n    map(fn) {\n        return this._results.map(fn);\n    }\n    /**\n     * See\n     * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n     */\n    filter(fn) {\n        return this._results.filter(fn);\n    }\n    /**\n     * See\n     * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n     */\n    find(fn) {\n        return this._results.find(fn);\n    }\n    /**\n     * See\n     * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n     */\n    reduce(fn, init) {\n        return this._results.reduce(fn, init);\n    }\n    /**\n     * See\n     * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n     */\n    forEach(fn) {\n        this._results.forEach(fn);\n    }\n    /**\n     * See\n     * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n     */\n    some(fn) {\n        return this._results.some(fn);\n    }\n    /**\n     * Returns a copy of the internal results list as an Array.\n     */\n    toArray() {\n        return this._results.slice();\n    }\n    toString() {\n        return this._results.toString();\n    }\n    /**\n     * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that\n     * on change detection, it will not notify of changes to the queries, unless a new change\n     * occurs.\n     *\n     * @param resultsTree The query results to store\n     * @param identityAccessor Optional function for extracting stable object identity from a value\n     *    in the array. This function is executed for each element of the query result list while\n     *    comparing current query list with the new one (provided as a first argument of the `reset`\n     *    function) to detect if the lists are different. If the function is not provided, elements\n     *    are compared as is (without any pre-processing).\n     */\n    reset(resultsTree, identityAccessor) {\n        // Cast to `QueryListInternal` so that we can mutate fields which are readonly for the usage of\n        // QueryList (but not for QueryList itself.)\n        const self = this;\n        self.dirty = false;\n        const newResultFlat = flatten(resultsTree);\n        if (this._changesDetected = !arrayEquals(self._results, newResultFlat, identityAccessor)) {\n            self._results = newResultFlat;\n            self.length = newResultFlat.length;\n            self.last = newResultFlat[this.length - 1];\n            self.first = newResultFlat[0];\n        }\n    }\n    /**\n     * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n     */\n    notifyOnChanges() {\n        if (this._changes && (this._changesDetected || !this._emitDistinctChangesOnly))\n            this._changes.emit(this);\n    }\n    /** internal */\n    setDirty() {\n        this.dirty = true;\n    }\n    /** internal */\n    destroy() {\n        this.changes.complete();\n        this.changes.unsubscribe();\n    }\n}\nSymbol.iterator;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$7 = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$8 = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst unusedValueToPlacateAjd$2 = unusedValueExportToPlacateAjd$7 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$8;\nclass LQuery_ {\n    constructor(queryList) {\n        this.queryList = queryList;\n        this.matches = null;\n    }\n    clone() {\n        return new LQuery_(this.queryList);\n    }\n    setDirty() {\n        this.queryList.setDirty();\n    }\n}\nclass LQueries_ {\n    constructor(queries = []) {\n        this.queries = queries;\n    }\n    createEmbeddedView(tView) {\n        const tQueries = tView.queries;\n        if (tQueries !== null) {\n            const noOfInheritedQueries = tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;\n            const viewLQueries = [];\n            // An embedded view has queries propagated from a declaration view at the beginning of the\n            // TQueries collection and up until a first content query declared in the embedded view. Only\n            // propagated LQueries are created at this point (LQuery corresponding to declared content\n            // queries will be instantiated from the content query instructions for each directive).\n            for (let i = 0; i < noOfInheritedQueries; i++) {\n                const tQuery = tQueries.getByIndex(i);\n                const parentLQuery = this.queries[tQuery.indexInDeclarationView];\n                viewLQueries.push(parentLQuery.clone());\n            }\n            return new LQueries_(viewLQueries);\n        }\n        return null;\n    }\n    insertView(tView) {\n        this.dirtyQueriesWithMatches(tView);\n    }\n    detachView(tView) {\n        this.dirtyQueriesWithMatches(tView);\n    }\n    dirtyQueriesWithMatches(tView) {\n        for (let i = 0; i < this.queries.length; i++) {\n            if (getTQuery(tView, i).matches !== null) {\n                this.queries[i].setDirty();\n            }\n        }\n    }\n}\nclass TQueryMetadata_ {\n    constructor(predicate, flags, read = null) {\n        this.predicate = predicate;\n        this.flags = flags;\n        this.read = read;\n    }\n}\nclass TQueries_ {\n    constructor(queries = []) {\n        this.queries = queries;\n    }\n    elementStart(tView, tNode) {\n        ngDevMode &&\n            assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n        for (let i = 0; i < this.queries.length; i++) {\n            this.queries[i].elementStart(tView, tNode);\n        }\n    }\n    elementEnd(tNode) {\n        for (let i = 0; i < this.queries.length; i++) {\n            this.queries[i].elementEnd(tNode);\n        }\n    }\n    embeddedTView(tNode) {\n        let queriesForTemplateRef = null;\n        for (let i = 0; i < this.length; i++) {\n            const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;\n            const tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);\n            if (tqueryClone) {\n                tqueryClone.indexInDeclarationView = i;\n                if (queriesForTemplateRef !== null) {\n                    queriesForTemplateRef.push(tqueryClone);\n                }\n                else {\n                    queriesForTemplateRef = [tqueryClone];\n                }\n            }\n        }\n        return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null;\n    }\n    template(tView, tNode) {\n        ngDevMode &&\n            assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n        for (let i = 0; i < this.queries.length; i++) {\n            this.queries[i].template(tView, tNode);\n        }\n    }\n    getByIndex(index) {\n        ngDevMode && assertIndexInRange(this.queries, index);\n        return this.queries[index];\n    }\n    get length() {\n        return this.queries.length;\n    }\n    track(tquery) {\n        this.queries.push(tquery);\n    }\n}\nclass TQuery_ {\n    constructor(metadata, nodeIndex = -1) {\n        this.metadata = metadata;\n        this.matches = null;\n        this.indexInDeclarationView = -1;\n        this.crossesNgTemplate = false;\n        /**\n         * A flag indicating if a given query still applies to nodes it is crossing. We use this flag\n         * (alongside with _declarationNodeIndex) to know when to stop applying content queries to\n         * elements in a template.\n         */\n        this._appliesToNextNode = true;\n        this._declarationNodeIndex = nodeIndex;\n    }\n    elementStart(tView, tNode) {\n        if (this.isApplyingToNode(tNode)) {\n            this.matchTNode(tView, tNode);\n        }\n    }\n    elementEnd(tNode) {\n        if (this._declarationNodeIndex === tNode.index) {\n            this._appliesToNextNode = false;\n        }\n    }\n    template(tView, tNode) {\n        this.elementStart(tView, tNode);\n    }\n    embeddedTView(tNode, childQueryIndex) {\n        if (this.isApplyingToNode(tNode)) {\n            this.crossesNgTemplate = true;\n            // A marker indicating a `<ng-template>` element (a placeholder for query results from\n            // embedded views created based on this `<ng-template>`).\n            this.addMatch(-tNode.index, childQueryIndex);\n            return new TQuery_(this.metadata);\n        }\n        return null;\n    }\n    isApplyingToNode(tNode) {\n        if (this._appliesToNextNode &&\n            (this.metadata.flags & 1 /* descendants */) !== 1 /* descendants */) {\n            const declarationNodeIdx = this._declarationNodeIndex;\n            let parent = tNode.parent;\n            // Determine if a given TNode is a \"direct\" child of a node on which a content query was\n            // declared (only direct children of query's host node can match with the descendants: false\n            // option). There are 3 main use-case / conditions to consider here:\n            // - <needs-target><i #target></i></needs-target>: here <i #target> parent node is a query\n            // host node;\n            // - <needs-target><ng-template [ngIf]=\"true\"><i #target></i></ng-template></needs-target>:\n            // here <i #target> parent node is null;\n            // - <needs-target><ng-container><i #target></i></ng-container></needs-target>: here we need\n            // to go past `<ng-container>` to determine <i #target> parent node (but we shouldn't traverse\n            // up past the query's host node!).\n            while (parent !== null && (parent.type & 8 /* ElementContainer */) &&\n                parent.index !== declarationNodeIdx) {\n                parent = parent.parent;\n            }\n            return declarationNodeIdx === (parent !== null ? parent.index : -1);\n        }\n        return this._appliesToNextNode;\n    }\n    matchTNode(tView, tNode) {\n        const predicate = this.metadata.predicate;\n        if (Array.isArray(predicate)) {\n            for (let i = 0; i < predicate.length; i++) {\n                const name = predicate[i];\n                this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name));\n                // Also try matching the name to a provider since strings can be used as DI tokens too.\n                this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, name, false, false));\n            }\n        }\n        else {\n            if (predicate === TemplateRef) {\n                if (tNode.type & 4 /* Container */) {\n                    this.matchTNodeWithReadOption(tView, tNode, -1);\n                }\n            }\n            else {\n                this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, predicate, false, false));\n            }\n        }\n    }\n    matchTNodeWithReadOption(tView, tNode, nodeMatchIdx) {\n        if (nodeMatchIdx !== null) {\n            const read = this.metadata.read;\n            if (read !== null) {\n                if (read === ElementRef || read === ViewContainerRef ||\n                    read === TemplateRef && (tNode.type & 4 /* Container */)) {\n                    this.addMatch(tNode.index, -2);\n                }\n                else {\n                    const directiveOrProviderIdx = locateDirectiveOrProvider(tNode, tView, read, false, false);\n                    if (directiveOrProviderIdx !== null) {\n                        this.addMatch(tNode.index, directiveOrProviderIdx);\n                    }\n                }\n            }\n            else {\n                this.addMatch(tNode.index, nodeMatchIdx);\n            }\n        }\n    }\n    addMatch(tNodeIdx, matchIdx) {\n        if (this.matches === null) {\n            this.matches = [tNodeIdx, matchIdx];\n        }\n        else {\n            this.matches.push(tNodeIdx, matchIdx);\n        }\n    }\n}\n/**\n * Iterates over local names for a given node and returns directive index\n * (or -1 if a local name points to an element).\n *\n * @param tNode static data of a node to check\n * @param selector selector to match\n * @returns directive index, -1 or null if a selector didn't match any of the local names\n */\nfunction getIdxOfMatchingSelector(tNode, selector) {\n    const localNames = tNode.localNames;\n    if (localNames !== null) {\n        for (let i = 0; i < localNames.length; i += 2) {\n            if (localNames[i] === selector) {\n                return localNames[i + 1];\n            }\n        }\n    }\n    return null;\n}\nfunction createResultByTNodeType(tNode, currentView) {\n    if (tNode.type & (3 /* AnyRNode */ | 8 /* ElementContainer */)) {\n        return createElementRef(tNode, currentView);\n    }\n    else if (tNode.type & 4 /* Container */) {\n        return createTemplateRef(tNode, currentView);\n    }\n    return null;\n}\nfunction createResultForNode(lView, tNode, matchingIdx, read) {\n    if (matchingIdx === -1) {\n        // if read token and / or strategy is not specified, detect it using appropriate tNode type\n        return createResultByTNodeType(tNode, lView);\n    }\n    else if (matchingIdx === -2) {\n        // read a special token from a node injector\n        return createSpecialToken(lView, tNode, read);\n    }\n    else {\n        // read a token\n        return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode);\n    }\n}\nfunction createSpecialToken(lView, tNode, read) {\n    if (read === ElementRef) {\n        return createElementRef(tNode, lView);\n    }\n    else if (read === TemplateRef) {\n        return createTemplateRef(tNode, lView);\n    }\n    else if (read === ViewContainerRef) {\n        ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */);\n        return createContainerRef(tNode, lView);\n    }\n    else {\n        ngDevMode &&\n            throwError(`Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got ${stringify(read)}.`);\n    }\n}\n/**\n * A helper function that creates query results for a given view. This function is meant to do the\n * processing once and only once for a given view instance (a set of results for a given view\n * doesn't change).\n */\nfunction materializeViewResults(tView, lView, tQuery, queryIndex) {\n    const lQuery = lView[QUERIES].queries[queryIndex];\n    if (lQuery.matches === null) {\n        const tViewData = tView.data;\n        const tQueryMatches = tQuery.matches;\n        const result = [];\n        for (let i = 0; i < tQueryMatches.length; i += 2) {\n            const matchedNodeIdx = tQueryMatches[i];\n            if (matchedNodeIdx < 0) {\n                // we at the <ng-template> marker which might have results in views created based on this\n                // <ng-template> - those results will be in separate views though, so here we just leave\n                // null as a placeholder\n                result.push(null);\n            }\n            else {\n                ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n                const tNode = tViewData[matchedNodeIdx];\n                result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n            }\n        }\n        lQuery.matches = result;\n    }\n    return lQuery.matches;\n}\n/**\n * A helper function that collects (already materialized) query results from a tree of views,\n * starting with a provided LView.\n */\nfunction collectQueryResults(tView, lView, queryIndex, result) {\n    const tQuery = tView.queries.getByIndex(queryIndex);\n    const tQueryMatches = tQuery.matches;\n    if (tQueryMatches !== null) {\n        const lViewResults = materializeViewResults(tView, lView, tQuery, queryIndex);\n        for (let i = 0; i < tQueryMatches.length; i += 2) {\n            const tNodeIdx = tQueryMatches[i];\n            if (tNodeIdx > 0) {\n                result.push(lViewResults[i / 2]);\n            }\n            else {\n                const childQueryIndex = tQueryMatches[i + 1];\n                const declarationLContainer = lView[-tNodeIdx];\n                ngDevMode && assertLContainer(declarationLContainer);\n                // collect matches for views inserted in this container\n                for (let i = CONTAINER_HEADER_OFFSET; i < declarationLContainer.length; i++) {\n                    const embeddedLView = declarationLContainer[i];\n                    if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {\n                        collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n                    }\n                }\n                // collect matches for views created from this declaration container and inserted into\n                // different containers\n                if (declarationLContainer[MOVED_VIEWS] !== null) {\n                    const embeddedLViews = declarationLContainer[MOVED_VIEWS];\n                    for (let i = 0; i < embeddedLViews.length; i++) {\n                        const embeddedLView = embeddedLViews[i];\n                        collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n                    }\n                }\n            }\n        }\n    }\n    return result;\n}\n/**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n *\n * @returns `true` if a query got dirty during change detection or if this is a static query\n * resolving in creation mode, `false` otherwise.\n *\n * @codeGenApi\n */\nfunction ɵɵqueryRefresh(queryList) {\n    const lView = getLView();\n    const tView = getTView();\n    const queryIndex = getCurrentQueryIndex();\n    setCurrentQueryIndex(queryIndex + 1);\n    const tQuery = getTQuery(tView, queryIndex);\n    if (queryList.dirty &&\n        (isCreationMode(lView) ===\n            ((tQuery.metadata.flags & 2 /* isStatic */) === 2 /* isStatic */))) {\n        if (tQuery.matches === null) {\n            queryList.reset([]);\n        }\n        else {\n            const result = tQuery.crossesNgTemplate ?\n                collectQueryResults(tView, lView, queryIndex, []) :\n                materializeViewResults(tView, lView, tQuery, queryIndex);\n            queryList.reset(result, unwrapElementRef);\n            queryList.notifyOnChanges();\n        }\n        return true;\n    }\n    return false;\n}\n/**\n * Creates new QueryList, stores the reference in LView and returns QueryList.\n *\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nfunction ɵɵviewQuery(predicate, flags, read) {\n    ngDevMode && assertNumber(flags, 'Expecting flags');\n    const tView = getTView();\n    if (tView.firstCreatePass) {\n        createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1);\n        if ((flags & 2 /* isStatic */) === 2 /* isStatic */) {\n            tView.staticViewQueries = true;\n        }\n    }\n    createLQuery(tView, getLView(), flags);\n}\n/**\n * Registers a QueryList, associated with a content query, for later refresh (part of a view\n * refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nfunction ɵɵcontentQuery(directiveIndex, predicate, flags, read) {\n    ngDevMode && assertNumber(flags, 'Expecting flags');\n    const tView = getTView();\n    if (tView.firstCreatePass) {\n        const tNode = getCurrentTNode();\n        createTQuery(tView, new TQueryMetadata_(predicate, flags, read), tNode.index);\n        saveContentQueryAndDirectiveIndex(tView, directiveIndex);\n        if ((flags & 2 /* isStatic */) === 2 /* isStatic */) {\n            tView.staticContentQueries = true;\n        }\n    }\n    createLQuery(tView, getLView(), flags);\n}\n/**\n * Loads a QueryList corresponding to the current view or content query.\n *\n * @codeGenApi\n */\nfunction ɵɵloadQuery() {\n    return loadQueryInternal(getLView(), getCurrentQueryIndex());\n}\nfunction loadQueryInternal(lView, queryIndex) {\n    ngDevMode &&\n        assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query');\n    ngDevMode && assertIndexInRange(lView[QUERIES].queries, queryIndex);\n    return lView[QUERIES].queries[queryIndex].queryList;\n}\nfunction createLQuery(tView, lView, flags) {\n    const queryList = new QueryList((flags & 4 /* emitDistinctChangesOnly */) === 4 /* emitDistinctChangesOnly */);\n    storeCleanupWithContext(tView, lView, queryList, queryList.destroy);\n    if (lView[QUERIES] === null)\n        lView[QUERIES] = new LQueries_();\n    lView[QUERIES].queries.push(new LQuery_(queryList));\n}\nfunction createTQuery(tView, metadata, nodeIndex) {\n    if (tView.queries === null)\n        tView.queries = new TQueries_();\n    tView.queries.track(new TQuery_(metadata, nodeIndex));\n}\nfunction saveContentQueryAndDirectiveIndex(tView, directiveIndex) {\n    const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n    const lastSavedDirectiveIndex = tViewContentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1;\n    if (directiveIndex !== lastSavedDirectiveIndex) {\n        tViewContentQueries.push(tView.queries.length - 1, directiveIndex);\n    }\n}\nfunction getTQuery(tView, index) {\n    ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery');\n    return tView.queries.getByIndex(index);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the\n * `<ng-template>` element.\n *\n * @codeGenApi\n */\nfunction ɵɵtemplateRefExtractor(tNode, lView) {\n    return createTemplateRef(tNode, lView);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0$c = () => ({\n    'ɵɵattribute': ɵɵattribute,\n    'ɵɵattributeInterpolate1': ɵɵattributeInterpolate1,\n    'ɵɵattributeInterpolate2': ɵɵattributeInterpolate2,\n    'ɵɵattributeInterpolate3': ɵɵattributeInterpolate3,\n    'ɵɵattributeInterpolate4': ɵɵattributeInterpolate4,\n    'ɵɵattributeInterpolate5': ɵɵattributeInterpolate5,\n    'ɵɵattributeInterpolate6': ɵɵattributeInterpolate6,\n    'ɵɵattributeInterpolate7': ɵɵattributeInterpolate7,\n    'ɵɵattributeInterpolate8': ɵɵattributeInterpolate8,\n    'ɵɵattributeInterpolateV': ɵɵattributeInterpolateV,\n    'ɵɵdefineComponent': ɵɵdefineComponent,\n    'ɵɵdefineDirective': ɵɵdefineDirective,\n    'ɵɵdefineInjectable': ɵɵdefineInjectable,\n    'ɵɵdefineInjector': ɵɵdefineInjector,\n    'ɵɵdefineNgModule': ɵɵdefineNgModule,\n    'ɵɵdefinePipe': ɵɵdefinePipe,\n    'ɵɵdirectiveInject': ɵɵdirectiveInject,\n    'ɵɵgetInheritedFactory': ɵɵgetInheritedFactory,\n    'ɵɵinject': ɵɵinject,\n    'ɵɵinjectAttribute': ɵɵinjectAttribute,\n    'ɵɵinvalidFactory': ɵɵinvalidFactory,\n    'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n    'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,\n    'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,\n    'ɵɵProvidersFeature': ɵɵProvidersFeature,\n    'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,\n    'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,\n    'ɵɵnextContext': ɵɵnextContext,\n    'ɵɵnamespaceHTML': ɵɵnamespaceHTML,\n    'ɵɵnamespaceMathML': ɵɵnamespaceMathML,\n    'ɵɵnamespaceSVG': ɵɵnamespaceSVG,\n    'ɵɵenableBindings': ɵɵenableBindings,\n    'ɵɵdisableBindings': ɵɵdisableBindings,\n    'ɵɵelementStart': ɵɵelementStart,\n    'ɵɵelementEnd': ɵɵelementEnd,\n    'ɵɵelement': ɵɵelement,\n    'ɵɵelementContainerStart': ɵɵelementContainerStart,\n    'ɵɵelementContainerEnd': ɵɵelementContainerEnd,\n    'ɵɵelementContainer': ɵɵelementContainer,\n    'ɵɵpureFunction0': ɵɵpureFunction0,\n    'ɵɵpureFunction1': ɵɵpureFunction1,\n    'ɵɵpureFunction2': ɵɵpureFunction2,\n    'ɵɵpureFunction3': ɵɵpureFunction3,\n    'ɵɵpureFunction4': ɵɵpureFunction4,\n    'ɵɵpureFunction5': ɵɵpureFunction5,\n    'ɵɵpureFunction6': ɵɵpureFunction6,\n    'ɵɵpureFunction7': ɵɵpureFunction7,\n    'ɵɵpureFunction8': ɵɵpureFunction8,\n    'ɵɵpureFunctionV': ɵɵpureFunctionV,\n    'ɵɵgetCurrentView': ɵɵgetCurrentView,\n    'ɵɵrestoreView': ɵɵrestoreView,\n    'ɵɵlistener': ɵɵlistener,\n    'ɵɵprojection': ɵɵprojection,\n    'ɵɵsyntheticHostProperty': ɵɵsyntheticHostProperty,\n    'ɵɵsyntheticHostListener': ɵɵsyntheticHostListener,\n    'ɵɵpipeBind1': ɵɵpipeBind1,\n    'ɵɵpipeBind2': ɵɵpipeBind2,\n    'ɵɵpipeBind3': ɵɵpipeBind3,\n    'ɵɵpipeBind4': ɵɵpipeBind4,\n    'ɵɵpipeBindV': ɵɵpipeBindV,\n    'ɵɵprojectionDef': ɵɵprojectionDef,\n    'ɵɵhostProperty': ɵɵhostProperty,\n    'ɵɵproperty': ɵɵproperty,\n    'ɵɵpropertyInterpolate': ɵɵpropertyInterpolate,\n    'ɵɵpropertyInterpolate1': ɵɵpropertyInterpolate1,\n    'ɵɵpropertyInterpolate2': ɵɵpropertyInterpolate2,\n    'ɵɵpropertyInterpolate3': ɵɵpropertyInterpolate3,\n    'ɵɵpropertyInterpolate4': ɵɵpropertyInterpolate4,\n    'ɵɵpropertyInterpolate5': ɵɵpropertyInterpolate5,\n    'ɵɵpropertyInterpolate6': ɵɵpropertyInterpolate6,\n    'ɵɵpropertyInterpolate7': ɵɵpropertyInterpolate7,\n    'ɵɵpropertyInterpolate8': ɵɵpropertyInterpolate8,\n    'ɵɵpropertyInterpolateV': ɵɵpropertyInterpolateV,\n    'ɵɵpipe': ɵɵpipe,\n    'ɵɵqueryRefresh': ɵɵqueryRefresh,\n    'ɵɵviewQuery': ɵɵviewQuery,\n    'ɵɵloadQuery': ɵɵloadQuery,\n    'ɵɵcontentQuery': ɵɵcontentQuery,\n    'ɵɵreference': ɵɵreference,\n    'ɵɵclassMap': ɵɵclassMap,\n    'ɵɵclassMapInterpolate1': ɵɵclassMapInterpolate1,\n    'ɵɵclassMapInterpolate2': ɵɵclassMapInterpolate2,\n    'ɵɵclassMapInterpolate3': ɵɵclassMapInterpolate3,\n    'ɵɵclassMapInterpolate4': ɵɵclassMapInterpolate4,\n    'ɵɵclassMapInterpolate5': ɵɵclassMapInterpolate5,\n    'ɵɵclassMapInterpolate6': ɵɵclassMapInterpolate6,\n    'ɵɵclassMapInterpolate7': ɵɵclassMapInterpolate7,\n    'ɵɵclassMapInterpolate8': ɵɵclassMapInterpolate8,\n    'ɵɵclassMapInterpolateV': ɵɵclassMapInterpolateV,\n    'ɵɵstyleMap': ɵɵstyleMap,\n    'ɵɵstyleMapInterpolate1': ɵɵstyleMapInterpolate1,\n    'ɵɵstyleMapInterpolate2': ɵɵstyleMapInterpolate2,\n    'ɵɵstyleMapInterpolate3': ɵɵstyleMapInterpolate3,\n    'ɵɵstyleMapInterpolate4': ɵɵstyleMapInterpolate4,\n    'ɵɵstyleMapInterpolate5': ɵɵstyleMapInterpolate5,\n    'ɵɵstyleMapInterpolate6': ɵɵstyleMapInterpolate6,\n    'ɵɵstyleMapInterpolate7': ɵɵstyleMapInterpolate7,\n    'ɵɵstyleMapInterpolate8': ɵɵstyleMapInterpolate8,\n    'ɵɵstyleMapInterpolateV': ɵɵstyleMapInterpolateV,\n    'ɵɵstyleProp': ɵɵstyleProp,\n    'ɵɵstylePropInterpolate1': ɵɵstylePropInterpolate1,\n    'ɵɵstylePropInterpolate2': ɵɵstylePropInterpolate2,\n    'ɵɵstylePropInterpolate3': ɵɵstylePropInterpolate3,\n    'ɵɵstylePropInterpolate4': ɵɵstylePropInterpolate4,\n    'ɵɵstylePropInterpolate5': ɵɵstylePropInterpolate5,\n    'ɵɵstylePropInterpolate6': ɵɵstylePropInterpolate6,\n    'ɵɵstylePropInterpolate7': ɵɵstylePropInterpolate7,\n    'ɵɵstylePropInterpolate8': ɵɵstylePropInterpolate8,\n    'ɵɵstylePropInterpolateV': ɵɵstylePropInterpolateV,\n    'ɵɵclassProp': ɵɵclassProp,\n    'ɵɵadvance': ɵɵadvance,\n    'ɵɵtemplate': ɵɵtemplate,\n    'ɵɵtext': ɵɵtext,\n    'ɵɵtextInterpolate': ɵɵtextInterpolate,\n    'ɵɵtextInterpolate1': ɵɵtextInterpolate1,\n    'ɵɵtextInterpolate2': ɵɵtextInterpolate2,\n    'ɵɵtextInterpolate3': ɵɵtextInterpolate3,\n    'ɵɵtextInterpolate4': ɵɵtextInterpolate4,\n    'ɵɵtextInterpolate5': ɵɵtextInterpolate5,\n    'ɵɵtextInterpolate6': ɵɵtextInterpolate6,\n    'ɵɵtextInterpolate7': ɵɵtextInterpolate7,\n    'ɵɵtextInterpolate8': ɵɵtextInterpolate8,\n    'ɵɵtextInterpolateV': ɵɵtextInterpolateV,\n    'ɵɵi18n': ɵɵi18n,\n    'ɵɵi18nAttributes': ɵɵi18nAttributes,\n    'ɵɵi18nExp': ɵɵi18nExp,\n    'ɵɵi18nStart': ɵɵi18nStart,\n    'ɵɵi18nEnd': ɵɵi18nEnd,\n    'ɵɵi18nApply': ɵɵi18nApply,\n    'ɵɵi18nPostprocess': ɵɵi18nPostprocess,\n    'ɵɵresolveWindow': ɵɵresolveWindow,\n    'ɵɵresolveDocument': ɵɵresolveDocument,\n    'ɵɵresolveBody': ɵɵresolveBody,\n    'ɵɵsetComponentScope': ɵɵsetComponentScope,\n    'ɵɵsetNgModuleScope': ɵɵsetNgModuleScope,\n    'ɵɵsanitizeHtml': ɵɵsanitizeHtml,\n    'ɵɵsanitizeStyle': ɵɵsanitizeStyle,\n    'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl,\n    'ɵɵsanitizeScript': ɵɵsanitizeScript,\n    'ɵɵsanitizeUrl': ɵɵsanitizeUrl,\n    'ɵɵsanitizeUrlOrResourceUrl': ɵɵsanitizeUrlOrResourceUrl,\n    'ɵɵtrustConstantHtml': ɵɵtrustConstantHtml,\n    'ɵɵtrustConstantResourceUrl': ɵɵtrustConstantResourceUrl,\n    'forwardRef': forwardRef,\n    'resolveForwardRef': resolveForwardRef,\n});\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nconst angularCoreEnv = (ɵ0$c)();\n\nlet jitOptions = null;\nfunction setJitOptions(options) {\n    if (jitOptions !== null) {\n        if (options.defaultEncapsulation !== jitOptions.defaultEncapsulation) {\n            ngDevMode &&\n                console.error('Provided value for `defaultEncapsulation` can not be changed once it has been set.');\n            return;\n        }\n        if (options.preserveWhitespaces !== jitOptions.preserveWhitespaces) {\n            ngDevMode &&\n                console.error('Provided value for `preserveWhitespaces` can not be changed once it has been set.');\n            return;\n        }\n    }\n    jitOptions = options;\n}\nfunction getJitOptions() {\n    return jitOptions;\n}\nfunction resetJitOptions() {\n    jitOptions = null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst moduleQueue = [];\n/**\n * Enqueues moduleDef to be checked later to see if scope can be set on its\n * component declarations.\n */\nfunction enqueueModuleForDelayedScoping(moduleType, ngModule) {\n    moduleQueue.push({ moduleType, ngModule });\n}\nlet flushingModuleQueue = false;\n/**\n * Loops over queued module definitions, if a given module definition has all of its\n * declarations resolved, it dequeues that module definition and sets the scope on\n * its declarations.\n */\nfunction flushModuleScopingQueueAsMuchAsPossible() {\n    if (!flushingModuleQueue) {\n        flushingModuleQueue = true;\n        try {\n            for (let i = moduleQueue.length - 1; i >= 0; i--) {\n                const { moduleType, ngModule } = moduleQueue[i];\n                if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) {\n                    // dequeue\n                    moduleQueue.splice(i, 1);\n                    setScopeOnDeclaredComponents(moduleType, ngModule);\n                }\n            }\n        }\n        finally {\n            flushingModuleQueue = false;\n        }\n    }\n}\n/**\n * Returns truthy if a declaration has resolved. If the declaration happens to be\n * an array of declarations, it will recurse to check each declaration in that array\n * (which may also be arrays).\n */\nfunction isResolvedDeclaration(declaration) {\n    if (Array.isArray(declaration)) {\n        return declaration.every(isResolvedDeclaration);\n    }\n    return !!resolveForwardRef(declaration);\n}\n/**\n * Compiles a module in JIT mode.\n *\n * This function automatically gets called when a class has a `@NgModule` decorator.\n */\nfunction compileNgModule(moduleType, ngModule = {}) {\n    compileNgModuleDefs(moduleType, ngModule);\n    // Because we don't know if all declarations have resolved yet at the moment the\n    // NgModule decorator is executing, we're enqueueing the setting of module scope\n    // on its declarations to be run at a later time when all declarations for the module,\n    // including forward refs, have resolved.\n    enqueueModuleForDelayedScoping(moduleType, ngModule);\n}\n/**\n * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class.\n *\n * It's possible to compile a module via this API which will allow duplicate declarations in its\n * root.\n */\nfunction compileNgModuleDefs(moduleType, ngModule, allowDuplicateDeclarationsInRoot = false) {\n    ngDevMode && assertDefined(moduleType, 'Required value moduleType');\n    ngDevMode && assertDefined(ngModule, 'Required value ngModule');\n    const declarations = flatten(ngModule.declarations || EMPTY_ARRAY);\n    let ngModuleDef = null;\n    Object.defineProperty(moduleType, NG_MOD_DEF, {\n        configurable: true,\n        get: () => {\n            if (ngModuleDef === null) {\n                if (ngDevMode && ngModule.imports && ngModule.imports.indexOf(moduleType) > -1) {\n                    // We need to assert this immediately, because allowing it to continue will cause it to\n                    // go into an infinite loop before we've reached the point where we throw all the errors.\n                    throw new Error(`'${stringifyForError(moduleType)}' module can't import itself`);\n                }\n                const compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'NgModule', type: moduleType });\n                ngModuleDef = compiler.compileNgModule(angularCoreEnv, `ng:///${moduleType.name}/ɵmod.js`, {\n                    type: moduleType,\n                    bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY).map(resolveForwardRef),\n                    declarations: declarations.map(resolveForwardRef),\n                    imports: flatten(ngModule.imports || EMPTY_ARRAY)\n                        .map(resolveForwardRef)\n                        .map(expandModuleWithProviders),\n                    exports: flatten(ngModule.exports || EMPTY_ARRAY)\n                        .map(resolveForwardRef)\n                        .map(expandModuleWithProviders),\n                    schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,\n                    id: ngModule.id || null,\n                });\n                // Set `schemas` on ngModuleDef to an empty array in JIT mode to indicate that runtime\n                // should verify that there are no unknown elements in a template. In AOT mode, that check\n                // happens at compile time and `schemas` information is not present on Component and Module\n                // defs after compilation (so the check doesn't happen the second time at runtime).\n                if (!ngModuleDef.schemas) {\n                    ngModuleDef.schemas = [];\n                }\n            }\n            return ngModuleDef;\n        }\n    });\n    let ngFactoryDef = null;\n    Object.defineProperty(moduleType, NG_FACTORY_DEF, {\n        get: () => {\n            if (ngFactoryDef === null) {\n                const compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'NgModule', type: moduleType });\n                ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${moduleType.name}/ɵfac.js`, {\n                    name: moduleType.name,\n                    type: moduleType,\n                    deps: reflectDependencies(moduleType),\n                    target: compiler.FactoryTarget.NgModule,\n                    typeArgumentCount: 0,\n                });\n            }\n            return ngFactoryDef;\n        },\n        // Make the property configurable in dev mode to allow overriding in tests\n        configurable: !!ngDevMode,\n    });\n    let ngInjectorDef = null;\n    Object.defineProperty(moduleType, NG_INJ_DEF, {\n        get: () => {\n            if (ngInjectorDef === null) {\n                ngDevMode &&\n                    verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot);\n                const meta = {\n                    name: moduleType.name,\n                    type: moduleType,\n                    providers: ngModule.providers || EMPTY_ARRAY,\n                    imports: [\n                        (ngModule.imports || EMPTY_ARRAY).map(resolveForwardRef),\n                        (ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef),\n                    ],\n                };\n                const compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'NgModule', type: moduleType });\n                ngInjectorDef =\n                    compiler.compileInjector(angularCoreEnv, `ng:///${moduleType.name}/ɵinj.js`, meta);\n            }\n            return ngInjectorDef;\n        },\n        // Make the property configurable in dev mode to allow overriding in tests\n        configurable: !!ngDevMode,\n    });\n}\nfunction verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot, importingModule) {\n    if (verifiedNgModule.get(moduleType))\n        return;\n    verifiedNgModule.set(moduleType, true);\n    moduleType = resolveForwardRef(moduleType);\n    let ngModuleDef;\n    if (importingModule) {\n        ngModuleDef = getNgModuleDef(moduleType);\n        if (!ngModuleDef) {\n            throw new Error(`Unexpected value '${moduleType.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n        }\n    }\n    else {\n        ngModuleDef = getNgModuleDef(moduleType, true);\n    }\n    const errors = [];\n    const declarations = maybeUnwrapFn(ngModuleDef.declarations);\n    const imports = maybeUnwrapFn(ngModuleDef.imports);\n    flatten(imports).map(unwrapModuleWithProvidersImports).forEach(mod => {\n        verifySemanticsOfNgModuleImport(mod, moduleType);\n        verifySemanticsOfNgModuleDef(mod, false, moduleType);\n    });\n    const exports = maybeUnwrapFn(ngModuleDef.exports);\n    declarations.forEach(verifyDeclarationsHaveDefinitions);\n    declarations.forEach(verifyDirectivesHaveSelector);\n    const combinedDeclarations = [\n        ...declarations.map(resolveForwardRef),\n        ...flatten(imports.map(computeCombinedExports)).map(resolveForwardRef),\n    ];\n    exports.forEach(verifyExportsAreDeclaredOrReExported);\n    declarations.forEach(decl => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot));\n    declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);\n    const ngModule = getAnnotation(moduleType, 'NgModule');\n    if (ngModule) {\n        ngModule.imports &&\n            flatten(ngModule.imports).map(unwrapModuleWithProvidersImports).forEach(mod => {\n                verifySemanticsOfNgModuleImport(mod, moduleType);\n                verifySemanticsOfNgModuleDef(mod, false, moduleType);\n            });\n        ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyCorrectBootstrapType);\n        ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyComponentIsPartOfNgModule);\n        ngModule.entryComponents &&\n            deepForEach(ngModule.entryComponents, verifyComponentIsPartOfNgModule);\n    }\n    // Throw Error if any errors were detected.\n    if (errors.length) {\n        throw new Error(errors.join('\\n'));\n    }\n    ////////////////////////////////////////////////////////////////////////////////////////////////\n    function verifyDeclarationsHaveDefinitions(type) {\n        type = resolveForwardRef(type);\n        const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n        if (!def) {\n            errors.push(`Unexpected value '${stringifyForError(type)}' declared by the module '${stringifyForError(moduleType)}'. Please add a @Pipe/@Directive/@Component annotation.`);\n        }\n    }\n    function verifyDirectivesHaveSelector(type) {\n        type = resolveForwardRef(type);\n        const def = getDirectiveDef(type);\n        if (!getComponentDef(type) && def && def.selectors.length == 0) {\n            errors.push(`Directive ${stringifyForError(type)} has no selector, please add it!`);\n        }\n    }\n    function verifyExportsAreDeclaredOrReExported(type) {\n        type = resolveForwardRef(type);\n        const kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' ||\n            getPipeDef(type) && 'pipe';\n        if (kind) {\n            // only checked if we are declared as Component, Directive, or Pipe\n            // Modules don't need to be declared or imported.\n            if (combinedDeclarations.lastIndexOf(type) === -1) {\n                // We are exporting something which we don't explicitly declare or import.\n                errors.push(`Can't export ${kind} ${stringifyForError(type)} from ${stringifyForError(moduleType)} as it was neither declared nor imported!`);\n            }\n        }\n    }\n    function verifyDeclarationIsUnique(type, suppressErrors) {\n        type = resolveForwardRef(type);\n        const existingModule = ownerNgModule.get(type);\n        if (existingModule && existingModule !== moduleType) {\n            if (!suppressErrors) {\n                const modules = [existingModule, moduleType].map(stringifyForError).sort();\n                errors.push(`Type ${stringifyForError(type)} is part of the declarations of 2 modules: ${modules[0]} and ${modules[1]}! ` +\n                    `Please consider moving ${stringifyForError(type)} to a higher module that imports ${modules[0]} and ${modules[1]}. ` +\n                    `You can also create a new NgModule that exports and includes ${stringifyForError(type)} then import that NgModule in ${modules[0]} and ${modules[1]}.`);\n            }\n        }\n        else {\n            // Mark type as having owner.\n            ownerNgModule.set(type, moduleType);\n        }\n    }\n    function verifyComponentIsPartOfNgModule(type) {\n        type = resolveForwardRef(type);\n        const existingModule = ownerNgModule.get(type);\n        if (!existingModule) {\n            errors.push(`Component ${stringifyForError(type)} is not part of any NgModule or the module has not been imported into your module.`);\n        }\n    }\n    function verifyCorrectBootstrapType(type) {\n        type = resolveForwardRef(type);\n        if (!getComponentDef(type)) {\n            errors.push(`${stringifyForError(type)} cannot be used as an entry component.`);\n        }\n    }\n    function verifyComponentEntryComponentsIsPartOfNgModule(type) {\n        type = resolveForwardRef(type);\n        if (getComponentDef(type)) {\n            // We know we are component\n            const component = getAnnotation(type, 'Component');\n            if (component && component.entryComponents) {\n                deepForEach(component.entryComponents, verifyComponentIsPartOfNgModule);\n            }\n        }\n    }\n    function verifySemanticsOfNgModuleImport(type, importingModule) {\n        type = resolveForwardRef(type);\n        if (getComponentDef(type) || getDirectiveDef(type)) {\n            throw new Error(`Unexpected directive '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n        }\n        if (getPipeDef(type)) {\n            throw new Error(`Unexpected pipe '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n        }\n    }\n}\nfunction unwrapModuleWithProvidersImports(typeOrWithProviders) {\n    typeOrWithProviders = resolveForwardRef(typeOrWithProviders);\n    return typeOrWithProviders.ngModule || typeOrWithProviders;\n}\nfunction getAnnotation(type, name) {\n    let annotation = null;\n    collect(type.__annotations__);\n    collect(type.decorators);\n    return annotation;\n    function collect(annotations) {\n        if (annotations) {\n            annotations.forEach(readAnnotation);\n        }\n    }\n    function readAnnotation(decorator) {\n        if (!annotation) {\n            const proto = Object.getPrototypeOf(decorator);\n            if (proto.ngMetadataName == name) {\n                annotation = decorator;\n            }\n            else if (decorator.type) {\n                const proto = Object.getPrototypeOf(decorator.type);\n                if (proto.ngMetadataName == name) {\n                    annotation = decorator.args[0];\n                }\n            }\n        }\n    }\n}\n/**\n * Keep track of compiled components. This is needed because in tests we often want to compile the\n * same component with more than one NgModule. This would cause an error unless we reset which\n * NgModule the component belongs to. We keep the list of compiled components here so that the\n * TestBed can reset it later.\n */\nlet ownerNgModule = new WeakMap();\nlet verifiedNgModule = new WeakMap();\nfunction resetCompiledComponents() {\n    ownerNgModule = new WeakMap();\n    verifiedNgModule = new WeakMap();\n    moduleQueue.length = 0;\n}\n/**\n * Computes the combined declarations of explicit declarations, as well as declarations inherited by\n * traversing the exports of imported modules.\n * @param type\n */\nfunction computeCombinedExports(type) {\n    type = resolveForwardRef(type);\n    const ngModuleDef = getNgModuleDef(type, true);\n    return [...flatten(maybeUnwrapFn(ngModuleDef.exports).map((type) => {\n            const ngModuleDef = getNgModuleDef(type);\n            if (ngModuleDef) {\n                verifySemanticsOfNgModuleDef(type, false);\n                return computeCombinedExports(type);\n            }\n            else {\n                return type;\n            }\n        }))];\n}\n/**\n * Some declared components may be compiled asynchronously, and thus may not have their\n * ɵcmp set yet. If this is the case, then a reference to the module is written into\n * the `ngSelectorScope` property of the declared type.\n */\nfunction setScopeOnDeclaredComponents(moduleType, ngModule) {\n    const declarations = flatten(ngModule.declarations || EMPTY_ARRAY);\n    const transitiveScopes = transitiveScopesFor(moduleType);\n    declarations.forEach(declaration => {\n        if (declaration.hasOwnProperty(NG_COMP_DEF)) {\n            // A `ɵcmp` field exists - go ahead and patch the component directly.\n            const component = declaration;\n            const componentDef = getComponentDef(component);\n            patchComponentDefWithScope(componentDef, transitiveScopes);\n        }\n        else if (!declaration.hasOwnProperty(NG_DIR_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) {\n            // Set `ngSelectorScope` for future reference when the component compilation finishes.\n            declaration.ngSelectorScope = moduleType;\n        }\n    });\n}\n/**\n * Patch the definition of a component with directives and pipes from the compilation scope of\n * a given module.\n */\nfunction patchComponentDefWithScope(componentDef, transitiveScopes) {\n    componentDef.directiveDefs = () => Array.from(transitiveScopes.compilation.directives)\n        .map(dir => dir.hasOwnProperty(NG_COMP_DEF) ? getComponentDef(dir) : getDirectiveDef(dir))\n        .filter(def => !!def);\n    componentDef.pipeDefs = () => Array.from(transitiveScopes.compilation.pipes).map(pipe => getPipeDef(pipe));\n    componentDef.schemas = transitiveScopes.schemas;\n    // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we\n    // may face a problem where previously compiled defs available to a given Component/Directive\n    // are cached in TView and may become stale (in case any of these defs gets recompiled). In\n    // order to avoid this problem, we force fresh TView to be created.\n    componentDef.tView = null;\n}\n/**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.\n *\n * This operation is memoized and the result is cached on the module's definition. This function can\n * be called on modules with components that have not fully compiled yet, but the result should not\n * be used until they have.\n *\n * @param moduleType module that transitive scope should be calculated for.\n */\nfunction transitiveScopesFor(moduleType) {\n    if (!isNgModule(moduleType)) {\n        throw new Error(`${moduleType.name} does not have a module def (ɵmod property)`);\n    }\n    const def = getNgModuleDef(moduleType);\n    if (def.transitiveCompileScopes !== null) {\n        return def.transitiveCompileScopes;\n    }\n    const scopes = {\n        schemas: def.schemas || null,\n        compilation: {\n            directives: new Set(),\n            pipes: new Set(),\n        },\n        exported: {\n            directives: new Set(),\n            pipes: new Set(),\n        },\n    };\n    maybeUnwrapFn(def.imports).forEach((imported) => {\n        const importedType = imported;\n        if (!isNgModule(importedType)) {\n            throw new Error(`Importing ${importedType.name} which does not have a ɵmod property`);\n        }\n        // When this module imports another, the imported module's exported directives and pipes are\n        // added to the compilation scope of this module.\n        const importedScope = transitiveScopesFor(importedType);\n        importedScope.exported.directives.forEach(entry => scopes.compilation.directives.add(entry));\n        importedScope.exported.pipes.forEach(entry => scopes.compilation.pipes.add(entry));\n    });\n    maybeUnwrapFn(def.declarations).forEach(declared => {\n        const declaredWithDefs = declared;\n        if (getPipeDef(declaredWithDefs)) {\n            scopes.compilation.pipes.add(declared);\n        }\n        else {\n            // Either declared has a ɵcmp or ɵdir, or it's a component which hasn't\n            // had its template compiled yet. In either case, it gets added to the compilation's\n            // directives.\n            scopes.compilation.directives.add(declared);\n        }\n    });\n    maybeUnwrapFn(def.exports).forEach((exported) => {\n        const exportedType = exported;\n        // Either the type is a module, a pipe, or a component/directive (which may not have a\n        // ɵcmp as it might be compiled asynchronously).\n        if (isNgModule(exportedType)) {\n            // When this module exports another, the exported module's exported directives and pipes are\n            // added to both the compilation and exported scopes of this module.\n            const exportedScope = transitiveScopesFor(exportedType);\n            exportedScope.exported.directives.forEach(entry => {\n                scopes.compilation.directives.add(entry);\n                scopes.exported.directives.add(entry);\n            });\n            exportedScope.exported.pipes.forEach(entry => {\n                scopes.compilation.pipes.add(entry);\n                scopes.exported.pipes.add(entry);\n            });\n        }\n        else if (getPipeDef(exportedType)) {\n            scopes.exported.pipes.add(exportedType);\n        }\n        else {\n            scopes.exported.directives.add(exportedType);\n        }\n    });\n    def.transitiveCompileScopes = scopes;\n    return scopes;\n}\nfunction expandModuleWithProviders(value) {\n    if (isModuleWithProviders(value)) {\n        return value.ngModule;\n    }\n    return value;\n}\nfunction isModuleWithProviders(value) {\n    return value.ngModule !== undefined;\n}\nfunction isNgModule(value) {\n    return !!getNgModuleDef(value);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Keep track of the compilation depth to avoid reentrancy issues during JIT compilation. This\n * matters in the following scenario:\n *\n * Consider a component 'A' that extends component 'B', both declared in module 'M'. During\n * the compilation of 'A' the definition of 'B' is requested to capture the inheritance chain,\n * potentially triggering compilation of 'B'. If this nested compilation were to trigger\n * `flushModuleScopingQueueAsMuchAsPossible` it may happen that module 'M' is still pending in the\n * queue, resulting in 'A' and 'B' to be patched with the NgModule scope. As the compilation of\n * 'A' is still in progress, this would introduce a circular dependency on its compilation. To avoid\n * this issue, the module scope queue is only flushed for compilations at the depth 0, to ensure\n * all compilations have finished.\n */\nlet compilationDepth = 0;\n/**\n * Compile an Angular component according to its decorator metadata, and patch the resulting\n * component def (ɵcmp) onto the component type.\n *\n * Compilation may be asynchronous (due to the need to resolve URLs for the component template or\n * other resources, for example). In the event that compilation is not immediate, `compileComponent`\n * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp`\n * until the global queue has been resolved with a call to `resolveComponentResources`.\n */\nfunction compileComponent(type, metadata) {\n    // Initialize ngDevMode. This must be the first statement in compileComponent.\n    // See the `initNgDevMode` docstring for more information.\n    (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n    let ngComponentDef = null;\n    // Metadata may have resources which need to be resolved.\n    maybeQueueResolutionOfComponentResources(type, metadata);\n    // Note that we're using the same function as `Directive`, because that's only subset of metadata\n    // that we need to create the ngFactoryDef. We're avoiding using the component metadata\n    // because we'd have to resolve the asynchronous templates.\n    addDirectiveFactoryDef(type, metadata);\n    Object.defineProperty(type, NG_COMP_DEF, {\n        get: () => {\n            if (ngComponentDef === null) {\n                const compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'component', type: type });\n                if (componentNeedsResolution(metadata)) {\n                    const error = [`Component '${type.name}' is not resolved:`];\n                    if (metadata.templateUrl) {\n                        error.push(` - templateUrl: ${metadata.templateUrl}`);\n                    }\n                    if (metadata.styleUrls && metadata.styleUrls.length) {\n                        error.push(` - styleUrls: ${JSON.stringify(metadata.styleUrls)}`);\n                    }\n                    error.push(`Did you run and wait for 'resolveComponentResources()'?`);\n                    throw new Error(error.join('\\n'));\n                }\n                // This const was called `jitOptions` previously but had to be renamed to `options` because\n                // of a bug with Terser that caused optimized JIT builds to throw a `ReferenceError`.\n                // This bug was investigated in https://github.com/angular/angular-cli/issues/17264.\n                // We should not rename it back until https://github.com/terser/terser/issues/615 is fixed.\n                const options = getJitOptions();\n                let preserveWhitespaces = metadata.preserveWhitespaces;\n                if (preserveWhitespaces === undefined) {\n                    if (options !== null && options.preserveWhitespaces !== undefined) {\n                        preserveWhitespaces = options.preserveWhitespaces;\n                    }\n                    else {\n                        preserveWhitespaces = false;\n                    }\n                }\n                let encapsulation = metadata.encapsulation;\n                if (encapsulation === undefined) {\n                    if (options !== null && options.defaultEncapsulation !== undefined) {\n                        encapsulation = options.defaultEncapsulation;\n                    }\n                    else {\n                        encapsulation = ViewEncapsulation.Emulated;\n                    }\n                }\n                const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`;\n                const meta = Object.assign(Object.assign({}, directiveMetadata(type, metadata)), { typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl), template: metadata.template || '', preserveWhitespaces, styles: metadata.styles || EMPTY_ARRAY, animations: metadata.animations, directives: [], changeDetection: metadata.changeDetection, pipes: new Map(), encapsulation, interpolation: metadata.interpolation, viewProviders: metadata.viewProviders || null });\n                compilationDepth++;\n                try {\n                    if (meta.usesInheritance) {\n                        addDirectiveDefToUndecoratedParents(type);\n                    }\n                    ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta);\n                }\n                finally {\n                    // Ensure that the compilation depth is decremented even when the compilation failed.\n                    compilationDepth--;\n                }\n                if (compilationDepth === 0) {\n                    // When NgModule decorator executed, we enqueued the module definition such that\n                    // it would only dequeue and add itself as module scope to all of its declarations,\n                    // but only if  if all of its declarations had resolved. This call runs the check\n                    // to see if any modules that are in the queue can be dequeued and add scope to\n                    // their declarations.\n                    flushModuleScopingQueueAsMuchAsPossible();\n                }\n                // If component compilation is async, then the @NgModule annotation which declares the\n                // component may execute and set an ngSelectorScope property on the component type. This\n                // allows the component to patch itself with directiveDefs from the module after it\n                // finishes compiling.\n                if (hasSelectorScope(type)) {\n                    const scopes = transitiveScopesFor(type.ngSelectorScope);\n                    patchComponentDefWithScope(ngComponentDef, scopes);\n                }\n            }\n            return ngComponentDef;\n        },\n        // Make the property configurable in dev mode to allow overriding in tests\n        configurable: !!ngDevMode,\n    });\n}\nfunction hasSelectorScope(component) {\n    return component.ngSelectorScope !== undefined;\n}\n/**\n * Compile an Angular directive according to its decorator metadata, and patch the resulting\n * directive def onto the component type.\n *\n * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which\n * will resolve when compilation completes and the directive becomes usable.\n */\nfunction compileDirective(type, directive) {\n    let ngDirectiveDef = null;\n    addDirectiveFactoryDef(type, directive || {});\n    Object.defineProperty(type, NG_DIR_DEF, {\n        get: () => {\n            if (ngDirectiveDef === null) {\n                // `directive` can be null in the case of abstract directives as a base class\n                // that use `@Directive()` with no selector. In that case, pass empty object to the\n                // `directiveMetadata` function instead of null.\n                const meta = getDirectiveMetadata$1(type, directive || {});\n                const compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'directive', type });\n                ngDirectiveDef =\n                    compiler.compileDirective(angularCoreEnv, meta.sourceMapUrl, meta.metadata);\n            }\n            return ngDirectiveDef;\n        },\n        // Make the property configurable in dev mode to allow overriding in tests\n        configurable: !!ngDevMode,\n    });\n}\nfunction getDirectiveMetadata$1(type, metadata) {\n    const name = type && type.name;\n    const sourceMapUrl = `ng:///${name}/ɵdir.js`;\n    const compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'directive', type });\n    const facade = directiveMetadata(type, metadata);\n    facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);\n    if (facade.usesInheritance) {\n        addDirectiveDefToUndecoratedParents(type);\n    }\n    return { metadata: facade, sourceMapUrl };\n}\nfunction addDirectiveFactoryDef(type, metadata) {\n    let ngFactoryDef = null;\n    Object.defineProperty(type, NG_FACTORY_DEF, {\n        get: () => {\n            if (ngFactoryDef === null) {\n                const meta = getDirectiveMetadata$1(type, metadata);\n                const compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'directive', type });\n                ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${type.name}/ɵfac.js`, {\n                    name: meta.metadata.name,\n                    type: meta.metadata.type,\n                    typeArgumentCount: 0,\n                    deps: reflectDependencies(type),\n                    target: compiler.FactoryTarget.Directive\n                });\n            }\n            return ngFactoryDef;\n        },\n        // Make the property configurable in dev mode to allow overriding in tests\n        configurable: !!ngDevMode,\n    });\n}\nfunction extendsDirectlyFromObject(type) {\n    return Object.getPrototypeOf(type.prototype) === Object.prototype;\n}\n/**\n * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a\n * `Component`).\n */\nfunction directiveMetadata(type, metadata) {\n    // Reflect inputs and outputs.\n    const reflect = getReflect();\n    const propMetadata = reflect.ownPropMetadata(type);\n    return {\n        name: type.name,\n        type: type,\n        selector: metadata.selector !== undefined ? metadata.selector : null,\n        host: metadata.host || EMPTY_OBJ,\n        propMetadata: propMetadata,\n        inputs: metadata.inputs || EMPTY_ARRAY,\n        outputs: metadata.outputs || EMPTY_ARRAY,\n        queries: extractQueriesMetadata(type, propMetadata, isContentQuery),\n        lifecycle: { usesOnChanges: reflect.hasLifecycleHook(type, 'ngOnChanges') },\n        typeSourceSpan: null,\n        usesInheritance: !extendsDirectlyFromObject(type),\n        exportAs: extractExportAs(metadata.exportAs),\n        providers: metadata.providers || null,\n        viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery)\n    };\n}\n/**\n * Adds a directive definition to all parent classes of a type that don't have an Angular decorator.\n */\nfunction addDirectiveDefToUndecoratedParents(type) {\n    const objPrototype = Object.prototype;\n    let parent = Object.getPrototypeOf(type.prototype).constructor;\n    // Go up the prototype until we hit `Object`.\n    while (parent && parent !== objPrototype) {\n        // Since inheritance works if the class was annotated already, we only need to add\n        // the def if there are no annotations and the def hasn't been created already.\n        if (!getDirectiveDef(parent) && !getComponentDef(parent) &&\n            shouldAddAbstractDirective(parent)) {\n            compileDirective(parent, null);\n        }\n        parent = Object.getPrototypeOf(parent);\n    }\n}\nfunction convertToR3QueryPredicate(selector) {\n    return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);\n}\nfunction convertToR3QueryMetadata(propertyName, ann) {\n    return {\n        propertyName: propertyName,\n        predicate: convertToR3QueryPredicate(ann.selector),\n        descendants: ann.descendants,\n        first: ann.first,\n        read: ann.read ? ann.read : null,\n        static: !!ann.static,\n        emitDistinctChangesOnly: !!ann.emitDistinctChangesOnly,\n    };\n}\nfunction extractQueriesMetadata(type, propMetadata, isQueryAnn) {\n    const queriesMeta = [];\n    for (const field in propMetadata) {\n        if (propMetadata.hasOwnProperty(field)) {\n            const annotations = propMetadata[field];\n            annotations.forEach(ann => {\n                if (isQueryAnn(ann)) {\n                    if (!ann.selector) {\n                        throw new Error(`Can't construct a query for the property \"${field}\" of ` +\n                            `\"${stringifyForError(type)}\" since the query selector wasn't defined.`);\n                    }\n                    if (annotations.some(isInputAnnotation)) {\n                        throw new Error(`Cannot combine @Input decorators with query decorators`);\n                    }\n                    queriesMeta.push(convertToR3QueryMetadata(field, ann));\n                }\n            });\n        }\n    }\n    return queriesMeta;\n}\nfunction extractExportAs(exportAs) {\n    return exportAs === undefined ? null : splitByComma(exportAs);\n}\nfunction isContentQuery(value) {\n    const name = value.ngMetadataName;\n    return name === 'ContentChild' || name === 'ContentChildren';\n}\nfunction isViewQuery(value) {\n    const name = value.ngMetadataName;\n    return name === 'ViewChild' || name === 'ViewChildren';\n}\nfunction isInputAnnotation(value) {\n    return value.ngMetadataName === 'Input';\n}\nfunction splitByComma(value) {\n    return value.split(',').map(piece => piece.trim());\n}\nconst LIFECYCLE_HOOKS = [\n    'ngOnChanges', 'ngOnInit', 'ngOnDestroy', 'ngDoCheck', 'ngAfterViewInit', 'ngAfterViewChecked',\n    'ngAfterContentInit', 'ngAfterContentChecked'\n];\nfunction shouldAddAbstractDirective(type) {\n    const reflect = getReflect();\n    if (LIFECYCLE_HOOKS.some(hookName => reflect.hasLifecycleHook(type, hookName))) {\n        return true;\n    }\n    const propMetadata = reflect.propMetadata(type);\n    for (const field in propMetadata) {\n        const annotations = propMetadata[field];\n        for (let i = 0; i < annotations.length; i++) {\n            const current = annotations[i];\n            const metadataName = current.ngMetadataName;\n            if (isInputAnnotation(current) || isContentQuery(current) || isViewQuery(current) ||\n                metadataName === 'Output' || metadataName === 'HostBinding' ||\n                metadataName === 'HostListener') {\n                return true;\n            }\n        }\n    }\n    return false;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction compilePipe(type, meta) {\n    let ngPipeDef = null;\n    let ngFactoryDef = null;\n    Object.defineProperty(type, NG_FACTORY_DEF, {\n        get: () => {\n            if (ngFactoryDef === null) {\n                const metadata = getPipeMetadata(type, meta);\n                const compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'pipe', type: metadata.type });\n                ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${metadata.name}/ɵfac.js`, {\n                    name: metadata.name,\n                    type: metadata.type,\n                    typeArgumentCount: 0,\n                    deps: reflectDependencies(type),\n                    target: compiler.FactoryTarget.Pipe\n                });\n            }\n            return ngFactoryDef;\n        },\n        // Make the property configurable in dev mode to allow overriding in tests\n        configurable: !!ngDevMode,\n    });\n    Object.defineProperty(type, NG_PIPE_DEF, {\n        get: () => {\n            if (ngPipeDef === null) {\n                const metadata = getPipeMetadata(type, meta);\n                const compiler = getCompilerFacade({ usage: 0 /* Decorator */, kind: 'pipe', type: metadata.type });\n                ngPipeDef =\n                    compiler.compilePipe(angularCoreEnv, `ng:///${metadata.name}/ɵpipe.js`, metadata);\n            }\n            return ngPipeDef;\n        },\n        // Make the property configurable in dev mode to allow overriding in tests\n        configurable: !!ngDevMode,\n    });\n}\nfunction getPipeMetadata(type, meta) {\n    return {\n        type: type,\n        name: type.name,\n        pipeName: meta.name,\n        pure: meta.pure !== undefined ? meta.pure : true\n    };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0$d = (dir = {}) => dir, ɵ1$2 = (type, meta) => SWITCH_COMPILE_DIRECTIVE(type, meta);\n/**\n * Type of the Directive metadata.\n *\n * @publicApi\n */\nconst Directive = makeDecorator('Directive', ɵ0$d, undefined, undefined, ɵ1$2);\nconst ɵ2$1 = (c = {}) => (Object.assign({ changeDetection: ChangeDetectionStrategy.Default }, c)), ɵ3$1 = (type, meta) => SWITCH_COMPILE_COMPONENT(type, meta);\n/**\n * Component decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Component = makeDecorator('Component', ɵ2$1, Directive, undefined, ɵ3$1);\nconst ɵ4 = (p) => (Object.assign({ pure: true }, p)), ɵ5 = (type, meta) => SWITCH_COMPILE_PIPE(type, meta);\n/**\n * @Annotation\n * @publicApi\n */\nconst Pipe = makeDecorator('Pipe', ɵ4, undefined, undefined, ɵ5);\nconst ɵ6 = (bindingPropertyName) => ({ bindingPropertyName });\n/**\n * @Annotation\n * @publicApi\n */\nconst Input = makePropDecorator('Input', ɵ6);\nconst ɵ7 = (bindingPropertyName) => ({ bindingPropertyName });\n/**\n * @Annotation\n * @publicApi\n */\nconst Output = makePropDecorator('Output', ɵ7);\nconst ɵ8 = (hostPropertyName) => ({ hostPropertyName });\n/**\n * @Annotation\n * @publicApi\n */\nconst HostBinding = makePropDecorator('HostBinding', ɵ8);\nconst ɵ9 = (eventName, args) => ({ eventName, args });\n/**\n * Decorator that binds a DOM event to a host listener and supplies configuration metadata.\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n *\n * If the handler method returns false, applies `preventDefault` on the bound element.\n *\n * @usageNotes\n *\n * The following example declares a directive\n * that attaches a click listener to a button and counts clicks.\n *\n * ```ts\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n *   numberOfClicks = 0;\n *\n *   @HostListener('click', ['$event.target'])\n *   onClick(btn) {\n *     console.log('button', btn, 'number of clicks:', this.numberOfClicks++);\n *  }\n * }\n *\n * @Component({\n *   selector: 'app',\n *   template: '<button counting>Increment</button>',\n * })\n * class App {}\n *\n * ```\n *\n * The following example registers another DOM event handler that listens for key-press events.\n * ``` ts\n * import { HostListener, Component } from \"@angular/core\";\n *\n * @Component({\n *   selector: 'app',\n *   template: `<h1>Hello, you have pressed keys {{counter}} number of times!</h1> Press any key to\n * increment the counter.\n *   <button (click)=\"resetCounter()\">Reset Counter</button>`\n * })\n * class AppComponent {\n *   counter = 0;\n *   @HostListener('window:keydown', ['$event'])\n *   handleKeyDown(event: KeyboardEvent) {\n *     this.counter++;\n *   }\n *   resetCounter() {\n *     this.counter = 0;\n *   }\n * }\n * ```\n *\n * @Annotation\n * @publicApi\n */\nconst HostListener = makePropDecorator('HostListener', ɵ9);\nconst SWITCH_COMPILE_COMPONENT__POST_R3__ = compileComponent;\nconst SWITCH_COMPILE_DIRECTIVE__POST_R3__ = compileDirective;\nconst SWITCH_COMPILE_PIPE__POST_R3__ = compilePipe;\nconst SWITCH_COMPILE_COMPONENT__PRE_R3__ = noop;\nconst SWITCH_COMPILE_DIRECTIVE__PRE_R3__ = noop;\nconst SWITCH_COMPILE_PIPE__PRE_R3__ = noop;\nconst SWITCH_COMPILE_COMPONENT = SWITCH_COMPILE_COMPONENT__POST_R3__;\nconst SWITCH_COMPILE_DIRECTIVE = SWITCH_COMPILE_DIRECTIVE__POST_R3__;\nconst SWITCH_COMPILE_PIPE = SWITCH_COMPILE_PIPE__POST_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0$e = (ngModule) => ngModule, ɵ1$3 = \n/**\n * Decorator that marks the following class as an NgModule, and supplies\n * configuration metadata for it.\n *\n * * The `declarations` and `entryComponents` options configure the compiler\n * with information about what belongs to the NgModule.\n * * The `providers` options configures the NgModule's injector to provide\n * dependencies the NgModule members.\n * * The `imports` and `exports` options bring in members from other modules, and make\n * this module's members available to others.\n */\n(type, meta) => SWITCH_COMPILE_NGMODULE(type, meta);\n/**\n * @Annotation\n * @publicApi\n */\nconst NgModule = makeDecorator('NgModule', ɵ0$e, undefined, undefined, ɵ1$3);\nfunction preR3NgModuleCompile(moduleType, metadata) {\n    let imports = (metadata && metadata.imports) || [];\n    if (metadata && metadata.exports) {\n        imports = [...imports, metadata.exports];\n    }\n    const moduleInjectorType = moduleType;\n    moduleInjectorType.ɵfac = convertInjectableProviderToFactory(moduleType, { useClass: moduleType });\n    moduleInjectorType.ɵinj =\n        ɵɵdefineInjector({ providers: metadata && metadata.providers, imports: imports });\n}\nconst SWITCH_COMPILE_NGMODULE__POST_R3__ = compileNgModule;\nconst SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile;\nconst SWITCH_COMPILE_NGMODULE = SWITCH_COMPILE_NGMODULE__POST_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that you can use to provide\n * one or more initialization functions.\n *\n * The provided functions are injected at application startup and executed during\n * app initialization. If any of these functions returns a Promise or an Observable, initialization\n * does not complete until the Promise is resolved or the Observable is completed.\n *\n * You can, for example, create a factory function that loads language data\n * or an external configuration, and provide that function to the `APP_INITIALIZER` token.\n * The function is executed during the application bootstrap process,\n * and the needed data is available on startup.\n *\n * @see `ApplicationInitStatus`\n *\n * @usageNotes\n *\n * The following example illustrates how to configure a multi-provider using `APP_INITIALIZER` token\n * and a function returning a promise.\n *\n * ```\n *  function initializeApp(): Promise<any> {\n *    return new Promise((resolve, reject) => {\n *      // Do some asynchronous stuff\n *      resolve();\n *    });\n *  }\n *\n *  @NgModule({\n *   imports: [BrowserModule],\n *   declarations: [AppComponent],\n *   bootstrap: [AppComponent],\n *   providers: [{\n *     provide: APP_INITIALIZER,\n *     useFactory: () => initializeApp,\n *     multi: true\n *    }]\n *   })\n *  export class AppModule {}\n * ```\n *\n * It's also possible to configure a multi-provider using `APP_INITIALIZER` token and a function\n * returning an observable, see an example below. Note: the `HttpClient` in this example is used for\n * demo purposes to illustrate how the factory function can work with other providers available\n * through DI.\n *\n * ```\n *  function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {\n *   return () => httpClient.get(\"https://someUrl.com/api/user\")\n *     .pipe(\n *        tap(user => { ... })\n *     );\n *  }\n *\n *  @NgModule({\n *    imports: [BrowserModule, HttpClientModule],\n *    declarations: [AppComponent],\n *    bootstrap: [AppComponent],\n *    providers: [{\n *      provide: APP_INITIALIZER,\n *      useFactory: initializeAppFactory,\n *      deps: [HttpClient],\n *      multi: true\n *    }]\n *  })\n *  export class AppModule {}\n * ```\n *\n * @publicApi\n */\nconst APP_INITIALIZER = new InjectionToken('Application Initializer');\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER} functions.\n *\n * @publicApi\n */\nclass ApplicationInitStatus {\n    constructor(appInits) {\n        this.appInits = appInits;\n        this.resolve = noop;\n        this.reject = noop;\n        this.initialized = false;\n        this.done = false;\n        this.donePromise = new Promise((res, rej) => {\n            this.resolve = res;\n            this.reject = rej;\n        });\n    }\n    /** @internal */\n    runInitializers() {\n        if (this.initialized) {\n            return;\n        }\n        const asyncInitPromises = [];\n        const complete = () => {\n            this.done = true;\n            this.resolve();\n        };\n        if (this.appInits) {\n            for (let i = 0; i < this.appInits.length; i++) {\n                const initResult = this.appInits[i]();\n                if (isPromise(initResult)) {\n                    asyncInitPromises.push(initResult);\n                }\n                else if (isObservable(initResult)) {\n                    const observableAsPromise = new Promise((resolve, reject) => {\n                        initResult.subscribe({ complete: resolve, error: reject });\n                    });\n                    asyncInitPromises.push(observableAsPromise);\n                }\n            }\n        }\n        Promise.all(asyncInitPromises)\n            .then(() => {\n            complete();\n        })\n            .catch(e => {\n            this.reject(e);\n        });\n        if (asyncInitPromises.length === 0) {\n            complete();\n        }\n        this.initialized = true;\n    }\n}\nApplicationInitStatus.ɵfac = function ApplicationInitStatus_Factory(t) { return new (t || ApplicationInitStatus)(ɵɵinject(APP_INITIALIZER, 8)); };\nApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac });\nApplicationInitStatus.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [APP_INITIALIZER,] }, { type: Optional }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{\n        type: Injectable\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [APP_INITIALIZER]\n            }, {\n                type: Optional\n            }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") representing a unique string ID, used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.\n *\n * BY default, the value is randomly generated and assigned to the application by Angular.\n * To provide a custom ID value, use a DI provider <!-- TODO: provider --> to configure\n * the root {@link Injector} that uses this token.\n *\n * @publicApi\n */\nconst APP_ID = new InjectionToken('AppId');\nfunction _appIdRandomProviderFactory() {\n    return `${_randomChar()}${_randomChar()}${_randomChar()}`;\n}\n/**\n * Providers that generate a random `APP_ID_TOKEN`.\n * @publicApi\n */\nconst APP_ID_RANDOM_PROVIDER = {\n    provide: APP_ID,\n    useFactory: _appIdRandomProviderFactory,\n    deps: [],\n};\nfunction _randomChar() {\n    return String.fromCharCode(97 + Math.floor(Math.random() * 25));\n}\n/**\n * A function that is executed when a platform is initialized.\n * @publicApi\n */\nconst PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer');\n/**\n * A token that indicates an opaque platform ID.\n * @publicApi\n */\nconst PLATFORM_ID = new InjectionToken('Platform ID');\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that provides a set of callbacks to\n * be called for every component that is bootstrapped.\n *\n * Each callback must take a `ComponentRef` instance and return nothing.\n *\n * `(componentRef: ComponentRef) => void`\n *\n * @publicApi\n */\nconst APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates the root directory of\n * the application\n * @publicApi\n */\nconst PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass Console {\n    log(message) {\n        // tslint:disable-next-line:no-console\n        console.log(message);\n    }\n    // Note: for reporting errors use `DOM.logError()` as it is platform specific\n    warn(message) {\n        // tslint:disable-next-line:no-console\n        console.warn(message);\n    }\n}\nConsole.ɵfac = function Console_Factory(t) { return new (t || Console)(); };\nConsole.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: Console.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Console, [{\n        type: Injectable\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provide this token to set the locale of your application.\n * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,\n * DecimalPipe and PercentPipe) and by ICU expressions.\n *\n * See the [i18n guide](guide/i18n#setting-up-locale) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @publicApi\n */\nconst LOCALE_ID$1 = new InjectionToken('LocaleId');\n/**\n * Provide this token to set the default currency code your application uses for\n * CurrencyPipe when there is no currency code passed into it. This is only used by\n * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.\n *\n * See the [i18n guide](guide/i18n#setting-up-locale) for more information.\n *\n * <div class=\"alert is-helpful\">\n *\n * **Deprecation notice:**\n *\n * The default currency code is currently always `USD` but this is deprecated from v9.\n *\n * **In v10 the default currency code will be taken from the current locale.**\n *\n * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in\n * your application `NgModule`:\n *\n * ```ts\n * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}\n * ```\n *\n * </div>\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]\n * });\n * ```\n *\n * @publicApi\n */\nconst DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode');\n/**\n * Use this token at bootstrap to provide the content of your translation file (`xtb`,\n * `xlf` or `xlf2`) when you want to translate your application in another language.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @publicApi\n */\nconst TRANSLATIONS = new InjectionToken('Translations');\n/**\n * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,\n * `xlf` or `xlf2`.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @publicApi\n */\nconst TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');\n/**\n * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy\n * that the compiler should use in case of missing translations:\n * - Error: throw if you have missing translations.\n * - Warning (default): show a warning in the console and/or shell.\n * - Ignore: do nothing.\n *\n * See the [i18n guide](guide/i18n#missing-translation) for more information.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @publicApi\n */\nvar MissingTranslationStrategy;\n(function (MissingTranslationStrategy) {\n    MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n    MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n    MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n})(MissingTranslationStrategy || (MissingTranslationStrategy = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SWITCH_IVY_ENABLED__POST_R3__ = true;\nconst SWITCH_IVY_ENABLED__PRE_R3__ = false;\nconst ivyEnabled = SWITCH_IVY_ENABLED__POST_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Combination of NgModuleFactory and ComponentFactories.\n *\n * @publicApi\n */\nclass ModuleWithComponentFactories {\n    constructor(ngModuleFactory, componentFactories) {\n        this.ngModuleFactory = ngModuleFactory;\n        this.componentFactories = componentFactories;\n    }\n}\nfunction _throwError() {\n    throw new Error(`Runtime compiler is not loaded`);\n}\nconst Compiler_compileModuleSync__PRE_R3__ = _throwError;\nconst Compiler_compileModuleSync__POST_R3__ = function (moduleType) {\n    return new NgModuleFactory$1(moduleType);\n};\nconst Compiler_compileModuleSync = Compiler_compileModuleSync__POST_R3__;\nconst Compiler_compileModuleAsync__PRE_R3__ = _throwError;\nconst Compiler_compileModuleAsync__POST_R3__ = function (moduleType) {\n    return Promise.resolve(Compiler_compileModuleSync__POST_R3__(moduleType));\n};\nconst Compiler_compileModuleAsync = Compiler_compileModuleAsync__POST_R3__;\nconst Compiler_compileModuleAndAllComponentsSync__PRE_R3__ = _throwError;\nconst Compiler_compileModuleAndAllComponentsSync__POST_R3__ = function (moduleType) {\n    const ngModuleFactory = Compiler_compileModuleSync__POST_R3__(moduleType);\n    const moduleDef = getNgModuleDef(moduleType);\n    const componentFactories = maybeUnwrapFn(moduleDef.declarations)\n        .reduce((factories, declaration) => {\n        const componentDef = getComponentDef(declaration);\n        componentDef && factories.push(new ComponentFactory$1(componentDef));\n        return factories;\n    }, []);\n    return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n};\nconst Compiler_compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync__POST_R3__;\nconst Compiler_compileModuleAndAllComponentsAsync__PRE_R3__ = _throwError;\nconst Compiler_compileModuleAndAllComponentsAsync__POST_R3__ = function (moduleType) {\n    return Promise.resolve(Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType));\n};\nconst Compiler_compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync__POST_R3__;\n/**\n * Low-level service for running the angular compiler during runtime\n * to create {@link ComponentFactory}s, which\n * can later be used to create and render a Component instance.\n *\n * Each `@NgModule` provides an own `Compiler` to its injector,\n * that will use the directives/pipes of the ng module for compilation\n * of components.\n *\n * @publicApi\n */\nclass Compiler {\n    constructor() {\n        /**\n         * Compiles the given NgModule and all of its components. All templates of the components listed\n         * in `entryComponents` have to be inlined.\n         */\n        this.compileModuleSync = Compiler_compileModuleSync;\n        /**\n         * Compiles the given NgModule and all of its components\n         */\n        this.compileModuleAsync = Compiler_compileModuleAsync;\n        /**\n         * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n         */\n        this.compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync;\n        /**\n         * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n         */\n        this.compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync;\n    }\n    /**\n     * Clears all caches.\n     */\n    clearCache() { }\n    /**\n     * Clears the cache for the given component/ngModule.\n     */\n    clearCacheFor(type) { }\n    /**\n     * Returns the id for a given NgModule, if one is defined and known to the compiler.\n     */\n    getModuleId(moduleType) {\n        return undefined;\n    }\n}\nCompiler.ɵfac = function Compiler_Factory(t) { return new (t || Compiler)(); };\nCompiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Compiler, [{\n        type: Injectable\n    }], function () { return []; }, null); })();\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\nconst COMPILER_OPTIONS = new InjectionToken('compilerOptions');\n/**\n * A factory for creating a Compiler\n *\n * @publicApi\n */\nclass CompilerFactory {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst promise = (() => Promise.resolve(0))();\nfunction scheduleMicroTask(fn) {\n    if (typeof Zone === 'undefined') {\n        // use promise to schedule microTask instead of use Zone\n        promise.then(() => {\n            fn && fn.apply(null, null);\n        });\n    }\n    else {\n        Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getNativeRequestAnimationFrame() {\n    let nativeRequestAnimationFrame = _global['requestAnimationFrame'];\n    let nativeCancelAnimationFrame = _global['cancelAnimationFrame'];\n    if (typeof Zone !== 'undefined' && nativeRequestAnimationFrame && nativeCancelAnimationFrame) {\n        // use unpatched version of requestAnimationFrame(native delegate) if possible\n        // to avoid another Change detection\n        const unpatchedRequestAnimationFrame = nativeRequestAnimationFrame[Zone.__symbol__('OriginalDelegate')];\n        if (unpatchedRequestAnimationFrame) {\n            nativeRequestAnimationFrame = unpatchedRequestAnimationFrame;\n        }\n        const unpatchedCancelAnimationFrame = nativeCancelAnimationFrame[Zone.__symbol__('OriginalDelegate')];\n        if (unpatchedCancelAnimationFrame) {\n            nativeCancelAnimationFrame = unpatchedCancelAnimationFrame;\n        }\n    }\n    return { nativeRequestAnimationFrame, nativeCancelAnimationFrame };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n *   - docs explaining zones and the use of zones in Angular and change-detection\n *   - link to runOutsideAngular/run (throughout this file!)\n *   -->\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n *   selector: 'ng-zone-demo',\n *   template: `\n *     <h2>Demo: NgZone</h2>\n *\n *     <p>Progress: {{progress}}%</p>\n *     <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n *     <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n *     <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n *   `,\n * })\n * export class NgZoneDemo {\n *   progress: number = 0;\n *   label: string;\n *\n *   constructor(private _ngZone: NgZone) {}\n *\n *   // Loop inside the Angular zone\n *   // so the UI DOES refresh after each setTimeout cycle\n *   processWithinAngularZone() {\n *     this.label = 'inside';\n *     this.progress = 0;\n *     this._increaseProgress(() => console.log('Inside Done!'));\n *   }\n *\n *   // Loop outside of the Angular zone\n *   // so the UI DOES NOT refresh after each setTimeout cycle\n *   processOutsideOfAngularZone() {\n *     this.label = 'outside';\n *     this.progress = 0;\n *     this._ngZone.runOutsideAngular(() => {\n *       this._increaseProgress(() => {\n *         // reenter the Angular zone and display done\n *         this._ngZone.run(() => { console.log('Outside Done!'); });\n *       });\n *     });\n *   }\n *\n *   _increaseProgress(doneCallback: () => void) {\n *     this.progress += 1;\n *     console.log(`Current progress: ${this.progress}%`);\n *\n *     if (this.progress < 100) {\n *       window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n *     } else {\n *       doneCallback();\n *     }\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nclass NgZone {\n    constructor({ enableLongStackTrace = false, shouldCoalesceEventChangeDetection = false, shouldCoalesceRunChangeDetection = false }) {\n        this.hasPendingMacrotasks = false;\n        this.hasPendingMicrotasks = false;\n        /**\n         * Whether there are no outstanding microtasks or macrotasks.\n         */\n        this.isStable = true;\n        /**\n         * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n         */\n        this.onUnstable = new EventEmitter(false);\n        /**\n         * Notifies when there is no more microtasks enqueued in the current VM Turn.\n         * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n         * For this reason this event can fire multiple times per VM Turn.\n         */\n        this.onMicrotaskEmpty = new EventEmitter(false);\n        /**\n         * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n         * implies we are about to relinquish VM turn.\n         * This event gets called just once.\n         */\n        this.onStable = new EventEmitter(false);\n        /**\n         * Notifies that an error has been delivered.\n         */\n        this.onError = new EventEmitter(false);\n        if (typeof Zone == 'undefined') {\n            throw new Error(`In this configuration Angular requires Zone.js`);\n        }\n        Zone.assertZonePatched();\n        const self = this;\n        self._nesting = 0;\n        self._outer = self._inner = Zone.current;\n        if (Zone['TaskTrackingZoneSpec']) {\n            self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']);\n        }\n        if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {\n            self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);\n        }\n        // if shouldCoalesceRunChangeDetection is true, all tasks including event tasks will be\n        // coalesced, so shouldCoalesceEventChangeDetection option is not necessary and can be skipped.\n        self.shouldCoalesceEventChangeDetection =\n            !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;\n        self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;\n        self.lastRequestAnimationFrameId = -1;\n        self.nativeRequestAnimationFrame = getNativeRequestAnimationFrame().nativeRequestAnimationFrame;\n        forkInnerZoneWithAngularBehavior(self);\n    }\n    static isInAngularZone() {\n        return Zone.current.get('isAngularZone') === true;\n    }\n    static assertInAngularZone() {\n        if (!NgZone.isInAngularZone()) {\n            throw new Error('Expected to be in Angular Zone, but it is not!');\n        }\n    }\n    static assertNotInAngularZone() {\n        if (NgZone.isInAngularZone()) {\n            throw new Error('Expected to not be in Angular Zone, but it is!');\n        }\n    }\n    /**\n     * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n     * the function.\n     *\n     * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n     * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n     *\n     * Any future tasks or microtasks scheduled from within this function will continue executing from\n     * within the Angular zone.\n     *\n     * If a synchronous error happens it will be rethrown and not reported via `onError`.\n     */\n    run(fn, applyThis, applyArgs) {\n        return this._inner.run(fn, applyThis, applyArgs);\n    }\n    /**\n     * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n     * returned by the function.\n     *\n     * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n     * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n     *\n     * Any future tasks or microtasks scheduled from within this function will continue executing from\n     * within the Angular zone.\n     *\n     * If a synchronous error happens it will be rethrown and not reported via `onError`.\n     */\n    runTask(fn, applyThis, applyArgs, name) {\n        const zone = this._inner;\n        const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n        try {\n            return zone.runTask(task, applyThis, applyArgs);\n        }\n        finally {\n            zone.cancelTask(task);\n        }\n    }\n    /**\n     * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n     * rethrown.\n     */\n    runGuarded(fn, applyThis, applyArgs) {\n        return this._inner.runGuarded(fn, applyThis, applyArgs);\n    }\n    /**\n     * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n     * the function.\n     *\n     * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n     * work that\n     * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n     *\n     * Any future tasks or microtasks scheduled from within this function will continue executing from\n     * outside of the Angular zone.\n     *\n     * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n     */\n    runOutsideAngular(fn) {\n        return this._outer.run(fn);\n    }\n}\nconst EMPTY_PAYLOAD = {};\nfunction checkStable(zone) {\n    // TODO: @JiaLiPassion, should check zone.isCheckStableRunning to prevent\n    // re-entry. The case is:\n    //\n    // @Component({...})\n    // export class AppComponent {\n    // constructor(private ngZone: NgZone) {\n    //   this.ngZone.onStable.subscribe(() => {\n    //     this.ngZone.run(() => console.log('stable'););\n    //   });\n    // }\n    //\n    // The onStable subscriber run another function inside ngZone\n    // which causes `checkStable()` re-entry.\n    // But this fix causes some issues in g3, so this fix will be\n    // launched in another PR.\n    if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n        try {\n            zone._nesting++;\n            zone.onMicrotaskEmpty.emit(null);\n        }\n        finally {\n            zone._nesting--;\n            if (!zone.hasPendingMicrotasks) {\n                try {\n                    zone.runOutsideAngular(() => zone.onStable.emit(null));\n                }\n                finally {\n                    zone.isStable = true;\n                }\n            }\n        }\n    }\n}\nfunction delayChangeDetectionForEvents(zone) {\n    /**\n     * We also need to check _nesting here\n     * Consider the following case with shouldCoalesceRunChangeDetection = true\n     *\n     * ngZone.run(() => {});\n     * ngZone.run(() => {});\n     *\n     * We want the two `ngZone.run()` only trigger one change detection\n     * when shouldCoalesceRunChangeDetection is true.\n     * And because in this case, change detection run in async way(requestAnimationFrame),\n     * so we also need to check the _nesting here to prevent multiple\n     * change detections.\n     */\n    if (zone.isCheckStableRunning || zone.lastRequestAnimationFrameId !== -1) {\n        return;\n    }\n    zone.lastRequestAnimationFrameId = zone.nativeRequestAnimationFrame.call(_global, () => {\n        // This is a work around for https://github.com/angular/angular/issues/36839.\n        // The core issue is that when event coalescing is enabled it is possible for microtasks\n        // to get flushed too early (As is the case with `Promise.then`) between the\n        // coalescing eventTasks.\n        //\n        // To workaround this we schedule a \"fake\" eventTask before we process the\n        // coalescing eventTasks. The benefit of this is that the \"fake\" container eventTask\n        //  will prevent the microtasks queue from getting drained in between the coalescing\n        // eventTask execution.\n        if (!zone.fakeTopEventTask) {\n            zone.fakeTopEventTask = Zone.root.scheduleEventTask('fakeTopEventTask', () => {\n                zone.lastRequestAnimationFrameId = -1;\n                updateMicroTaskStatus(zone);\n                zone.isCheckStableRunning = true;\n                checkStable(zone);\n                zone.isCheckStableRunning = false;\n            }, undefined, () => { }, () => { });\n        }\n        zone.fakeTopEventTask.invoke();\n    });\n    updateMicroTaskStatus(zone);\n}\nfunction forkInnerZoneWithAngularBehavior(zone) {\n    const delayChangeDetectionForEventsDelegate = () => {\n        delayChangeDetectionForEvents(zone);\n    };\n    zone._inner = zone._inner.fork({\n        name: 'angular',\n        properties: { 'isAngularZone': true },\n        onInvokeTask: (delegate, current, target, task, applyThis, applyArgs) => {\n            try {\n                onEnter(zone);\n                return delegate.invokeTask(target, task, applyThis, applyArgs);\n            }\n            finally {\n                if ((zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask') ||\n                    zone.shouldCoalesceRunChangeDetection) {\n                    delayChangeDetectionForEventsDelegate();\n                }\n                onLeave(zone);\n            }\n        },\n        onInvoke: (delegate, current, target, callback, applyThis, applyArgs, source) => {\n            try {\n                onEnter(zone);\n                return delegate.invoke(target, callback, applyThis, applyArgs, source);\n            }\n            finally {\n                if (zone.shouldCoalesceRunChangeDetection) {\n                    delayChangeDetectionForEventsDelegate();\n                }\n                onLeave(zone);\n            }\n        },\n        onHasTask: (delegate, current, target, hasTaskState) => {\n            delegate.hasTask(target, hasTaskState);\n            if (current === target) {\n                // We are only interested in hasTask events which originate from our zone\n                // (A child hasTask event is not interesting to us)\n                if (hasTaskState.change == 'microTask') {\n                    zone._hasPendingMicrotasks = hasTaskState.microTask;\n                    updateMicroTaskStatus(zone);\n                    checkStable(zone);\n                }\n                else if (hasTaskState.change == 'macroTask') {\n                    zone.hasPendingMacrotasks = hasTaskState.macroTask;\n                }\n            }\n        },\n        onHandleError: (delegate, current, target, error) => {\n            delegate.handleError(target, error);\n            zone.runOutsideAngular(() => zone.onError.emit(error));\n            return false;\n        }\n    });\n}\nfunction updateMicroTaskStatus(zone) {\n    if (zone._hasPendingMicrotasks ||\n        ((zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) &&\n            zone.lastRequestAnimationFrameId !== -1)) {\n        zone.hasPendingMicrotasks = true;\n    }\n    else {\n        zone.hasPendingMicrotasks = false;\n    }\n}\nfunction onEnter(zone) {\n    zone._nesting++;\n    if (zone.isStable) {\n        zone.isStable = false;\n        zone.onUnstable.emit(null);\n    }\n}\nfunction onLeave(zone) {\n    zone._nesting--;\n    checkStable(zone);\n}\n/**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\nclass NoopNgZone {\n    constructor() {\n        this.hasPendingMicrotasks = false;\n        this.hasPendingMacrotasks = false;\n        this.isStable = true;\n        this.onUnstable = new EventEmitter();\n        this.onMicrotaskEmpty = new EventEmitter();\n        this.onStable = new EventEmitter();\n        this.onError = new EventEmitter();\n    }\n    run(fn, applyThis, applyArgs) {\n        return fn.apply(applyThis, applyArgs);\n    }\n    runGuarded(fn, applyThis, applyArgs) {\n        return fn.apply(applyThis, applyArgs);\n    }\n    runOutsideAngular(fn) {\n        return fn();\n    }\n    runTask(fn, applyThis, applyArgs, name) {\n        return fn.apply(applyThis, applyArgs);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser. Each bootstrapped Angular application on the page will have\n * an instance of Testability.\n * @publicApi\n */\nclass Testability {\n    constructor(_ngZone) {\n        this._ngZone = _ngZone;\n        this._pendingCount = 0;\n        this._isZoneStable = true;\n        /**\n         * Whether any work was done since the last 'whenStable' callback. This is\n         * useful to detect if this could have potentially destabilized another\n         * component while it is stabilizing.\n         * @internal\n         */\n        this._didWork = false;\n        this._callbacks = [];\n        this.taskTrackingZone = null;\n        this._watchAngularEvents();\n        _ngZone.run(() => {\n            this.taskTrackingZone =\n                typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');\n        });\n    }\n    _watchAngularEvents() {\n        this._ngZone.onUnstable.subscribe({\n            next: () => {\n                this._didWork = true;\n                this._isZoneStable = false;\n            }\n        });\n        this._ngZone.runOutsideAngular(() => {\n            this._ngZone.onStable.subscribe({\n                next: () => {\n                    NgZone.assertNotInAngularZone();\n                    scheduleMicroTask(() => {\n                        this._isZoneStable = true;\n                        this._runCallbacksIfReady();\n                    });\n                }\n            });\n        });\n    }\n    /**\n     * Increases the number of pending request\n     * @deprecated pending requests are now tracked with zones.\n     */\n    increasePendingRequestCount() {\n        this._pendingCount += 1;\n        this._didWork = true;\n        return this._pendingCount;\n    }\n    /**\n     * Decreases the number of pending request\n     * @deprecated pending requests are now tracked with zones\n     */\n    decreasePendingRequestCount() {\n        this._pendingCount -= 1;\n        if (this._pendingCount < 0) {\n            throw new Error('pending async requests below zero');\n        }\n        this._runCallbacksIfReady();\n        return this._pendingCount;\n    }\n    /**\n     * Whether an associated application is stable\n     */\n    isStable() {\n        return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;\n    }\n    _runCallbacksIfReady() {\n        if (this.isStable()) {\n            // Schedules the call backs in a new frame so that it is always async.\n            scheduleMicroTask(() => {\n                while (this._callbacks.length !== 0) {\n                    let cb = this._callbacks.pop();\n                    clearTimeout(cb.timeoutId);\n                    cb.doneCb(this._didWork);\n                }\n                this._didWork = false;\n            });\n        }\n        else {\n            // Still not stable, send updates.\n            let pending = this.getPendingTasks();\n            this._callbacks = this._callbacks.filter((cb) => {\n                if (cb.updateCb && cb.updateCb(pending)) {\n                    clearTimeout(cb.timeoutId);\n                    return false;\n                }\n                return true;\n            });\n            this._didWork = true;\n        }\n    }\n    getPendingTasks() {\n        if (!this.taskTrackingZone) {\n            return [];\n        }\n        // Copy the tasks data so that we don't leak tasks.\n        return this.taskTrackingZone.macroTasks.map((t) => {\n            return {\n                source: t.source,\n                // From TaskTrackingZone:\n                // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n                creationLocation: t.creationLocation,\n                data: t.data\n            };\n        });\n    }\n    addCallback(cb, timeout, updateCb) {\n        let timeoutId = -1;\n        if (timeout && timeout > 0) {\n            timeoutId = setTimeout(() => {\n                this._callbacks = this._callbacks.filter((cb) => cb.timeoutId !== timeoutId);\n                cb(this._didWork, this.getPendingTasks());\n            }, timeout);\n        }\n        this._callbacks.push({ doneCb: cb, timeoutId: timeoutId, updateCb: updateCb });\n    }\n    /**\n     * Wait for the application to be stable with a timeout. If the timeout is reached before that\n     * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n     *\n     * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n     *    whichever comes first.\n     * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n     *    specified, whenStable() will wait forever.\n     * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n     *    pending macrotasks changes. If this callback returns true doneCb will not be invoked\n     *    and no further updates will be issued.\n     */\n    whenStable(doneCb, timeout, updateCb) {\n        if (updateCb && !this.taskTrackingZone) {\n            throw new Error('Task tracking zone is required when passing an update callback to ' +\n                'whenStable(). Is \"zone.js/plugins/task-tracking\" loaded?');\n        }\n        // These arguments are 'Function' above to keep the public API simple.\n        this.addCallback(doneCb, timeout, updateCb);\n        this._runCallbacksIfReady();\n    }\n    /**\n     * Get the number of pending requests\n     * @deprecated pending requests are now tracked with zones\n     */\n    getPendingRequestCount() {\n        return this._pendingCount;\n    }\n    /**\n     * Find providers by name\n     * @param using The root element to search from\n     * @param provider The name of binding variable\n     * @param exactMatch Whether using exactMatch\n     */\n    findProviders(using, provider, exactMatch) {\n        // TODO(juliemr): implement.\n        return [];\n    }\n}\nTestability.ɵfac = function Testability_Factory(t) { return new (t || Testability)(ɵɵinject(NgZone)); };\nTestability.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Testability, factory: Testability.ɵfac });\nTestability.ctorParameters = () => [\n    { type: NgZone }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Testability, [{\n        type: Injectable\n    }], function () { return [{ type: NgZone }]; }, null); })();\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @publicApi\n */\nclass TestabilityRegistry {\n    constructor() {\n        /** @internal */\n        this._applications = new Map();\n        _testabilityGetter.addToWindow(this);\n    }\n    /**\n     * Registers an application with a testability hook so that it can be tracked\n     * @param token token of application, root element\n     * @param testability Testability hook\n     */\n    registerApplication(token, testability) {\n        this._applications.set(token, testability);\n    }\n    /**\n     * Unregisters an application.\n     * @param token token of application, root element\n     */\n    unregisterApplication(token) {\n        this._applications.delete(token);\n    }\n    /**\n     * Unregisters all applications\n     */\n    unregisterAllApplications() {\n        this._applications.clear();\n    }\n    /**\n     * Get a testability hook associated with the application\n     * @param elem root element\n     */\n    getTestability(elem) {\n        return this._applications.get(elem) || null;\n    }\n    /**\n     * Get all registered testabilities\n     */\n    getAllTestabilities() {\n        return Array.from(this._applications.values());\n    }\n    /**\n     * Get all registered applications(root elements)\n     */\n    getAllRootElements() {\n        return Array.from(this._applications.keys());\n    }\n    /**\n     * Find testability of a node in the Tree\n     * @param elem node\n     * @param findInAncestors whether finding testability in ancestors if testability was not found in\n     * current node\n     */\n    findTestabilityInTree(elem, findInAncestors = true) {\n        return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n    }\n}\nTestabilityRegistry.ɵfac = function TestabilityRegistry_Factory(t) { return new (t || TestabilityRegistry)(); };\nTestabilityRegistry.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: TestabilityRegistry, factory: TestabilityRegistry.ɵfac });\nTestabilityRegistry.ctorParameters = () => [];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(TestabilityRegistry, [{\n        type: Injectable\n    }], function () { return []; }, null); })();\nclass _NoopGetTestability {\n    addToWindow(registry) { }\n    findTestabilityInTree(registry, elem, findInAncestors) {\n        return null;\n    }\n}\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @publicApi\n */\nfunction setTestabilityGetter(getter) {\n    _testabilityGetter = getter;\n}\nlet _testabilityGetter = new _NoopGetTestability();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This file is used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`.\n *\n * For more information on how to run and debug tests with either Ivy or View Engine (legacy),\n * please see [BAZEL.md](./docs/BAZEL.md).\n */\nlet _devMode = true;\nlet _runModeLocked = false;\n/**\n * Returns whether Angular is in development mode. After called once,\n * the value is locked and won't change any more.\n *\n * By default, this is true, unless a user calls `enableProdMode` before calling this.\n *\n * @publicApi\n */\nfunction isDevMode() {\n    _runModeLocked = true;\n    return _devMode;\n}\n/**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n * @publicApi\n */\nfunction enableProdMode() {\n    if (_runModeLocked) {\n        throw new Error('Cannot enable prod mode after platform setup.');\n    }\n    // The below check is there so when ngDevMode is set via terser\n    // `global['ngDevMode'] = false;` is also dropped.\n    if (typeof ngDevMode === undefined || !!ngDevMode) {\n        _global['ngDevMode'] = false;\n    }\n    _devMode = false;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet _platform;\nlet compileNgModuleFactory = compileNgModuleFactory__POST_R3__;\nfunction compileNgModuleFactory__PRE_R3__(injector, options, moduleType) {\n    const compilerFactory = injector.get(CompilerFactory);\n    const compiler = compilerFactory.createCompiler([options]);\n    return compiler.compileModuleAsync(moduleType);\n}\nfunction compileNgModuleFactory__POST_R3__(injector, options, moduleType) {\n    ngDevMode && assertNgModuleType(moduleType);\n    const moduleFactory = new NgModuleFactory$1(moduleType);\n    // All of the logic below is irrelevant for AOT-compiled code.\n    if (typeof ngJitMode !== 'undefined' && !ngJitMode) {\n        return Promise.resolve(moduleFactory);\n    }\n    const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\n    // Configure the compiler to use the provided options. This call may fail when multiple modules\n    // are bootstrapped with incompatible options, as a component can only be compiled according to\n    // a single set of options.\n    setJitOptions({\n        defaultEncapsulation: _lastDefined(compilerOptions.map(opts => opts.defaultEncapsulation)),\n        preserveWhitespaces: _lastDefined(compilerOptions.map(opts => opts.preserveWhitespaces)),\n    });\n    if (isComponentResourceResolutionQueueEmpty()) {\n        return Promise.resolve(moduleFactory);\n    }\n    const compilerProviders = _mergeArrays(compilerOptions.map(o => o.providers));\n    // In case there are no compiler providers, we just return the module factory as\n    // there won't be any resource loader. This can happen with Ivy, because AOT compiled\n    // modules can be still passed through \"bootstrapModule\". In that case we shouldn't\n    // unnecessarily require the JIT compiler.\n    if (compilerProviders.length === 0) {\n        return Promise.resolve(moduleFactory);\n    }\n    const compiler = getCompilerFacade({\n        usage: 0 /* Decorator */,\n        kind: 'NgModule',\n        type: moduleType,\n    });\n    const compilerInjector = Injector.create({ providers: compilerProviders });\n    const resourceLoader = compilerInjector.get(compiler.ResourceLoader);\n    // The resource loader can also return a string while the \"resolveComponentResources\"\n    // always expects a promise. Therefore we need to wrap the returned value in a promise.\n    return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url)))\n        .then(() => moduleFactory);\n}\n// the `window.ng` global utilities are only available in non-VE versions of\n// Angular. The function switch below will make sure that the code is not\n// included into Angular when PRE mode is active.\nfunction publishDefaultGlobalUtils__PRE_R3__() { }\nfunction publishDefaultGlobalUtils__POST_R3__() {\n    ngDevMode && publishDefaultGlobalUtils();\n}\nlet publishDefaultGlobalUtils$1 = publishDefaultGlobalUtils__POST_R3__;\nlet isBoundToModule = isBoundToModule__POST_R3__;\nfunction isBoundToModule__PRE_R3__(cf) {\n    return cf instanceof ComponentFactoryBoundToModule;\n}\nfunction isBoundToModule__POST_R3__(cf) {\n    return cf.isBoundToModule;\n}\nconst ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @publicApi\n */\nclass NgProbeToken {\n    constructor(name, token) {\n        this.name = name;\n        this.token = token;\n    }\n}\n/**\n * Creates a platform.\n * Platforms must be created on launch using this function.\n *\n * @publicApi\n */\nfunction createPlatform(injector) {\n    if (_platform && !_platform.destroyed &&\n        !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n        throw new Error('There can be only one platform. Destroy the previous one to create a new one.');\n    }\n    publishDefaultGlobalUtils$1();\n    _platform = injector.get(PlatformRef);\n    const inits = injector.get(PLATFORM_INITIALIZER, null);\n    if (inits)\n        inits.forEach((init) => init());\n    return _platform;\n}\n/**\n * Creates a factory for a platform. Can be used to provide or override `Providers` specific to\n * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.\n * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories\n * to build up configurations that might be required by different libraries or parts of the\n * application.\n * @param name Identifies the new platform factory.\n * @param providers A set of dependency providers for platforms created with the new factory.\n *\n * @publicApi\n */\nfunction createPlatformFactory(parentPlatformFactory, name, providers = []) {\n    const desc = `Platform: ${name}`;\n    const marker = new InjectionToken(desc);\n    return (extraProviders = []) => {\n        let platform = getPlatform();\n        if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n            if (parentPlatformFactory) {\n                parentPlatformFactory(providers.concat(extraProviders).concat({ provide: marker, useValue: true }));\n            }\n            else {\n                const injectedProviders = providers.concat(extraProviders).concat({ provide: marker, useValue: true }, {\n                    provide: INJECTOR_SCOPE,\n                    useValue: 'platform'\n                });\n                createPlatform(Injector.create({ providers: injectedProviders, name: desc }));\n            }\n        }\n        return assertPlatform(marker);\n    };\n}\n/**\n * Checks that there is currently a platform that contains the given token as a provider.\n *\n * @publicApi\n */\nfunction assertPlatform(requiredToken) {\n    const platform = getPlatform();\n    if (!platform) {\n        throw new Error('No platform exists!');\n    }\n    if (!platform.injector.get(requiredToken, null)) {\n        throw new Error('A platform with a different configuration has been created. Please destroy it first.');\n    }\n    return platform;\n}\n/**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n *\n * @publicApi\n */\nfunction destroyPlatform() {\n    if (_platform && !_platform.destroyed) {\n        _platform.destroy();\n    }\n}\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\nfunction getPlatform() {\n    return _platform && !_platform.destroyed ? _platform : null;\n}\n/**\n * The Angular platform is the entry point for Angular on a web page.\n * Each page has exactly one platform. Services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n * A page's platform is initialized implicitly when a platform is created using a platform\n * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.\n *\n * @publicApi\n */\nclass PlatformRef {\n    /** @internal */\n    constructor(_injector) {\n        this._injector = _injector;\n        this._modules = [];\n        this._destroyListeners = [];\n        this._destroyed = false;\n    }\n    /**\n     * Creates an instance of an `@NgModule` for the given platform for offline compilation.\n     *\n     * @usageNotes\n     *\n     * The following example creates the NgModule for a browser platform.\n     *\n     * ```typescript\n     * my_module.ts:\n     *\n     * @NgModule({\n     *   imports: [BrowserModule]\n     * })\n     * class MyModule {}\n     *\n     * main.ts:\n     * import {MyModuleNgFactory} from './my_module.ngfactory';\n     * import {platformBrowser} from '@angular/platform-browser';\n     *\n     * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);\n     * ```\n     */\n    bootstrapModuleFactory(moduleFactory, options) {\n        // Note: We need to create the NgZone _before_ we instantiate the module,\n        // as instantiating the module creates some providers eagerly.\n        // So we create a mini parent injector that just contains the new NgZone and\n        // pass that as parent to the NgModuleFactory.\n        const ngZoneOption = options ? options.ngZone : undefined;\n        const ngZoneEventCoalescing = (options && options.ngZoneEventCoalescing) || false;\n        const ngZoneRunCoalescing = (options && options.ngZoneRunCoalescing) || false;\n        const ngZone = getNgZone(ngZoneOption, { ngZoneEventCoalescing, ngZoneRunCoalescing });\n        const providers = [{ provide: NgZone, useValue: ngZone }];\n        // Note: Create ngZoneInjector within ngZone.run so that all of the instantiated services are\n        // created within the Angular zone\n        // Do not try to replace ngZone.run with ApplicationRef#run because ApplicationRef would then be\n        // created outside of the Angular zone.\n        return ngZone.run(() => {\n            const ngZoneInjector = Injector.create({ providers: providers, parent: this.injector, name: moduleFactory.moduleType.name });\n            const moduleRef = moduleFactory.create(ngZoneInjector);\n            const exceptionHandler = moduleRef.injector.get(ErrorHandler, null);\n            if (!exceptionHandler) {\n                throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');\n            }\n            ngZone.runOutsideAngular(() => {\n                const subscription = ngZone.onError.subscribe({\n                    next: (error) => {\n                        exceptionHandler.handleError(error);\n                    }\n                });\n                moduleRef.onDestroy(() => {\n                    remove(this._modules, moduleRef);\n                    subscription.unsubscribe();\n                });\n            });\n            return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {\n                const initStatus = moduleRef.injector.get(ApplicationInitStatus);\n                initStatus.runInitializers();\n                return initStatus.donePromise.then(() => {\n                    if (ivyEnabled) {\n                        // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy\n                        const localeId = moduleRef.injector.get(LOCALE_ID$1, DEFAULT_LOCALE_ID);\n                        setLocaleId(localeId || DEFAULT_LOCALE_ID);\n                    }\n                    this._moduleDoBootstrap(moduleRef);\n                    return moduleRef;\n                });\n            });\n        });\n    }\n    /**\n     * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.\n     *\n     * @usageNotes\n     * ### Simple Example\n     *\n     * ```typescript\n     * @NgModule({\n     *   imports: [BrowserModule]\n     * })\n     * class MyModule {}\n     *\n     * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n     * ```\n     *\n     */\n    bootstrapModule(moduleType, compilerOptions = []) {\n        const options = optionsReducer({}, compilerOptions);\n        return compileNgModuleFactory(this.injector, options, moduleType)\n            .then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options));\n    }\n    _moduleDoBootstrap(moduleRef) {\n        const appRef = moduleRef.injector.get(ApplicationRef);\n        if (moduleRef._bootstrapComponents.length > 0) {\n            moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f));\n        }\n        else if (moduleRef.instance.ngDoBootstrap) {\n            moduleRef.instance.ngDoBootstrap(appRef);\n        }\n        else {\n            throw new Error(`The module ${stringify(moduleRef.instance\n                .constructor)} was bootstrapped, but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. ` +\n                `Please define one of these.`);\n        }\n        this._modules.push(moduleRef);\n    }\n    /**\n     * Registers a listener to be called when the platform is destroyed.\n     */\n    onDestroy(callback) {\n        this._destroyListeners.push(callback);\n    }\n    /**\n     * Retrieves the platform {@link Injector}, which is the parent injector for\n     * every Angular application on the page and provides singleton providers.\n     */\n    get injector() {\n        return this._injector;\n    }\n    /**\n     * Destroys the current Angular platform and all Angular applications on the page.\n     * Destroys all modules and listeners registered with the platform.\n     */\n    destroy() {\n        if (this._destroyed) {\n            throw new Error('The platform has already been destroyed!');\n        }\n        this._modules.slice().forEach(module => module.destroy());\n        this._destroyListeners.forEach(listener => listener());\n        this._destroyed = true;\n    }\n    get destroyed() {\n        return this._destroyed;\n    }\n}\nPlatformRef.ɵfac = function PlatformRef_Factory(t) { return new (t || PlatformRef)(ɵɵinject(Injector)); };\nPlatformRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: PlatformRef, factory: PlatformRef.ɵfac });\nPlatformRef.ctorParameters = () => [\n    { type: Injector }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(PlatformRef, [{\n        type: Injectable\n    }], function () { return [{ type: Injector }]; }, null); })();\nfunction getNgZone(ngZoneOption, extra) {\n    let ngZone;\n    if (ngZoneOption === 'noop') {\n        ngZone = new NoopNgZone();\n    }\n    else {\n        ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) || new NgZone({\n            enableLongStackTrace: isDevMode(),\n            shouldCoalesceEventChangeDetection: !!(extra === null || extra === void 0 ? void 0 : extra.ngZoneEventCoalescing),\n            shouldCoalesceRunChangeDetection: !!(extra === null || extra === void 0 ? void 0 : extra.ngZoneRunCoalescing)\n        });\n    }\n    return ngZone;\n}\nfunction _callAndReportToErrorHandler(errorHandler, ngZone, callback) {\n    try {\n        const result = callback();\n        if (isPromise(result)) {\n            return result.catch((e) => {\n                ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n                // rethrow as the exception handler might not do it\n                throw e;\n            });\n        }\n        return result;\n    }\n    catch (e) {\n        ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n        // rethrow as the exception handler might not do it\n        throw e;\n    }\n}\nfunction optionsReducer(dst, objs) {\n    if (Array.isArray(objs)) {\n        dst = objs.reduce(optionsReducer, dst);\n    }\n    else {\n        dst = Object.assign(Object.assign({}, dst), objs);\n    }\n    return dst;\n}\n/**\n * A reference to an Angular application running on a page.\n *\n * @usageNotes\n *\n * {@a is-stable-examples}\n * ### isStable examples and caveats\n *\n * Note two important points about `isStable`, demonstrated in the examples below:\n * - the application will never be stable if you start any kind\n * of recurrent asynchronous task when the application starts\n * (for example for a polling process, started with a `setInterval`, a `setTimeout`\n * or using RxJS operators like `interval`);\n * - the `isStable` Observable runs outside of the Angular zone.\n *\n * Let's imagine that you start a recurrent task\n * (here incrementing a counter, using RxJS `interval`),\n * and at the same time subscribe to `isStable`.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n *   appRef.isStable.pipe(\n *      filter(stable => stable)\n *   ).subscribe(() => console.log('App is stable now');\n *   interval(1000).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, `isStable` will never emit `true`,\n * and the trace \"App is stable now\" will never get logged.\n *\n * If you want to execute something when the app is stable,\n * you have to wait for the application to be stable\n * before starting your polling process.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     tap(stable => console.log('App is stable now')),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, the trace \"App is stable now\" will be logged\n * and then the counter starts incrementing every second.\n *\n * Note also that this Observable runs outside of the Angular zone,\n * which means that the code in the subscription\n * to this Observable will not trigger the change detection.\n *\n * Let's imagine that instead of logging the counter value,\n * you update a field of your component\n * and display it in its template.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => this.value = counter);\n * }\n * ```\n * As the `isStable` Observable runs outside the zone,\n * the `value` field will be updated properly,\n * but the template will not be refreshed!\n *\n * You'll have to manually trigger the change detection to update the template.\n *\n * ```\n * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => {\n *     this.value = counter;\n *     cd.detectChanges();\n *   });\n * }\n * ```\n *\n * Or make the subscription callback run inside the zone.\n *\n * ```\n * constructor(appRef: ApplicationRef, zone: NgZone) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => zone.run(() => this.value = counter));\n * }\n * ```\n *\n * @publicApi\n */\nclass ApplicationRef {\n    /** @internal */\n    constructor(_zone, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {\n        this._zone = _zone;\n        this._injector = _injector;\n        this._exceptionHandler = _exceptionHandler;\n        this._componentFactoryResolver = _componentFactoryResolver;\n        this._initStatus = _initStatus;\n        /** @internal */\n        this._bootstrapListeners = [];\n        this._views = [];\n        this._runningTick = false;\n        this._stable = true;\n        /**\n         * Get a list of component types registered to this application.\n         * This list is populated even before the component is created.\n         */\n        this.componentTypes = [];\n        /**\n         * Get a list of components registered to this application.\n         */\n        this.components = [];\n        this._onMicrotaskEmptySubscription = this._zone.onMicrotaskEmpty.subscribe({\n            next: () => {\n                this._zone.run(() => {\n                    this.tick();\n                });\n            }\n        });\n        const isCurrentlyStable = new Observable((observer) => {\n            this._stable = this._zone.isStable && !this._zone.hasPendingMacrotasks &&\n                !this._zone.hasPendingMicrotasks;\n            this._zone.runOutsideAngular(() => {\n                observer.next(this._stable);\n                observer.complete();\n            });\n        });\n        const isStable = new Observable((observer) => {\n            // Create the subscription to onStable outside the Angular Zone so that\n            // the callback is run outside the Angular Zone.\n            let stableSub;\n            this._zone.runOutsideAngular(() => {\n                stableSub = this._zone.onStable.subscribe(() => {\n                    NgZone.assertNotInAngularZone();\n                    // Check whether there are no pending macro/micro tasks in the next tick\n                    // to allow for NgZone to update the state.\n                    scheduleMicroTask(() => {\n                        if (!this._stable && !this._zone.hasPendingMacrotasks &&\n                            !this._zone.hasPendingMicrotasks) {\n                            this._stable = true;\n                            observer.next(true);\n                        }\n                    });\n                });\n            });\n            const unstableSub = this._zone.onUnstable.subscribe(() => {\n                NgZone.assertInAngularZone();\n                if (this._stable) {\n                    this._stable = false;\n                    this._zone.runOutsideAngular(() => {\n                        observer.next(false);\n                    });\n                }\n            });\n            return () => {\n                stableSub.unsubscribe();\n                unstableSub.unsubscribe();\n            };\n        });\n        this.isStable =\n            merge$1(isCurrentlyStable, isStable.pipe(share()));\n    }\n    /**\n     * Bootstrap a component onto the element identified by its selector or, optionally, to a\n     * specified element.\n     *\n     * @usageNotes\n     * ### Bootstrap process\n     *\n     * When bootstrapping a component, Angular mounts it onto a target DOM element\n     * and kicks off automatic change detection. The target DOM element can be\n     * provided using the `rootSelectorOrNode` argument.\n     *\n     * If the target DOM element is not provided, Angular tries to find one on a page\n     * using the `selector` of the component that is being bootstrapped\n     * (first matched element is used).\n     *\n     * ### Example\n     *\n     * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,\n     * but it requires us to know the component while writing the application code.\n     *\n     * Imagine a situation where we have to wait for an API call to decide about the component to\n     * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to\n     * dynamically bootstrap a component.\n     *\n     * {@example core/ts/platform/platform.ts region='componentSelector'}\n     *\n     * Optionally, a component can be mounted onto a DOM element that does not match the\n     * selector of the bootstrapped component.\n     *\n     * In the following example, we are providing a CSS selector to match the target element.\n     *\n     * {@example core/ts/platform/platform.ts region='cssSelector'}\n     *\n     * While in this example, we are providing reference to a DOM node.\n     *\n     * {@example core/ts/platform/platform.ts region='domNode'}\n     */\n    bootstrap(componentOrFactory, rootSelectorOrNode) {\n        if (!this._initStatus.done) {\n            throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');\n        }\n        let componentFactory;\n        if (componentOrFactory instanceof ComponentFactory) {\n            componentFactory = componentOrFactory;\n        }\n        else {\n            componentFactory =\n                this._componentFactoryResolver.resolveComponentFactory(componentOrFactory);\n        }\n        this.componentTypes.push(componentFactory.componentType);\n        // Create a factory associated with the current module if it's not bound to some other\n        const ngModule = isBoundToModule(componentFactory) ? undefined : this._injector.get(NgModuleRef);\n        const selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n        const compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n        const nativeElement = compRef.location.nativeElement;\n        const testability = compRef.injector.get(Testability, null);\n        const testabilityRegistry = testability && compRef.injector.get(TestabilityRegistry);\n        if (testability && testabilityRegistry) {\n            testabilityRegistry.registerApplication(nativeElement, testability);\n        }\n        compRef.onDestroy(() => {\n            this.detachView(compRef.hostView);\n            remove(this.components, compRef);\n            if (testabilityRegistry) {\n                testabilityRegistry.unregisterApplication(nativeElement);\n            }\n        });\n        this._loadComponent(compRef);\n        // Note that we have still left the `isDevMode()` condition in order to avoid\n        // creating a breaking change for projects that still use the View Engine.\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) {\n            const _console = this._injector.get(Console);\n            _console.log(`Angular is running in development mode. Call enableProdMode() to enable production mode.`);\n        }\n        return compRef;\n    }\n    /**\n     * Invoke this method to explicitly process change detection and its side-effects.\n     *\n     * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n     * further changes are detected. If additional changes are picked up during this second cycle,\n     * bindings in the app have side-effects that cannot be resolved in a single change detection\n     * pass.\n     * In this case, Angular throws an error, since an Angular application can only have one change\n     * detection pass during which all change detection must complete.\n     */\n    tick() {\n        if (this._runningTick) {\n            throw new Error('ApplicationRef.tick is called recursively');\n        }\n        try {\n            this._runningTick = true;\n            for (let view of this._views) {\n                view.detectChanges();\n            }\n            // Note that we have still left the `isDevMode()` condition in order to avoid\n            // creating a breaking change for projects that still use the View Engine.\n            if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) {\n                for (let view of this._views) {\n                    view.checkNoChanges();\n                }\n            }\n        }\n        catch (e) {\n            // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n            this._zone.runOutsideAngular(() => this._exceptionHandler.handleError(e));\n        }\n        finally {\n            this._runningTick = false;\n        }\n    }\n    /**\n     * Attaches a view so that it will be dirty checked.\n     * The view will be automatically detached when it is destroyed.\n     * This will throw if the view is already attached to a ViewContainer.\n     */\n    attachView(viewRef) {\n        const view = viewRef;\n        this._views.push(view);\n        view.attachToAppRef(this);\n    }\n    /**\n     * Detaches a view from dirty checking again.\n     */\n    detachView(viewRef) {\n        const view = viewRef;\n        remove(this._views, view);\n        view.detachFromAppRef();\n    }\n    _loadComponent(componentRef) {\n        this.attachView(componentRef.hostView);\n        this.tick();\n        this.components.push(componentRef);\n        // Get the listeners lazily to prevent DI cycles.\n        const listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);\n        listeners.forEach((listener) => listener(componentRef));\n    }\n    /** @internal */\n    ngOnDestroy() {\n        this._views.slice().forEach((view) => view.destroy());\n        this._onMicrotaskEmptySubscription.unsubscribe();\n    }\n    /**\n     * Returns the number of attached views.\n     */\n    get viewCount() {\n        return this._views.length;\n    }\n}\nApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ComponentFactoryResolver), ɵɵinject(ApplicationInitStatus)); };\nApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac });\nApplicationRef.ctorParameters = () => [\n    { type: NgZone },\n    { type: Injector },\n    { type: ErrorHandler },\n    { type: ComponentFactoryResolver },\n    { type: ApplicationInitStatus }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationRef, [{\n        type: Injectable\n    }], function () { return [{ type: NgZone }, { type: Injector }, { type: ErrorHandler }, { type: ComponentFactoryResolver }, { type: ApplicationInitStatus }]; }, null); })();\nfunction remove(list, el) {\n    const index = list.indexOf(el);\n    if (index > -1) {\n        list.splice(index, 1);\n    }\n}\nfunction _lastDefined(args) {\n    for (let i = args.length - 1; i >= 0; i--) {\n        if (args[i] !== undefined) {\n            return args[i];\n        }\n    }\n    return undefined;\n}\nfunction _mergeArrays(parts) {\n    const result = [];\n    parts.forEach((part) => part && result.push(...part));\n    return result;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Used to load ng module factories.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `NgModuleFactoryLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\nclass NgModuleFactoryLoader {\n}\nfunction getModuleFactory__PRE_R3__(id) {\n    const factory = getRegisteredNgModuleType(id);\n    if (!factory)\n        throw noModuleError(id);\n    return factory;\n}\nfunction getModuleFactory__POST_R3__(id) {\n    const type = getRegisteredNgModuleType(id);\n    if (!type)\n        throw noModuleError(id);\n    return new NgModuleFactory$1(type);\n}\n/**\n * Returns the NgModuleFactory with the given id, if it exists and has been loaded.\n * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module\n * cannot be found.\n * @publicApi\n */\nconst getModuleFactory = getModuleFactory__POST_R3__;\nfunction noModuleError(id) {\n    return new Error(`No module with ID ${id} loaded`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _SEPARATOR = '#';\nconst FACTORY_CLASS_SUFFIX = 'NgFactory';\n/**\n * Configuration for SystemJsNgModuleLoader.\n * token.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoaderConfig`\n * is part of its implementation. See `LoadChildren` for more details.\n */\nclass SystemJsNgModuleLoaderConfig {\n}\nconst DEFAULT_CONFIG = {\n    factoryPathPrefix: '',\n    factoryPathSuffix: '.ngfactory',\n};\n/**\n * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\nclass SystemJsNgModuleLoader {\n    constructor(_compiler, config) {\n        this._compiler = _compiler;\n        this._config = config || DEFAULT_CONFIG;\n    }\n    load(path) {\n        const legacyOfflineMode = !ivyEnabled && this._compiler instanceof Compiler;\n        return legacyOfflineMode ? this.loadFactory(path) : this.loadAndCompile(path);\n    }\n    loadAndCompile(path) {\n        let [module, exportName] = path.split(_SEPARATOR);\n        if (exportName === undefined) {\n            exportName = 'default';\n        }\n        return System.import(module)\n            .then((module) => module[exportName])\n            .then((type) => checkNotEmpty(type, module, exportName))\n            .then((type) => this._compiler.compileModuleAsync(type));\n    }\n    loadFactory(path) {\n        let [module, exportName] = path.split(_SEPARATOR);\n        let factoryClassSuffix = FACTORY_CLASS_SUFFIX;\n        if (exportName === undefined) {\n            exportName = 'default';\n            factoryClassSuffix = '';\n        }\n        return System.import(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix)\n            .then((module) => module[exportName + factoryClassSuffix])\n            .then((factory) => checkNotEmpty(factory, module, exportName));\n    }\n}\nSystemJsNgModuleLoader.ɵfac = function SystemJsNgModuleLoader_Factory(t) { return new (t || SystemJsNgModuleLoader)(ɵɵinject(Compiler), ɵɵinject(SystemJsNgModuleLoaderConfig, 8)); };\nSystemJsNgModuleLoader.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: SystemJsNgModuleLoader, factory: SystemJsNgModuleLoader.ɵfac });\nSystemJsNgModuleLoader.ctorParameters = () => [\n    { type: Compiler },\n    { type: SystemJsNgModuleLoaderConfig, decorators: [{ type: Optional }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(SystemJsNgModuleLoader, [{\n        type: Injectable\n    }], function () { return [{ type: Compiler }, { type: SystemJsNgModuleLoaderConfig, decorators: [{\n                type: Optional\n            }] }]; }, null); })();\nfunction checkNotEmpty(value, modulePath, exportName) {\n    if (!value) {\n        throw new Error(`Cannot find '${exportName}' in '${modulePath}'`);\n    }\n    return value;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents an Angular [view](guide/glossary#view \"Definition\").\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nclass ViewRef$1 extends ChangeDetectorRef {\n}\n/**\n * Represents an Angular [view](guide/glossary#view) in a view container.\n * An [embedded view](guide/glossary#view-tree) can be referenced from a component\n * other than the hosting component whose template defines it, or it can be defined\n * independently by a `TemplateRef`.\n *\n * Properties of elements in a view can change, but the structure (number and order) of elements in\n * a view cannot. Change the structure of elements by inserting, moving, or\n * removing nested views in a view container.\n *\n * @see `ViewContainerRef`\n *\n * @usageNotes\n *\n * The following template breaks down into two separate `TemplateRef` instances,\n * an outer one and an inner one.\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n *   <li *ngFor=\"let  item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * This is the outer `TemplateRef`:\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n *   <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * This is the inner `TemplateRef`:\n *\n * ```\n *   <li>{{item}}</li>\n * ```\n *\n * The outer and inner `TemplateRef` instances are assembled into views as follows:\n *\n * ```\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n *   <ng-template view-container-ref></ng-template>\n *   <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n *   <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @publicApi\n */\nclass EmbeddedViewRef extends ViewRef$1 {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nclass DebugEventListener {\n    constructor(name, callback) {\n        this.name = name;\n        this.callback = callback;\n    }\n}\nclass DebugNode__PRE_R3__ {\n    constructor(nativeNode, parent, _debugContext) {\n        this.listeners = [];\n        this.parent = null;\n        this._debugContext = _debugContext;\n        this.nativeNode = nativeNode;\n        if (parent && parent instanceof DebugElement__PRE_R3__) {\n            parent.addChild(this);\n        }\n    }\n    get injector() {\n        return this._debugContext.injector;\n    }\n    get componentInstance() {\n        return this._debugContext.component;\n    }\n    get context() {\n        return this._debugContext.context;\n    }\n    get references() {\n        return this._debugContext.references;\n    }\n    get providerTokens() {\n        return this._debugContext.providerTokens;\n    }\n}\nclass DebugElement__PRE_R3__ extends DebugNode__PRE_R3__ {\n    constructor(nativeNode, parent, _debugContext) {\n        super(nativeNode, parent, _debugContext);\n        this.properties = {};\n        this.attributes = {};\n        this.classes = {};\n        this.styles = {};\n        this.childNodes = [];\n        this.nativeElement = nativeNode;\n    }\n    addChild(child) {\n        if (child) {\n            this.childNodes.push(child);\n            child.parent = this;\n        }\n    }\n    removeChild(child) {\n        const childIndex = this.childNodes.indexOf(child);\n        if (childIndex !== -1) {\n            child.parent = null;\n            this.childNodes.splice(childIndex, 1);\n        }\n    }\n    insertChildrenAfter(child, newChildren) {\n        const siblingIndex = this.childNodes.indexOf(child);\n        if (siblingIndex !== -1) {\n            this.childNodes.splice(siblingIndex + 1, 0, ...newChildren);\n            newChildren.forEach(c => {\n                if (c.parent) {\n                    c.parent.removeChild(c);\n                }\n                child.parent = this;\n            });\n        }\n    }\n    insertBefore(refChild, newChild) {\n        const refIndex = this.childNodes.indexOf(refChild);\n        if (refIndex === -1) {\n            this.addChild(newChild);\n        }\n        else {\n            if (newChild.parent) {\n                newChild.parent.removeChild(newChild);\n            }\n            newChild.parent = this;\n            this.childNodes.splice(refIndex, 0, newChild);\n        }\n    }\n    query(predicate) {\n        const results = this.queryAll(predicate);\n        return results[0] || null;\n    }\n    queryAll(predicate) {\n        const matches = [];\n        _queryElementChildren(this, predicate, matches);\n        return matches;\n    }\n    queryAllNodes(predicate) {\n        const matches = [];\n        _queryNodeChildren(this, predicate, matches);\n        return matches;\n    }\n    get children() {\n        return this.childNodes //\n            .filter((node) => node instanceof DebugElement__PRE_R3__);\n    }\n    triggerEventHandler(eventName, eventObj) {\n        this.listeners.forEach((listener) => {\n            if (listener.name == eventName) {\n                listener.callback(eventObj);\n            }\n        });\n    }\n}\n/**\n * @publicApi\n */\nfunction asNativeElements(debugEls) {\n    return debugEls.map((el) => el.nativeElement);\n}\nfunction _queryElementChildren(element, predicate, matches) {\n    element.childNodes.forEach(node => {\n        if (node instanceof DebugElement__PRE_R3__) {\n            if (predicate(node)) {\n                matches.push(node);\n            }\n            _queryElementChildren(node, predicate, matches);\n        }\n    });\n}\nfunction _queryNodeChildren(parentNode, predicate, matches) {\n    if (parentNode instanceof DebugElement__PRE_R3__) {\n        parentNode.childNodes.forEach(node => {\n            if (predicate(node)) {\n                matches.push(node);\n            }\n            if (node instanceof DebugElement__PRE_R3__) {\n                _queryNodeChildren(node, predicate, matches);\n            }\n        });\n    }\n}\nclass DebugNode__POST_R3__ {\n    constructor(nativeNode) {\n        this.nativeNode = nativeNode;\n    }\n    get parent() {\n        const parent = this.nativeNode.parentNode;\n        return parent ? new DebugElement__POST_R3__(parent) : null;\n    }\n    get injector() {\n        return getInjector(this.nativeNode);\n    }\n    get componentInstance() {\n        const nativeElement = this.nativeNode;\n        return nativeElement &&\n            (getComponent(nativeElement) || getOwningComponent(nativeElement));\n    }\n    get context() {\n        return getComponent(this.nativeNode) || getContext(this.nativeNode);\n    }\n    get listeners() {\n        return getListeners(this.nativeNode).filter(listener => listener.type === 'dom');\n    }\n    get references() {\n        return getLocalRefs(this.nativeNode);\n    }\n    get providerTokens() {\n        return getInjectionTokens(this.nativeNode);\n    }\n}\nclass DebugElement__POST_R3__ extends DebugNode__POST_R3__ {\n    constructor(nativeNode) {\n        ngDevMode && assertDomNode(nativeNode);\n        super(nativeNode);\n    }\n    get nativeElement() {\n        return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;\n    }\n    get name() {\n        const context = getLContext(this.nativeNode);\n        if (context !== null) {\n            const lView = context.lView;\n            const tData = lView[TVIEW].data;\n            const tNode = tData[context.nodeIndex];\n            return tNode.value;\n        }\n        else {\n            return this.nativeNode.nodeName;\n        }\n    }\n    /**\n     *  Gets a map of property names to property values for an element.\n     *\n     *  This map includes:\n     *  - Regular property bindings (e.g. `[id]=\"id\"`)\n     *  - Host property bindings (e.g. `host: { '[id]': \"id\" }`)\n     *  - Interpolated property bindings (e.g. `id=\"{{ value }}\")\n     *\n     *  It does not include:\n     *  - input property bindings (e.g. `[myCustomInput]=\"value\"`)\n     *  - attribute bindings (e.g. `[attr.role]=\"menu\"`)\n     */\n    get properties() {\n        const context = getLContext(this.nativeNode);\n        if (context === null) {\n            return {};\n        }\n        const lView = context.lView;\n        const tData = lView[TVIEW].data;\n        const tNode = tData[context.nodeIndex];\n        const properties = {};\n        // Collect properties from the DOM.\n        copyDomProperties(this.nativeElement, properties);\n        // Collect properties from the bindings. This is needed for animation renderer which has\n        // synthetic properties which don't get reflected into the DOM.\n        collectPropertyBindings(properties, tNode, lView, tData);\n        return properties;\n    }\n    get attributes() {\n        const attributes = {};\n        const element = this.nativeElement;\n        if (!element) {\n            return attributes;\n        }\n        const context = getLContext(element);\n        if (context === null) {\n            return {};\n        }\n        const lView = context.lView;\n        const tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs;\n        const lowercaseTNodeAttrs = [];\n        // For debug nodes we take the element's attribute directly from the DOM since it allows us\n        // to account for ones that weren't set via bindings (e.g. ViewEngine keeps track of the ones\n        // that are set through `Renderer2`). The problem is that the browser will lowercase all names,\n        // however since we have the attributes already on the TNode, we can preserve the case by going\n        // through them once, adding them to the `attributes` map and putting their lower-cased name\n        // into an array. Afterwards when we're going through the native DOM attributes, we can check\n        // whether we haven't run into an attribute already through the TNode.\n        if (tNodeAttrs) {\n            let i = 0;\n            while (i < tNodeAttrs.length) {\n                const attrName = tNodeAttrs[i];\n                // Stop as soon as we hit a marker. We only care about the regular attributes. Everything\n                // else will be handled below when we read the final attributes off the DOM.\n                if (typeof attrName !== 'string')\n                    break;\n                const attrValue = tNodeAttrs[i + 1];\n                attributes[attrName] = attrValue;\n                lowercaseTNodeAttrs.push(attrName.toLowerCase());\n                i += 2;\n            }\n        }\n        const eAttrs = element.attributes;\n        for (let i = 0; i < eAttrs.length; i++) {\n            const attr = eAttrs[i];\n            const lowercaseName = attr.name.toLowerCase();\n            // Make sure that we don't assign the same attribute both in its\n            // case-sensitive form and the lower-cased one from the browser.\n            if (lowercaseTNodeAttrs.indexOf(lowercaseName) === -1) {\n                // Save the lowercase name to align the behavior between browsers.\n                // IE preserves the case, while all other browser convert it to lower case.\n                attributes[lowercaseName] = attr.value;\n            }\n        }\n        return attributes;\n    }\n    get styles() {\n        if (this.nativeElement && this.nativeElement.style) {\n            return this.nativeElement.style;\n        }\n        return {};\n    }\n    get classes() {\n        const result = {};\n        const element = this.nativeElement;\n        // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.\n        const className = element.className;\n        const classes = className && typeof className !== 'string' ? className.baseVal.split(' ') :\n            className.split(' ');\n        classes.forEach((value) => result[value] = true);\n        return result;\n    }\n    get childNodes() {\n        const childNodes = this.nativeNode.childNodes;\n        const children = [];\n        for (let i = 0; i < childNodes.length; i++) {\n            const element = childNodes[i];\n            children.push(getDebugNode__POST_R3__(element));\n        }\n        return children;\n    }\n    get children() {\n        const nativeElement = this.nativeElement;\n        if (!nativeElement)\n            return [];\n        const childNodes = nativeElement.children;\n        const children = [];\n        for (let i = 0; i < childNodes.length; i++) {\n            const element = childNodes[i];\n            children.push(getDebugNode__POST_R3__(element));\n        }\n        return children;\n    }\n    query(predicate) {\n        const results = this.queryAll(predicate);\n        return results[0] || null;\n    }\n    queryAll(predicate) {\n        const matches = [];\n        _queryAllR3(this, predicate, matches, true);\n        return matches;\n    }\n    queryAllNodes(predicate) {\n        const matches = [];\n        _queryAllR3(this, predicate, matches, false);\n        return matches;\n    }\n    triggerEventHandler(eventName, eventObj) {\n        const node = this.nativeNode;\n        const invokedListeners = [];\n        this.listeners.forEach(listener => {\n            if (listener.name === eventName) {\n                const callback = listener.callback;\n                callback.call(node, eventObj);\n                invokedListeners.push(callback);\n            }\n        });\n        // We need to check whether `eventListeners` exists, because it's something\n        // that Zone.js only adds to `EventTarget` in browser environments.\n        if (typeof node.eventListeners === 'function') {\n            // Note that in Ivy we wrap event listeners with a call to `event.preventDefault` in some\n            // cases. We use '__ngUnwrap__' as a special token that gives us access to the actual event\n            // listener.\n            node.eventListeners(eventName).forEach((listener) => {\n                // In order to ensure that we can detect the special __ngUnwrap__ token described above, we\n                // use `toString` on the listener and see if it contains the token. We use this approach to\n                // ensure that it still worked with compiled code since it cannot remove or rename string\n                // literals. We also considered using a special function name (i.e. if(listener.name ===\n                // special)) but that was more cumbersome and we were also concerned the compiled code could\n                // strip the name, turning the condition in to (\"\" === \"\") and always returning true.\n                if (listener.toString().indexOf('__ngUnwrap__') !== -1) {\n                    const unwrappedListener = listener('__ngUnwrap__');\n                    return invokedListeners.indexOf(unwrappedListener) === -1 &&\n                        unwrappedListener.call(node, eventObj);\n                }\n            });\n        }\n    }\n}\nfunction copyDomProperties(element, properties) {\n    if (element) {\n        // Skip own properties (as those are patched)\n        let obj = Object.getPrototypeOf(element);\n        const NodePrototype = Node.prototype;\n        while (obj !== null && obj !== NodePrototype) {\n            const descriptors = Object.getOwnPropertyDescriptors(obj);\n            for (let key in descriptors) {\n                if (!key.startsWith('__') && !key.startsWith('on')) {\n                    // don't include properties starting with `__` and `on`.\n                    // `__` are patched values which should not be included.\n                    // `on` are listeners which also should not be included.\n                    const value = element[key];\n                    if (isPrimitiveValue(value)) {\n                        properties[key] = value;\n                    }\n                }\n            }\n            obj = Object.getPrototypeOf(obj);\n        }\n    }\n}\nfunction isPrimitiveValue(value) {\n    return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' ||\n        value === null;\n}\nfunction _queryAllR3(parentElement, predicate, matches, elementsOnly) {\n    const context = getLContext(parentElement.nativeNode);\n    if (context !== null) {\n        const parentTNode = context.lView[TVIEW].data[context.nodeIndex];\n        _queryNodeChildrenR3(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);\n    }\n    else {\n        // If the context is null, then `parentElement` was either created with Renderer2 or native DOM\n        // APIs.\n        _queryNativeNodeDescendants(parentElement.nativeNode, predicate, matches, elementsOnly);\n    }\n}\n/**\n * Recursively match the current TNode against the predicate, and goes on with the next ones.\n *\n * @param tNode the current TNode\n * @param lView the LView of this TNode\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {\n    ngDevMode && assertTNodeForLView(tNode, lView);\n    const nativeNode = getNativeByTNodeOrNull(tNode, lView);\n    // For each type of TNode, specific logic is executed.\n    if (tNode.type & (3 /* AnyRNode */ | 8 /* ElementContainer */)) {\n        // Case 1: the TNode is an element\n        // The native node has to be checked.\n        _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n        if (isComponentHost(tNode)) {\n            // If the element is the host of a component, then all nodes in its view have to be processed.\n            // Note: the component's content (tNode.child) will be processed from the insertion points.\n            const componentView = getComponentLViewByIndex(tNode.index, lView);\n            if (componentView && componentView[TVIEW].firstChild) {\n                _queryNodeChildrenR3(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);\n            }\n        }\n        else {\n            if (tNode.child) {\n                // Otherwise, its children have to be processed.\n                _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n            }\n            // We also have to query the DOM directly in order to catch elements inserted through\n            // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple\n            // times. ViewEngine could do it more efficiently, because all the insertions go through\n            // Renderer2, however that's not the case in Ivy. This approach is being used because:\n            // 1. Matching the ViewEngine behavior would mean potentially introducing a depedency\n            //    from `Renderer2` to Ivy which could bring Ivy code into ViewEngine.\n            // 2. We would have to make `Renderer3` \"know\" about debug nodes.\n            // 3. It allows us to capture nodes that were inserted directly via the DOM.\n            nativeNode && _queryNativeNodeDescendants(nativeNode, predicate, matches, elementsOnly);\n        }\n        // In all cases, if a dynamic container exists for this node, each view inside it has to be\n        // processed.\n        const nodeOrContainer = lView[tNode.index];\n        if (isLContainer(nodeOrContainer)) {\n            _queryNodeChildrenInContainerR3(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);\n        }\n    }\n    else if (tNode.type & 4 /* Container */) {\n        // Case 2: the TNode is a container\n        // The native node has to be checked.\n        const lContainer = lView[tNode.index];\n        _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);\n        // Each view inside the container has to be processed.\n        _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n    }\n    else if (tNode.type & 16 /* Projection */) {\n        // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).\n        // The nodes projected at this location all need to be processed.\n        const componentView = lView[DECLARATION_COMPONENT_VIEW];\n        const componentHost = componentView[T_HOST];\n        const head = componentHost.projection[tNode.projection];\n        if (Array.isArray(head)) {\n            for (let nativeNode of head) {\n                _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n            }\n        }\n        else if (head) {\n            const nextLView = componentView[PARENT];\n            const nextTNode = nextLView[TVIEW].data[head.index];\n            _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);\n        }\n    }\n    else if (tNode.child) {\n        // Case 4: the TNode is a view.\n        _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n    }\n    // We don't want to go to the next sibling of the root node.\n    if (rootNativeNode !== nativeNode) {\n        // To determine the next node to be processed, we need to use the next or the projectionNext\n        // link, depending on whether the current node has been projected.\n        const nextTNode = (tNode.flags & 4 /* isProjected */) ? tNode.projectionNext : tNode.next;\n        if (nextTNode) {\n            _queryNodeChildrenR3(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);\n        }\n    }\n}\n/**\n * Process all TNodes in a given container.\n *\n * @param lContainer the container to be processed\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode) {\n    for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n        const childView = lContainer[i];\n        const firstChild = childView[TVIEW].firstChild;\n        if (firstChild) {\n            _queryNodeChildrenR3(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);\n        }\n    }\n}\n/**\n * Match the current native node against the predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {\n    if (rootNativeNode !== nativeNode) {\n        const debugNode = getDebugNode$1(nativeNode);\n        if (!debugNode) {\n            return;\n        }\n        // Type of the \"predicate and \"matches\" array are set based on the value of\n        // the \"elementsOnly\" parameter. TypeScript is not able to properly infer these\n        // types with generics, so we manually cast the parameters accordingly.\n        if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&\n            matches.indexOf(debugNode) === -1) {\n            matches.push(debugNode);\n        }\n        else if (!elementsOnly && predicate(debugNode) &&\n            matches.indexOf(debugNode) === -1) {\n            matches.push(debugNode);\n        }\n    }\n}\n/**\n * Match all the descendants of a DOM node against a predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list where matches are stored\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnly) {\n    const nodes = parentNode.childNodes;\n    const length = nodes.length;\n    for (let i = 0; i < length; i++) {\n        const node = nodes[i];\n        const debugNode = getDebugNode$1(node);\n        if (debugNode) {\n            if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&\n                matches.indexOf(debugNode) === -1) {\n                matches.push(debugNode);\n            }\n            else if (!elementsOnly && predicate(debugNode) &&\n                matches.indexOf(debugNode) === -1) {\n                matches.push(debugNode);\n            }\n            _queryNativeNodeDescendants(node, predicate, matches, elementsOnly);\n        }\n    }\n}\n/**\n * Iterates through the property bindings for a given node and generates\n * a map of property names to values. This map only contains property bindings\n * defined in templates, not in host bindings.\n */\nfunction collectPropertyBindings(properties, tNode, lView, tData) {\n    let bindingIndexes = tNode.propertyBindings;\n    if (bindingIndexes !== null) {\n        for (let i = 0; i < bindingIndexes.length; i++) {\n            const bindingIndex = bindingIndexes[i];\n            const propMetadata = tData[bindingIndex];\n            const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n            const propertyName = metadataParts[0];\n            if (metadataParts.length > 1) {\n                let value = metadataParts[1];\n                for (let j = 1; j < metadataParts.length - 1; j++) {\n                    value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n                }\n                properties[propertyName] = value;\n            }\n            else {\n                properties[propertyName] = lView[bindingIndex];\n            }\n        }\n    }\n}\n// Need to keep the nodes in a global Map so that multiple angular apps are supported.\nconst _nativeNodeToDebugNode = new Map();\nfunction getDebugNode__PRE_R3__(nativeNode) {\n    return _nativeNodeToDebugNode.get(nativeNode) || null;\n}\nconst NG_DEBUG_PROPERTY = '__ng_debug__';\nfunction getDebugNode__POST_R3__(nativeNode) {\n    if (nativeNode instanceof Node) {\n        if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {\n            nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?\n                new DebugElement__POST_R3__(nativeNode) :\n                new DebugNode__POST_R3__(nativeNode);\n        }\n        return nativeNode[NG_DEBUG_PROPERTY];\n    }\n    return null;\n}\n/**\n * @publicApi\n */\nconst getDebugNode$1 = getDebugNode__POST_R3__;\nfunction getDebugNodeR2__PRE_R3__(nativeNode) {\n    return getDebugNode__PRE_R3__(nativeNode);\n}\nfunction getDebugNodeR2__POST_R3__(_nativeNode) {\n    return null;\n}\nconst getDebugNodeR2 = getDebugNodeR2__POST_R3__;\nfunction getAllDebugNodes() {\n    return Array.from(_nativeNodeToDebugNode.values());\n}\nfunction indexDebugNode(node) {\n    _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\nfunction removeDebugNodeFromIndex(node) {\n    _nativeNodeToDebugNode.delete(node.nativeNode);\n}\n/**\n * @publicApi\n */\nconst DebugNode = DebugNode__POST_R3__;\n/**\n * @publicApi\n */\nconst DebugElement = DebugElement__POST_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _CORE_PLATFORM_PROVIDERS = [\n    // Set a default platform name for platforms that don't set it explicitly.\n    { provide: PLATFORM_ID, useValue: 'unknown' },\n    { provide: PlatformRef, deps: [Injector] },\n    { provide: TestabilityRegistry, deps: [] },\n    { provide: Console, deps: [] },\n];\n/**\n * This platform has to be included in any other platform\n *\n * @publicApi\n */\nconst platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction _iterableDiffersFactory() {\n    return defaultIterableDiffers;\n}\nfunction _keyValueDiffersFactory() {\n    return defaultKeyValueDiffers;\n}\nfunction _localeFactory(locale) {\n    locale = locale || getGlobalLocale();\n    if (ivyEnabled) {\n        setLocaleId(locale);\n    }\n    return locale;\n}\n/**\n * Work out the locale from the potential global properties.\n *\n * * Closure Compiler: use `goog.getLocale()`.\n * * Ivy enabled: use `$localize.locale`\n */\nfunction getGlobalLocale() {\n    if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&\n        typeof goog !== 'undefined' && goog.getLocale() !== 'en') {\n        // * The default `goog.getLocale()` value is `en`, while Angular used `en-US`.\n        // * In order to preserve backwards compatibility, we use Angular default value over\n        //   Closure Compiler's one.\n        return goog.getLocale();\n    }\n    else {\n        // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE\n        // COMPILE-TIME INLINER.\n        //\n        // * During compile time inlining of translations the expression will be replaced\n        //   with a string literal that is the current locale. Other forms of this expression are not\n        //   guaranteed to be replaced.\n        //\n        // * During runtime translation evaluation, the developer is required to set `$localize.locale`\n        //   if required, or just to provide their own `LOCALE_ID` provider.\n        return (ivyEnabled && typeof $localize !== 'undefined' && $localize.locale) ||\n            DEFAULT_LOCALE_ID;\n    }\n}\nconst ɵ0$f = USD_CURRENCY_CODE;\n/**\n * A built-in [dependency injection token](guide/glossary#di-token)\n * that is used to configure the root injector for bootstrapping.\n */\nconst APPLICATION_MODULE_PROVIDERS = [\n    {\n        provide: ApplicationRef,\n        useClass: ApplicationRef,\n        deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]\n    },\n    { provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory },\n    {\n        provide: ApplicationInitStatus,\n        useClass: ApplicationInitStatus,\n        deps: [[new Optional(), APP_INITIALIZER]]\n    },\n    { provide: Compiler, useClass: Compiler, deps: [] },\n    APP_ID_RANDOM_PROVIDER,\n    { provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: [] },\n    { provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: [] },\n    {\n        provide: LOCALE_ID$1,\n        useFactory: _localeFactory,\n        deps: [[new Inject(LOCALE_ID$1), new Optional(), new SkipSelf()]]\n    },\n    { provide: DEFAULT_CURRENCY_CODE, useValue: ɵ0$f },\n];\n/**\n * Schedule work at next available slot.\n *\n * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped\n * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.\n * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.\n *\n * @param ngZone NgZone to use for scheduling.\n */\nfunction zoneSchedulerFactory(ngZone) {\n    let queue = [];\n    ngZone.onStable.subscribe(() => {\n        while (queue.length) {\n            queue.pop()();\n        }\n    });\n    return function (fn) {\n        queue.push(fn);\n    };\n}\n/**\n * Configures the root injector for an app with\n * providers of `@angular/core` dependencies that `ApplicationRef` needs\n * to bootstrap components.\n *\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * @publicApi\n */\nclass ApplicationModule {\n    // Inject ApplicationRef to make it eager...\n    constructor(appRef) { }\n}\nApplicationModule.ɵfac = function ApplicationModule_Factory(t) { return new (t || ApplicationModule)(ɵɵinject(ApplicationRef)); };\nApplicationModule.ɵmod = /*@__PURE__*/ ɵɵdefineNgModule({ type: ApplicationModule });\nApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({ providers: APPLICATION_MODULE_PROVIDERS });\nApplicationModule.ctorParameters = () => [\n    { type: ApplicationRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationModule, [{\n        type: NgModule,\n        args: [{ providers: APPLICATION_MODULE_PROVIDERS }]\n    }], function () { return [{ type: ApplicationRef }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction anchorDef(flags, matchedQueriesDsl, ngContentIndex, childCount, handleEvent, templateFactory) {\n    flags |= 1 /* TypeElement */;\n    const { matchedQueries, references, matchedQueryIds } = splitMatchedQueriesDsl(matchedQueriesDsl);\n    const template = templateFactory ? resolveDefinition(templateFactory) : null;\n    return {\n        // will bet set by the view definition\n        nodeIndex: -1,\n        parent: null,\n        renderParent: null,\n        bindingIndex: -1,\n        outputIndex: -1,\n        // regular values\n        flags,\n        checkIndex: -1,\n        childFlags: 0,\n        directChildFlags: 0,\n        childMatchedQueries: 0,\n        matchedQueries,\n        matchedQueryIds,\n        references,\n        ngContentIndex,\n        childCount,\n        bindings: [],\n        bindingFlags: 0,\n        outputs: [],\n        element: {\n            ns: null,\n            name: null,\n            attrs: null,\n            template,\n            componentProvider: null,\n            componentView: null,\n            componentRendererType: null,\n            publicProviders: null,\n            allProviders: null,\n            handleEvent: handleEvent || NOOP\n        },\n        provider: null,\n        text: null,\n        query: null,\n        ngContent: null\n    };\n}\nfunction elementDef(checkIndex, flags, matchedQueriesDsl, ngContentIndex, childCount, namespaceAndName, fixedAttrs = [], bindings, outputs, handleEvent, componentView, componentRendererType) {\n    if (!handleEvent) {\n        handleEvent = NOOP;\n    }\n    const { matchedQueries, references, matchedQueryIds } = splitMatchedQueriesDsl(matchedQueriesDsl);\n    let ns = null;\n    let name = null;\n    if (namespaceAndName) {\n        [ns, name] = splitNamespace(namespaceAndName);\n    }\n    bindings = bindings || [];\n    const bindingDefs = [];\n    for (let i = 0; i < bindings.length; i++) {\n        const [bindingFlags, namespaceAndName, suffixOrSecurityContext] = bindings[i];\n        const [ns, name] = splitNamespace(namespaceAndName);\n        let securityContext = undefined;\n        let suffix = undefined;\n        switch (bindingFlags & 15 /* Types */) {\n            case 4 /* TypeElementStyle */:\n                suffix = suffixOrSecurityContext;\n                break;\n            case 1 /* TypeElementAttribute */:\n            case 8 /* TypeProperty */:\n                securityContext = suffixOrSecurityContext;\n                break;\n        }\n        bindingDefs[i] =\n            { flags: bindingFlags, ns, name, nonMinifiedName: name, securityContext, suffix };\n    }\n    outputs = outputs || [];\n    const outputDefs = [];\n    for (let i = 0; i < outputs.length; i++) {\n        const [target, eventName] = outputs[i];\n        outputDefs[i] =\n            { type: 0 /* ElementOutput */, target: target, eventName, propName: null };\n    }\n    fixedAttrs = fixedAttrs || [];\n    const attrs = fixedAttrs.map(([namespaceAndName, value]) => {\n        const [ns, name] = splitNamespace(namespaceAndName);\n        return [ns, name, value];\n    });\n    componentRendererType = resolveRendererType2(componentRendererType);\n    if (componentView) {\n        flags |= 33554432 /* ComponentView */;\n    }\n    flags |= 1 /* TypeElement */;\n    return {\n        // will bet set by the view definition\n        nodeIndex: -1,\n        parent: null,\n        renderParent: null,\n        bindingIndex: -1,\n        outputIndex: -1,\n        // regular values\n        checkIndex,\n        flags,\n        childFlags: 0,\n        directChildFlags: 0,\n        childMatchedQueries: 0,\n        matchedQueries,\n        matchedQueryIds,\n        references,\n        ngContentIndex,\n        childCount,\n        bindings: bindingDefs,\n        bindingFlags: calcBindingFlags(bindingDefs),\n        outputs: outputDefs,\n        element: {\n            ns,\n            name,\n            attrs,\n            template: null,\n            // will bet set by the view definition\n            componentProvider: null,\n            componentView: componentView || null,\n            componentRendererType: componentRendererType,\n            publicProviders: null,\n            allProviders: null,\n            handleEvent: handleEvent || NOOP,\n        },\n        provider: null,\n        text: null,\n        query: null,\n        ngContent: null\n    };\n}\nfunction createElement(view, renderHost, def) {\n    const elDef = def.element;\n    const rootSelectorOrNode = view.root.selectorOrNode;\n    const renderer = view.renderer;\n    let el;\n    if (view.parent || !rootSelectorOrNode) {\n        if (elDef.name) {\n            el = renderer.createElement(elDef.name, elDef.ns);\n        }\n        else {\n            el = renderer.createComment('');\n        }\n        const parentEl = getParentRenderElement(view, renderHost, def);\n        if (parentEl) {\n            renderer.appendChild(parentEl, el);\n        }\n    }\n    else {\n        // when using native Shadow DOM, do not clear the root element contents to allow slot projection\n        const preserveContent = (!!elDef.componentRendererType &&\n            elDef.componentRendererType.encapsulation === ViewEncapsulation.ShadowDom);\n        el = renderer.selectRootElement(rootSelectorOrNode, preserveContent);\n    }\n    if (elDef.attrs) {\n        for (let i = 0; i < elDef.attrs.length; i++) {\n            const [ns, name, value] = elDef.attrs[i];\n            renderer.setAttribute(el, name, value, ns);\n        }\n    }\n    return el;\n}\nfunction listenToElementOutputs(view, compView, def, el) {\n    for (let i = 0; i < def.outputs.length; i++) {\n        const output = def.outputs[i];\n        const handleEventClosure = renderEventHandlerClosure(view, def.nodeIndex, elementEventFullName(output.target, output.eventName));\n        let listenTarget = output.target;\n        let listenerView = view;\n        if (output.target === 'component') {\n            listenTarget = null;\n            listenerView = compView;\n        }\n        const disposable = listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);\n        view.disposables[def.outputIndex + i] = disposable;\n    }\n}\nfunction renderEventHandlerClosure(view, index, eventName) {\n    return (event) => dispatchEvent(view, index, eventName, event);\n}\nfunction checkAndUpdateElementInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    const bindLen = def.bindings.length;\n    let changed = false;\n    if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0))\n        changed = true;\n    if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1))\n        changed = true;\n    if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2))\n        changed = true;\n    if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3))\n        changed = true;\n    if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4))\n        changed = true;\n    if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5))\n        changed = true;\n    if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6))\n        changed = true;\n    if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7))\n        changed = true;\n    if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8))\n        changed = true;\n    if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9))\n        changed = true;\n    return changed;\n}\nfunction checkAndUpdateElementDynamic(view, def, values) {\n    let changed = false;\n    for (let i = 0; i < values.length; i++) {\n        if (checkAndUpdateElementValue(view, def, i, values[i]))\n            changed = true;\n    }\n    return changed;\n}\nfunction checkAndUpdateElementValue(view, def, bindingIdx, value) {\n    if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {\n        return false;\n    }\n    const binding = def.bindings[bindingIdx];\n    const elData = asElementData(view, def.nodeIndex);\n    const renderNode = elData.renderElement;\n    const name = binding.name;\n    switch (binding.flags & 15 /* Types */) {\n        case 1 /* TypeElementAttribute */:\n            setElementAttribute$1(view, binding, renderNode, binding.ns, name, value);\n            break;\n        case 2 /* TypeElementClass */:\n            setElementClass(view, renderNode, name, value);\n            break;\n        case 4 /* TypeElementStyle */:\n            setElementStyle(view, binding, renderNode, name, value);\n            break;\n        case 8 /* TypeProperty */:\n            const bindView = (def.flags & 33554432 /* ComponentView */ &&\n                binding.flags & 32 /* SyntheticHostProperty */) ?\n                elData.componentView :\n                view;\n            setElementProperty(bindView, binding, renderNode, name, value);\n            break;\n    }\n    return true;\n}\nfunction setElementAttribute$1(view, binding, renderNode, ns, name, value) {\n    const securityContext = binding.securityContext;\n    let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n    renderValue = renderValue != null ? renderValue.toString() : null;\n    const renderer = view.renderer;\n    if (value != null) {\n        renderer.setAttribute(renderNode, name, renderValue, ns);\n    }\n    else {\n        renderer.removeAttribute(renderNode, name, ns);\n    }\n}\nfunction setElementClass(view, renderNode, name, value) {\n    const renderer = view.renderer;\n    if (value) {\n        renderer.addClass(renderNode, name);\n    }\n    else {\n        renderer.removeClass(renderNode, name);\n    }\n}\nfunction setElementStyle(view, binding, renderNode, name, value) {\n    let renderValue = view.root.sanitizer.sanitize(SecurityContext.STYLE, value);\n    if (renderValue != null) {\n        renderValue = renderValue.toString();\n        const unit = binding.suffix;\n        if (unit != null) {\n            renderValue = renderValue + unit;\n        }\n    }\n    else {\n        renderValue = null;\n    }\n    const renderer = view.renderer;\n    if (renderValue != null) {\n        renderer.setStyle(renderNode, name, renderValue);\n    }\n    else {\n        renderer.removeStyle(renderNode, name);\n    }\n}\nfunction setElementProperty(view, binding, renderNode, name, value) {\n    const securityContext = binding.securityContext;\n    let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n    view.renderer.setProperty(renderNode, name, renderValue);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction queryDef(flags, id, bindings) {\n    let bindingDefs = [];\n    for (let propName in bindings) {\n        const bindingType = bindings[propName];\n        bindingDefs.push({ propName, bindingType });\n    }\n    return {\n        // will bet set by the view definition\n        nodeIndex: -1,\n        parent: null,\n        renderParent: null,\n        bindingIndex: -1,\n        outputIndex: -1,\n        // regular values\n        // TODO(vicb): check\n        checkIndex: -1,\n        flags,\n        childFlags: 0,\n        directChildFlags: 0,\n        childMatchedQueries: 0,\n        ngContentIndex: -1,\n        matchedQueries: {},\n        matchedQueryIds: 0,\n        references: {},\n        childCount: 0,\n        bindings: [],\n        bindingFlags: 0,\n        outputs: [],\n        element: null,\n        provider: null,\n        text: null,\n        query: { id, filterId: filterQueryId(id), bindings: bindingDefs },\n        ngContent: null\n    };\n}\nfunction createQuery(emitDistinctChangesOnly) {\n    return new QueryList(emitDistinctChangesOnly);\n}\nfunction dirtyParentQueries(view) {\n    const queryIds = view.def.nodeMatchedQueries;\n    while (view.parent && isEmbeddedView(view)) {\n        let tplDef = view.parentNodeDef;\n        view = view.parent;\n        // content queries\n        const end = tplDef.nodeIndex + tplDef.childCount;\n        for (let i = 0; i <= end; i++) {\n            const nodeDef = view.def.nodes[i];\n            if ((nodeDef.flags & 67108864 /* TypeContentQuery */) &&\n                (nodeDef.flags & 536870912 /* DynamicQuery */) &&\n                (nodeDef.query.filterId & queryIds) === nodeDef.query.filterId) {\n                asQueryList(view, i).setDirty();\n            }\n            if ((nodeDef.flags & 1 /* TypeElement */ && i + nodeDef.childCount < tplDef.nodeIndex) ||\n                !(nodeDef.childFlags & 67108864 /* TypeContentQuery */) ||\n                !(nodeDef.childFlags & 536870912 /* DynamicQuery */)) {\n                // skip elements that don't contain the template element or no query.\n                i += nodeDef.childCount;\n            }\n        }\n    }\n    // view queries\n    if (view.def.nodeFlags & 134217728 /* TypeViewQuery */) {\n        for (let i = 0; i < view.def.nodes.length; i++) {\n            const nodeDef = view.def.nodes[i];\n            if ((nodeDef.flags & 134217728 /* TypeViewQuery */) && (nodeDef.flags & 536870912 /* DynamicQuery */)) {\n                asQueryList(view, i).setDirty();\n            }\n            // only visit the root nodes\n            i += nodeDef.childCount;\n        }\n    }\n}\nfunction checkAndUpdateQuery(view, nodeDef) {\n    const queryList = asQueryList(view, nodeDef.nodeIndex);\n    if (!queryList.dirty) {\n        return;\n    }\n    let directiveInstance;\n    let newValues = undefined;\n    if (nodeDef.flags & 67108864 /* TypeContentQuery */) {\n        const elementDef = nodeDef.parent.parent;\n        newValues = calcQueryValues(view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, nodeDef.query, []);\n        directiveInstance = asProviderData(view, nodeDef.parent.nodeIndex).instance;\n    }\n    else if (nodeDef.flags & 134217728 /* TypeViewQuery */) {\n        newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query, []);\n        directiveInstance = view.component;\n    }\n    queryList.reset(newValues, unwrapElementRef);\n    const bindings = nodeDef.query.bindings;\n    let notify = false;\n    for (let i = 0; i < bindings.length; i++) {\n        const binding = bindings[i];\n        let boundValue;\n        switch (binding.bindingType) {\n            case 0 /* First */:\n                boundValue = queryList.first;\n                break;\n            case 1 /* All */:\n                boundValue = queryList;\n                notify = true;\n                break;\n        }\n        directiveInstance[binding.propName] = boundValue;\n    }\n    if (notify) {\n        queryList.notifyOnChanges();\n    }\n}\nfunction calcQueryValues(view, startIndex, endIndex, queryDef, values) {\n    for (let i = startIndex; i <= endIndex; i++) {\n        const nodeDef = view.def.nodes[i];\n        const valueType = nodeDef.matchedQueries[queryDef.id];\n        if (valueType != null) {\n            values.push(getQueryValue(view, nodeDef, valueType));\n        }\n        if (nodeDef.flags & 1 /* TypeElement */ && nodeDef.element.template &&\n            (nodeDef.element.template.nodeMatchedQueries & queryDef.filterId) ===\n                queryDef.filterId) {\n            const elementData = asElementData(view, i);\n            // check embedded views that were attached at the place of their template,\n            // but process child nodes first if some match the query (see issue #16568)\n            if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) {\n                calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values);\n                i += nodeDef.childCount;\n            }\n            if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n                const embeddedViews = elementData.viewContainer._embeddedViews;\n                for (let k = 0; k < embeddedViews.length; k++) {\n                    const embeddedView = embeddedViews[k];\n                    const dvc = declaredViewContainer(embeddedView);\n                    if (dvc && dvc === elementData) {\n                        calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);\n                    }\n                }\n            }\n            const projectedViews = elementData.template._projectedViews;\n            if (projectedViews) {\n                for (let k = 0; k < projectedViews.length; k++) {\n                    const projectedView = projectedViews[k];\n                    calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values);\n                }\n            }\n        }\n        if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) {\n            // if no child matches the query, skip the children.\n            i += nodeDef.childCount;\n        }\n    }\n    return values;\n}\nfunction getQueryValue(view, nodeDef, queryValueType) {\n    if (queryValueType != null) {\n        // a match\n        switch (queryValueType) {\n            case 1 /* RenderElement */:\n                return asElementData(view, nodeDef.nodeIndex).renderElement;\n            case 0 /* ElementRef */:\n                return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement);\n            case 2 /* TemplateRef */:\n                return asElementData(view, nodeDef.nodeIndex).template;\n            case 3 /* ViewContainerRef */:\n                return asElementData(view, nodeDef.nodeIndex).viewContainer;\n            case 4 /* Provider */:\n                return asProviderData(view, nodeDef.nodeIndex).instance;\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction ngContentDef(ngContentIndex, index) {\n    return {\n        // will bet set by the view definition\n        nodeIndex: -1,\n        parent: null,\n        renderParent: null,\n        bindingIndex: -1,\n        outputIndex: -1,\n        // regular values\n        checkIndex: -1,\n        flags: 8 /* TypeNgContent */,\n        childFlags: 0,\n        directChildFlags: 0,\n        childMatchedQueries: 0,\n        matchedQueries: {},\n        matchedQueryIds: 0,\n        references: {},\n        ngContentIndex,\n        childCount: 0,\n        bindings: [],\n        bindingFlags: 0,\n        outputs: [],\n        element: null,\n        provider: null,\n        text: null,\n        query: null,\n        ngContent: { index }\n    };\n}\nfunction appendNgContent(view, renderHost, def) {\n    const parentEl = getParentRenderElement(view, renderHost, def);\n    if (!parentEl) {\n        // Nothing to do if there is no parent element.\n        return;\n    }\n    const ngContentIndex = def.ngContent.index;\n    visitProjectedRenderNodes(view, ngContentIndex, 1 /* AppendChild */, parentEl, null, undefined);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction purePipeDef(checkIndex, argCount) {\n    // argCount + 1 to include the pipe as first arg\n    return _pureExpressionDef(128 /* TypePurePipe */, checkIndex, newArray(argCount + 1));\n}\nfunction pureArrayDef(checkIndex, argCount) {\n    return _pureExpressionDef(32 /* TypePureArray */, checkIndex, newArray(argCount));\n}\nfunction pureObjectDef(checkIndex, propToIndex) {\n    const keys = Object.keys(propToIndex);\n    const nbKeys = keys.length;\n    const propertyNames = [];\n    for (let i = 0; i < nbKeys; i++) {\n        const key = keys[i];\n        const index = propToIndex[key];\n        propertyNames.push(key);\n    }\n    return _pureExpressionDef(64 /* TypePureObject */, checkIndex, propertyNames);\n}\nfunction _pureExpressionDef(flags, checkIndex, propertyNames) {\n    const bindings = [];\n    for (let i = 0; i < propertyNames.length; i++) {\n        const prop = propertyNames[i];\n        bindings.push({\n            flags: 8 /* TypeProperty */,\n            name: prop,\n            ns: null,\n            nonMinifiedName: prop,\n            securityContext: null,\n            suffix: null\n        });\n    }\n    return {\n        // will bet set by the view definition\n        nodeIndex: -1,\n        parent: null,\n        renderParent: null,\n        bindingIndex: -1,\n        outputIndex: -1,\n        // regular values\n        checkIndex,\n        flags,\n        childFlags: 0,\n        directChildFlags: 0,\n        childMatchedQueries: 0,\n        matchedQueries: {},\n        matchedQueryIds: 0,\n        references: {},\n        ngContentIndex: -1,\n        childCount: 0,\n        bindings,\n        bindingFlags: calcBindingFlags(bindings),\n        outputs: [],\n        element: null,\n        provider: null,\n        text: null,\n        query: null,\n        ngContent: null\n    };\n}\nfunction createPureExpression(view, def) {\n    return { value: undefined };\n}\nfunction checkAndUpdatePureExpressionInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    const bindings = def.bindings;\n    let changed = false;\n    const bindLen = bindings.length;\n    if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))\n        changed = true;\n    if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))\n        changed = true;\n    if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))\n        changed = true;\n    if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))\n        changed = true;\n    if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))\n        changed = true;\n    if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))\n        changed = true;\n    if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))\n        changed = true;\n    if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))\n        changed = true;\n    if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))\n        changed = true;\n    if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))\n        changed = true;\n    if (changed) {\n        const data = asPureExpressionData(view, def.nodeIndex);\n        let value;\n        switch (def.flags & 201347067 /* Types */) {\n            case 32 /* TypePureArray */:\n                value = [];\n                if (bindLen > 0)\n                    value.push(v0);\n                if (bindLen > 1)\n                    value.push(v1);\n                if (bindLen > 2)\n                    value.push(v2);\n                if (bindLen > 3)\n                    value.push(v3);\n                if (bindLen > 4)\n                    value.push(v4);\n                if (bindLen > 5)\n                    value.push(v5);\n                if (bindLen > 6)\n                    value.push(v6);\n                if (bindLen > 7)\n                    value.push(v7);\n                if (bindLen > 8)\n                    value.push(v8);\n                if (bindLen > 9)\n                    value.push(v9);\n                break;\n            case 64 /* TypePureObject */:\n                value = {};\n                if (bindLen > 0)\n                    value[bindings[0].name] = v0;\n                if (bindLen > 1)\n                    value[bindings[1].name] = v1;\n                if (bindLen > 2)\n                    value[bindings[2].name] = v2;\n                if (bindLen > 3)\n                    value[bindings[3].name] = v3;\n                if (bindLen > 4)\n                    value[bindings[4].name] = v4;\n                if (bindLen > 5)\n                    value[bindings[5].name] = v5;\n                if (bindLen > 6)\n                    value[bindings[6].name] = v6;\n                if (bindLen > 7)\n                    value[bindings[7].name] = v7;\n                if (bindLen > 8)\n                    value[bindings[8].name] = v8;\n                if (bindLen > 9)\n                    value[bindings[9].name] = v9;\n                break;\n            case 128 /* TypePurePipe */:\n                const pipe = v0;\n                switch (bindLen) {\n                    case 1:\n                        value = pipe.transform(v0);\n                        break;\n                    case 2:\n                        value = pipe.transform(v1);\n                        break;\n                    case 3:\n                        value = pipe.transform(v1, v2);\n                        break;\n                    case 4:\n                        value = pipe.transform(v1, v2, v3);\n                        break;\n                    case 5:\n                        value = pipe.transform(v1, v2, v3, v4);\n                        break;\n                    case 6:\n                        value = pipe.transform(v1, v2, v3, v4, v5);\n                        break;\n                    case 7:\n                        value = pipe.transform(v1, v2, v3, v4, v5, v6);\n                        break;\n                    case 8:\n                        value = pipe.transform(v1, v2, v3, v4, v5, v6, v7);\n                        break;\n                    case 9:\n                        value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8);\n                        break;\n                    case 10:\n                        value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9);\n                        break;\n                }\n                break;\n        }\n        data.value = value;\n    }\n    return changed;\n}\nfunction checkAndUpdatePureExpressionDynamic(view, def, values) {\n    const bindings = def.bindings;\n    let changed = false;\n    for (let i = 0; i < values.length; i++) {\n        // Note: We need to loop over all values, so that\n        // the old values are updates as well!\n        if (checkAndUpdateBinding(view, def, i, values[i])) {\n            changed = true;\n        }\n    }\n    if (changed) {\n        const data = asPureExpressionData(view, def.nodeIndex);\n        let value;\n        switch (def.flags & 201347067 /* Types */) {\n            case 32 /* TypePureArray */:\n                value = values;\n                break;\n            case 64 /* TypePureObject */:\n                value = {};\n                for (let i = 0; i < values.length; i++) {\n                    value[bindings[i].name] = values[i];\n                }\n                break;\n            case 128 /* TypePurePipe */:\n                const pipe = values[0];\n                const params = values.slice(1);\n                value = pipe.transform(...params);\n                break;\n        }\n        data.value = value;\n    }\n    return changed;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction textDef(checkIndex, ngContentIndex, staticText) {\n    const bindings = [];\n    for (let i = 1; i < staticText.length; i++) {\n        bindings[i - 1] = {\n            flags: 8 /* TypeProperty */,\n            name: null,\n            ns: null,\n            nonMinifiedName: null,\n            securityContext: null,\n            suffix: staticText[i],\n        };\n    }\n    return {\n        // will bet set by the view definition\n        nodeIndex: -1,\n        parent: null,\n        renderParent: null,\n        bindingIndex: -1,\n        outputIndex: -1,\n        // regular values\n        checkIndex,\n        flags: 2 /* TypeText */,\n        childFlags: 0,\n        directChildFlags: 0,\n        childMatchedQueries: 0,\n        matchedQueries: {},\n        matchedQueryIds: 0,\n        references: {},\n        ngContentIndex,\n        childCount: 0,\n        bindings,\n        bindingFlags: 8 /* TypeProperty */,\n        outputs: [],\n        element: null,\n        provider: null,\n        text: { prefix: staticText[0] },\n        query: null,\n        ngContent: null,\n    };\n}\nfunction createText(view, renderHost, def) {\n    let renderNode;\n    const renderer = view.renderer;\n    renderNode = renderer.createText(def.text.prefix);\n    const parentEl = getParentRenderElement(view, renderHost, def);\n    if (parentEl) {\n        renderer.appendChild(parentEl, renderNode);\n    }\n    return { renderText: renderNode };\n}\nfunction checkAndUpdateTextInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    let changed = false;\n    const bindings = def.bindings;\n    const bindLen = bindings.length;\n    if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))\n        changed = true;\n    if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))\n        changed = true;\n    if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))\n        changed = true;\n    if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))\n        changed = true;\n    if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))\n        changed = true;\n    if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))\n        changed = true;\n    if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))\n        changed = true;\n    if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))\n        changed = true;\n    if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))\n        changed = true;\n    if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))\n        changed = true;\n    if (changed) {\n        let value = def.text.prefix;\n        if (bindLen > 0)\n            value += _addInterpolationPart(v0, bindings[0]);\n        if (bindLen > 1)\n            value += _addInterpolationPart(v1, bindings[1]);\n        if (bindLen > 2)\n            value += _addInterpolationPart(v2, bindings[2]);\n        if (bindLen > 3)\n            value += _addInterpolationPart(v3, bindings[3]);\n        if (bindLen > 4)\n            value += _addInterpolationPart(v4, bindings[4]);\n        if (bindLen > 5)\n            value += _addInterpolationPart(v5, bindings[5]);\n        if (bindLen > 6)\n            value += _addInterpolationPart(v6, bindings[6]);\n        if (bindLen > 7)\n            value += _addInterpolationPart(v7, bindings[7]);\n        if (bindLen > 8)\n            value += _addInterpolationPart(v8, bindings[8]);\n        if (bindLen > 9)\n            value += _addInterpolationPart(v9, bindings[9]);\n        const renderNode = asTextData(view, def.nodeIndex).renderText;\n        view.renderer.setValue(renderNode, value);\n    }\n    return changed;\n}\nfunction checkAndUpdateTextDynamic(view, def, values) {\n    const bindings = def.bindings;\n    let changed = false;\n    for (let i = 0; i < values.length; i++) {\n        // Note: We need to loop over all values, so that\n        // the old values are updates as well!\n        if (checkAndUpdateBinding(view, def, i, values[i])) {\n            changed = true;\n        }\n    }\n    if (changed) {\n        let value = '';\n        for (let i = 0; i < values.length; i++) {\n            value = value + _addInterpolationPart(values[i], bindings[i]);\n        }\n        value = def.text.prefix + value;\n        const renderNode = asTextData(view, def.nodeIndex).renderText;\n        view.renderer.setValue(renderNode, value);\n    }\n    return changed;\n}\nfunction _addInterpolationPart(value, binding) {\n    const valueStr = value != null ? value.toString() : '';\n    return valueStr + binding.suffix;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction viewDef(flags, nodes, updateDirectives, updateRenderer) {\n    // clone nodes and set auto calculated values\n    let viewBindingCount = 0;\n    let viewDisposableCount = 0;\n    let viewNodeFlags = 0;\n    let viewRootNodeFlags = 0;\n    let viewMatchedQueries = 0;\n    let currentParent = null;\n    let currentRenderParent = null;\n    let currentElementHasPublicProviders = false;\n    let currentElementHasPrivateProviders = false;\n    let lastRenderRootNode = null;\n    for (let i = 0; i < nodes.length; i++) {\n        const node = nodes[i];\n        node.nodeIndex = i;\n        node.parent = currentParent;\n        node.bindingIndex = viewBindingCount;\n        node.outputIndex = viewDisposableCount;\n        node.renderParent = currentRenderParent;\n        viewNodeFlags |= node.flags;\n        viewMatchedQueries |= node.matchedQueryIds;\n        if (node.element) {\n            const elDef = node.element;\n            elDef.publicProviders =\n                currentParent ? currentParent.element.publicProviders : Object.create(null);\n            elDef.allProviders = elDef.publicProviders;\n            // Note: We assume that all providers of an element are before any child element!\n            currentElementHasPublicProviders = false;\n            currentElementHasPrivateProviders = false;\n            if (node.element.template) {\n                viewMatchedQueries |= node.element.template.nodeMatchedQueries;\n            }\n        }\n        validateNode(currentParent, node, nodes.length);\n        viewBindingCount += node.bindings.length;\n        viewDisposableCount += node.outputs.length;\n        if (!currentRenderParent && (node.flags & 3 /* CatRenderNode */)) {\n            lastRenderRootNode = node;\n        }\n        if (node.flags & 20224 /* CatProvider */) {\n            if (!currentElementHasPublicProviders) {\n                currentElementHasPublicProviders = true;\n                // Use prototypical inheritance to not get O(n^2) complexity...\n                currentParent.element.publicProviders =\n                    Object.create(currentParent.element.publicProviders);\n                currentParent.element.allProviders = currentParent.element.publicProviders;\n            }\n            const isPrivateService = (node.flags & 8192 /* PrivateProvider */) !== 0;\n            const isComponent = (node.flags & 32768 /* Component */) !== 0;\n            if (!isPrivateService || isComponent) {\n                currentParent.element.publicProviders[tokenKey(node.provider.token)] = node;\n            }\n            else {\n                if (!currentElementHasPrivateProviders) {\n                    currentElementHasPrivateProviders = true;\n                    // Use prototypical inheritance to not get O(n^2) complexity...\n                    currentParent.element.allProviders =\n                        Object.create(currentParent.element.publicProviders);\n                }\n                currentParent.element.allProviders[tokenKey(node.provider.token)] = node;\n            }\n            if (isComponent) {\n                currentParent.element.componentProvider = node;\n            }\n        }\n        if (currentParent) {\n            currentParent.childFlags |= node.flags;\n            currentParent.directChildFlags |= node.flags;\n            currentParent.childMatchedQueries |= node.matchedQueryIds;\n            if (node.element && node.element.template) {\n                currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;\n            }\n        }\n        else {\n            viewRootNodeFlags |= node.flags;\n        }\n        if (node.childCount > 0) {\n            currentParent = node;\n            if (!isNgContainer(node)) {\n                currentRenderParent = node;\n            }\n        }\n        else {\n            // When the current node has no children, check if it is the last children of its parent.\n            // When it is, propagate the flags up.\n            // The loop is required because an element could be the last transitive children of several\n            // elements. We loop to either the root or the highest opened element (= with remaining\n            // children)\n            while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) {\n                const newParent = currentParent.parent;\n                if (newParent) {\n                    newParent.childFlags |= currentParent.childFlags;\n                    newParent.childMatchedQueries |= currentParent.childMatchedQueries;\n                }\n                currentParent = newParent;\n                // We also need to update the render parent & account for ng-container\n                if (currentParent && isNgContainer(currentParent)) {\n                    currentRenderParent = currentParent.renderParent;\n                }\n                else {\n                    currentRenderParent = currentParent;\n                }\n            }\n        }\n    }\n    const handleEvent = (view, nodeIndex, eventName, event) => nodes[nodeIndex].element.handleEvent(view, eventName, event);\n    return {\n        // Will be filled later...\n        factory: null,\n        nodeFlags: viewNodeFlags,\n        rootNodeFlags: viewRootNodeFlags,\n        nodeMatchedQueries: viewMatchedQueries,\n        flags,\n        nodes: nodes,\n        updateDirectives: updateDirectives || NOOP,\n        updateRenderer: updateRenderer || NOOP,\n        handleEvent,\n        bindingCount: viewBindingCount,\n        outputCount: viewDisposableCount,\n        lastRenderRootNode\n    };\n}\nfunction isNgContainer(node) {\n    return (node.flags & 1 /* TypeElement */) !== 0 && node.element.name === null;\n}\nfunction validateNode(parent, node, nodeCount) {\n    const template = node.element && node.element.template;\n    if (template) {\n        if (!template.lastRenderRootNode) {\n            throw new Error(`Illegal State: Embedded templates without nodes are not allowed!`);\n        }\n        if (template.lastRenderRootNode &&\n            template.lastRenderRootNode.flags & 16777216 /* EmbeddedViews */) {\n            throw new Error(`Illegal State: Last root node of a template can't have embedded views, at index ${node.nodeIndex}!`);\n        }\n    }\n    if (node.flags & 20224 /* CatProvider */) {\n        const parentFlags = parent ? parent.flags : 0;\n        if ((parentFlags & 1 /* TypeElement */) === 0) {\n            throw new Error(`Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index ${node.nodeIndex}!`);\n        }\n    }\n    if (node.query) {\n        if (node.flags & 67108864 /* TypeContentQuery */ &&\n            (!parent || (parent.flags & 16384 /* TypeDirective */) === 0)) {\n            throw new Error(`Illegal State: Content Query nodes need to be children of directives, at index ${node.nodeIndex}!`);\n        }\n        if (node.flags & 134217728 /* TypeViewQuery */ && parent) {\n            throw new Error(`Illegal State: View Query nodes have to be top level nodes, at index ${node.nodeIndex}!`);\n        }\n    }\n    if (node.childCount) {\n        const parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1;\n        if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) {\n            throw new Error(`Illegal State: childCount of node leads outside of parent, at index ${node.nodeIndex}!`);\n        }\n    }\n}\nfunction createEmbeddedView(parent, anchorDef, viewDef, context) {\n    // embedded views are seen as siblings to the anchor, so we need\n    // to get the parent of the anchor and use it as parentIndex.\n    const view = createView(parent.root, parent.renderer, parent, anchorDef, viewDef);\n    initView(view, parent.component, context);\n    createViewNodes(view);\n    return view;\n}\nfunction createRootView(root, def, context) {\n    const view = createView(root, root.renderer, null, null, def);\n    initView(view, context, context);\n    createViewNodes(view);\n    return view;\n}\nfunction createComponentView(parentView, nodeDef, viewDef, hostElement) {\n    const rendererType = nodeDef.element.componentRendererType;\n    let compRenderer;\n    if (!rendererType) {\n        compRenderer = parentView.root.renderer;\n    }\n    else {\n        compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);\n    }\n    return createView(parentView.root, compRenderer, parentView, nodeDef.element.componentProvider, viewDef);\n}\nfunction createView(root, renderer, parent, parentNodeDef, def) {\n    const nodes = new Array(def.nodes.length);\n    const disposables = def.outputCount ? new Array(def.outputCount) : null;\n    const view = {\n        def,\n        parent,\n        viewContainerParent: null,\n        parentNodeDef,\n        context: null,\n        component: null,\n        nodes,\n        state: 13 /* CatInit */,\n        root,\n        renderer,\n        oldValues: new Array(def.bindingCount),\n        disposables,\n        initIndex: -1\n    };\n    return view;\n}\nfunction initView(view, component, context) {\n    view.component = component;\n    view.context = context;\n}\nfunction createViewNodes(view) {\n    let renderHost;\n    if (isComponentView(view)) {\n        const hostDef = view.parentNodeDef;\n        renderHost = asElementData(view.parent, hostDef.parent.nodeIndex).renderElement;\n    }\n    const def = view.def;\n    const nodes = view.nodes;\n    for (let i = 0; i < def.nodes.length; i++) {\n        const nodeDef = def.nodes[i];\n        Services.setCurrentNode(view, i);\n        let nodeData;\n        switch (nodeDef.flags & 201347067 /* Types */) {\n            case 1 /* TypeElement */:\n                const el = createElement(view, renderHost, nodeDef);\n                let componentView = undefined;\n                if (nodeDef.flags & 33554432 /* ComponentView */) {\n                    const compViewDef = resolveDefinition(nodeDef.element.componentView);\n                    componentView = Services.createComponentView(view, nodeDef, compViewDef, el);\n                }\n                listenToElementOutputs(view, componentView, nodeDef, el);\n                nodeData = {\n                    renderElement: el,\n                    componentView,\n                    viewContainer: null,\n                    template: nodeDef.element.template ? createTemplateData(view, nodeDef) : undefined\n                };\n                if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n                    nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);\n                }\n                break;\n            case 2 /* TypeText */:\n                nodeData = createText(view, renderHost, nodeDef);\n                break;\n            case 512 /* TypeClassProvider */:\n            case 1024 /* TypeFactoryProvider */:\n            case 2048 /* TypeUseExistingProvider */:\n            case 256 /* TypeValueProvider */: {\n                nodeData = nodes[i];\n                if (!nodeData && !(nodeDef.flags & 4096 /* LazyProvider */)) {\n                    const instance = createProviderInstance(view, nodeDef);\n                    nodeData = { instance };\n                }\n                break;\n            }\n            case 16 /* TypePipe */: {\n                const instance = createPipeInstance(view, nodeDef);\n                nodeData = { instance };\n                break;\n            }\n            case 16384 /* TypeDirective */: {\n                nodeData = nodes[i];\n                if (!nodeData) {\n                    const instance = createDirectiveInstance(view, nodeDef);\n                    nodeData = { instance };\n                }\n                if (nodeDef.flags & 32768 /* Component */) {\n                    const compView = asElementData(view, nodeDef.parent.nodeIndex).componentView;\n                    initView(compView, nodeData.instance, nodeData.instance);\n                }\n                break;\n            }\n            case 32 /* TypePureArray */:\n            case 64 /* TypePureObject */:\n            case 128 /* TypePurePipe */:\n                nodeData = createPureExpression(view, nodeDef);\n                break;\n            case 67108864 /* TypeContentQuery */:\n            case 134217728 /* TypeViewQuery */:\n                nodeData = createQuery((nodeDef.flags & -2147483648 /* EmitDistinctChangesOnly */) ===\n                    -2147483648 /* EmitDistinctChangesOnly */);\n                break;\n            case 8 /* TypeNgContent */:\n                appendNgContent(view, renderHost, nodeDef);\n                // no runtime data needed for NgContent...\n                nodeData = undefined;\n                break;\n        }\n        nodes[i] = nodeData;\n    }\n    // Create the ViewData.nodes of component views after we created everything else,\n    // so that e.g. ng-content works\n    execComponentViewsAction(view, ViewAction.CreateViewNodes);\n    // fill static content and view queries\n    execQueriesAction(view, 67108864 /* TypeContentQuery */ | 134217728 /* TypeViewQuery */, 268435456 /* StaticQuery */, 0 /* CheckAndUpdate */);\n}\nfunction checkNoChangesView(view) {\n    markProjectedViewsForCheck(view);\n    Services.updateDirectives(view, 1 /* CheckNoChanges */);\n    execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);\n    Services.updateRenderer(view, 1 /* CheckNoChanges */);\n    execComponentViewsAction(view, ViewAction.CheckNoChanges);\n    // Note: We don't check queries for changes as we didn't do this in v2.x.\n    // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message.\n    view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);\n}\nfunction checkAndUpdateView(view) {\n    if (view.state & 1 /* BeforeFirstCheck */) {\n        view.state &= ~1 /* BeforeFirstCheck */;\n        view.state |= 2 /* FirstCheck */;\n    }\n    else {\n        view.state &= ~2 /* FirstCheck */;\n    }\n    shiftInitState(view, 0 /* InitState_BeforeInit */, 256 /* InitState_CallingOnInit */);\n    markProjectedViewsForCheck(view);\n    Services.updateDirectives(view, 0 /* CheckAndUpdate */);\n    execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate);\n    execQueriesAction(view, 67108864 /* TypeContentQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);\n    let callInit = shiftInitState(view, 256 /* InitState_CallingOnInit */, 512 /* InitState_CallingAfterContentInit */);\n    callLifecycleHooksChildrenFirst(view, 2097152 /* AfterContentChecked */ | (callInit ? 1048576 /* AfterContentInit */ : 0));\n    Services.updateRenderer(view, 0 /* CheckAndUpdate */);\n    execComponentViewsAction(view, ViewAction.CheckAndUpdate);\n    execQueriesAction(view, 134217728 /* TypeViewQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);\n    callInit = shiftInitState(view, 512 /* InitState_CallingAfterContentInit */, 768 /* InitState_CallingAfterViewInit */);\n    callLifecycleHooksChildrenFirst(view, 8388608 /* AfterViewChecked */ | (callInit ? 4194304 /* AfterViewInit */ : 0));\n    if (view.def.flags & 2 /* OnPush */) {\n        view.state &= ~8 /* ChecksEnabled */;\n    }\n    view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);\n    shiftInitState(view, 768 /* InitState_CallingAfterViewInit */, 1024 /* InitState_AfterInit */);\n}\nfunction checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    if (argStyle === 0 /* Inline */) {\n        return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n    }\n    else {\n        return checkAndUpdateNodeDynamic(view, nodeDef, v0);\n    }\n}\nfunction markProjectedViewsForCheck(view) {\n    const def = view.def;\n    if (!(def.nodeFlags & 4 /* ProjectedTemplate */)) {\n        return;\n    }\n    for (let i = 0; i < def.nodes.length; i++) {\n        const nodeDef = def.nodes[i];\n        if (nodeDef.flags & 4 /* ProjectedTemplate */) {\n            const projectedViews = asElementData(view, i).template._projectedViews;\n            if (projectedViews) {\n                for (let i = 0; i < projectedViews.length; i++) {\n                    const projectedView = projectedViews[i];\n                    projectedView.state |= 32 /* CheckProjectedView */;\n                    markParentViewsForCheckProjectedViews(projectedView, view);\n                }\n            }\n        }\n        else if ((nodeDef.childFlags & 4 /* ProjectedTemplate */) === 0) {\n            // a parent with leafs\n            // no child is a component,\n            // then skip the children\n            i += nodeDef.childCount;\n        }\n    }\n}\nfunction checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    switch (nodeDef.flags & 201347067 /* Types */) {\n        case 1 /* TypeElement */:\n            return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n        case 2 /* TypeText */:\n            return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n        case 16384 /* TypeDirective */:\n            return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n        case 32 /* TypePureArray */:\n        case 64 /* TypePureObject */:\n        case 128 /* TypePurePipe */:\n            return checkAndUpdatePureExpressionInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n        default:\n            throw 'unreachable';\n    }\n}\nfunction checkAndUpdateNodeDynamic(view, nodeDef, values) {\n    switch (nodeDef.flags & 201347067 /* Types */) {\n        case 1 /* TypeElement */:\n            return checkAndUpdateElementDynamic(view, nodeDef, values);\n        case 2 /* TypeText */:\n            return checkAndUpdateTextDynamic(view, nodeDef, values);\n        case 16384 /* TypeDirective */:\n            return checkAndUpdateDirectiveDynamic(view, nodeDef, values);\n        case 32 /* TypePureArray */:\n        case 64 /* TypePureObject */:\n        case 128 /* TypePurePipe */:\n            return checkAndUpdatePureExpressionDynamic(view, nodeDef, values);\n        default:\n            throw 'unreachable';\n    }\n}\nfunction checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    if (argStyle === 0 /* Inline */) {\n        checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n    }\n    else {\n        checkNoChangesNodeDynamic(view, nodeDef, v0);\n    }\n    // Returning false is ok here as we would have thrown in case of a change.\n    return false;\n}\nfunction checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    const bindLen = nodeDef.bindings.length;\n    if (bindLen > 0)\n        checkBindingNoChanges(view, nodeDef, 0, v0);\n    if (bindLen > 1)\n        checkBindingNoChanges(view, nodeDef, 1, v1);\n    if (bindLen > 2)\n        checkBindingNoChanges(view, nodeDef, 2, v2);\n    if (bindLen > 3)\n        checkBindingNoChanges(view, nodeDef, 3, v3);\n    if (bindLen > 4)\n        checkBindingNoChanges(view, nodeDef, 4, v4);\n    if (bindLen > 5)\n        checkBindingNoChanges(view, nodeDef, 5, v5);\n    if (bindLen > 6)\n        checkBindingNoChanges(view, nodeDef, 6, v6);\n    if (bindLen > 7)\n        checkBindingNoChanges(view, nodeDef, 7, v7);\n    if (bindLen > 8)\n        checkBindingNoChanges(view, nodeDef, 8, v8);\n    if (bindLen > 9)\n        checkBindingNoChanges(view, nodeDef, 9, v9);\n}\nfunction checkNoChangesNodeDynamic(view, nodeDef, values) {\n    for (let i = 0; i < values.length; i++) {\n        checkBindingNoChanges(view, nodeDef, i, values[i]);\n    }\n}\n/**\n * Workaround https://github.com/angular/tsickle/issues/497\n * @suppress {misplacedTypeAnnotation}\n */\nfunction checkNoChangesQuery(view, nodeDef) {\n    const queryList = asQueryList(view, nodeDef.nodeIndex);\n    if (queryList.dirty) {\n        throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, nodeDef.nodeIndex), `Query ${nodeDef.query.id} not dirty`, `Query ${nodeDef.query.id} dirty`, (view.state & 1 /* BeforeFirstCheck */) !== 0);\n    }\n}\nfunction destroyView(view) {\n    if (view.state & 128 /* Destroyed */) {\n        return;\n    }\n    execEmbeddedViewsAction(view, ViewAction.Destroy);\n    execComponentViewsAction(view, ViewAction.Destroy);\n    callLifecycleHooksChildrenFirst(view, 131072 /* OnDestroy */);\n    if (view.disposables) {\n        for (let i = 0; i < view.disposables.length; i++) {\n            view.disposables[i]();\n        }\n    }\n    detachProjectedView(view);\n    if (view.renderer.destroyNode) {\n        destroyViewNodes(view);\n    }\n    if (isComponentView(view)) {\n        view.renderer.destroy();\n    }\n    view.state |= 128 /* Destroyed */;\n}\nfunction destroyViewNodes(view) {\n    const len = view.def.nodes.length;\n    for (let i = 0; i < len; i++) {\n        const def = view.def.nodes[i];\n        if (def.flags & 1 /* TypeElement */) {\n            view.renderer.destroyNode(asElementData(view, i).renderElement);\n        }\n        else if (def.flags & 2 /* TypeText */) {\n            view.renderer.destroyNode(asTextData(view, i).renderText);\n        }\n        else if (def.flags & 67108864 /* TypeContentQuery */ || def.flags & 134217728 /* TypeViewQuery */) {\n            asQueryList(view, i).destroy();\n        }\n    }\n}\nvar ViewAction;\n(function (ViewAction) {\n    ViewAction[ViewAction[\"CreateViewNodes\"] = 0] = \"CreateViewNodes\";\n    ViewAction[ViewAction[\"CheckNoChanges\"] = 1] = \"CheckNoChanges\";\n    ViewAction[ViewAction[\"CheckNoChangesProjectedViews\"] = 2] = \"CheckNoChangesProjectedViews\";\n    ViewAction[ViewAction[\"CheckAndUpdate\"] = 3] = \"CheckAndUpdate\";\n    ViewAction[ViewAction[\"CheckAndUpdateProjectedViews\"] = 4] = \"CheckAndUpdateProjectedViews\";\n    ViewAction[ViewAction[\"Destroy\"] = 5] = \"Destroy\";\n})(ViewAction || (ViewAction = {}));\nfunction execComponentViewsAction(view, action) {\n    const def = view.def;\n    if (!(def.nodeFlags & 33554432 /* ComponentView */)) {\n        return;\n    }\n    for (let i = 0; i < def.nodes.length; i++) {\n        const nodeDef = def.nodes[i];\n        if (nodeDef.flags & 33554432 /* ComponentView */) {\n            // a leaf\n            callViewAction(asElementData(view, i).componentView, action);\n        }\n        else if ((nodeDef.childFlags & 33554432 /* ComponentView */) === 0) {\n            // a parent with leafs\n            // no child is a component,\n            // then skip the children\n            i += nodeDef.childCount;\n        }\n    }\n}\nfunction execEmbeddedViewsAction(view, action) {\n    const def = view.def;\n    if (!(def.nodeFlags & 16777216 /* EmbeddedViews */)) {\n        return;\n    }\n    for (let i = 0; i < def.nodes.length; i++) {\n        const nodeDef = def.nodes[i];\n        if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n            // a leaf\n            const embeddedViews = asElementData(view, i).viewContainer._embeddedViews;\n            for (let k = 0; k < embeddedViews.length; k++) {\n                callViewAction(embeddedViews[k], action);\n            }\n        }\n        else if ((nodeDef.childFlags & 16777216 /* EmbeddedViews */) === 0) {\n            // a parent with leafs\n            // no child is a component,\n            // then skip the children\n            i += nodeDef.childCount;\n        }\n    }\n}\nfunction callViewAction(view, action) {\n    const viewState = view.state;\n    switch (action) {\n        case ViewAction.CheckNoChanges:\n            if ((viewState & 128 /* Destroyed */) === 0) {\n                if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {\n                    checkNoChangesView(view);\n                }\n                else if (viewState & 64 /* CheckProjectedViews */) {\n                    execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews);\n                }\n            }\n            break;\n        case ViewAction.CheckNoChangesProjectedViews:\n            if ((viewState & 128 /* Destroyed */) === 0) {\n                if (viewState & 32 /* CheckProjectedView */) {\n                    checkNoChangesView(view);\n                }\n                else if (viewState & 64 /* CheckProjectedViews */) {\n                    execProjectedViewsAction(view, action);\n                }\n            }\n            break;\n        case ViewAction.CheckAndUpdate:\n            if ((viewState & 128 /* Destroyed */) === 0) {\n                if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {\n                    checkAndUpdateView(view);\n                }\n                else if (viewState & 64 /* CheckProjectedViews */) {\n                    execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews);\n                }\n            }\n            break;\n        case ViewAction.CheckAndUpdateProjectedViews:\n            if ((viewState & 128 /* Destroyed */) === 0) {\n                if (viewState & 32 /* CheckProjectedView */) {\n                    checkAndUpdateView(view);\n                }\n                else if (viewState & 64 /* CheckProjectedViews */) {\n                    execProjectedViewsAction(view, action);\n                }\n            }\n            break;\n        case ViewAction.Destroy:\n            // Note: destroyView recurses over all views,\n            // so we don't need to special case projected views here.\n            destroyView(view);\n            break;\n        case ViewAction.CreateViewNodes:\n            createViewNodes(view);\n            break;\n    }\n}\nfunction execProjectedViewsAction(view, action) {\n    execEmbeddedViewsAction(view, action);\n    execComponentViewsAction(view, action);\n}\nfunction execQueriesAction(view, queryFlags, staticDynamicQueryFlag, checkType) {\n    if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {\n        return;\n    }\n    const nodeCount = view.def.nodes.length;\n    for (let i = 0; i < nodeCount; i++) {\n        const nodeDef = view.def.nodes[i];\n        if ((nodeDef.flags & queryFlags) && (nodeDef.flags & staticDynamicQueryFlag)) {\n            Services.setCurrentNode(view, nodeDef.nodeIndex);\n            switch (checkType) {\n                case 0 /* CheckAndUpdate */:\n                    checkAndUpdateQuery(view, nodeDef);\n                    break;\n                case 1 /* CheckNoChanges */:\n                    checkNoChangesQuery(view, nodeDef);\n                    break;\n            }\n        }\n        if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) {\n            // no child has a matching query\n            // then skip the children\n            i += nodeDef.childCount;\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet initialized = false;\nfunction initServicesIfNeeded() {\n    if (initialized) {\n        return;\n    }\n    initialized = true;\n    const services = isDevMode() ? createDebugServices() : createProdServices();\n    Services.setCurrentNode = services.setCurrentNode;\n    Services.createRootView = services.createRootView;\n    Services.createEmbeddedView = services.createEmbeddedView;\n    Services.createComponentView = services.createComponentView;\n    Services.createNgModuleRef = services.createNgModuleRef;\n    Services.overrideProvider = services.overrideProvider;\n    Services.overrideComponentView = services.overrideComponentView;\n    Services.clearOverrides = services.clearOverrides;\n    Services.checkAndUpdateView = services.checkAndUpdateView;\n    Services.checkNoChangesView = services.checkNoChangesView;\n    Services.destroyView = services.destroyView;\n    Services.resolveDep = resolveDep;\n    Services.createDebugContext = services.createDebugContext;\n    Services.handleEvent = services.handleEvent;\n    Services.updateDirectives = services.updateDirectives;\n    Services.updateRenderer = services.updateRenderer;\n    Services.dirtyParentQueries = dirtyParentQueries;\n}\nfunction createProdServices() {\n    return {\n        setCurrentNode: () => { },\n        createRootView: createProdRootView,\n        createEmbeddedView: createEmbeddedView,\n        createComponentView: createComponentView,\n        createNgModuleRef: createNgModuleRef,\n        overrideProvider: NOOP,\n        overrideComponentView: NOOP,\n        clearOverrides: NOOP,\n        checkAndUpdateView: checkAndUpdateView,\n        checkNoChangesView: checkNoChangesView,\n        destroyView: destroyView,\n        createDebugContext: (view, nodeIndex) => new DebugContext_(view, nodeIndex),\n        handleEvent: (view, nodeIndex, eventName, event) => view.def.handleEvent(view, nodeIndex, eventName, event),\n        updateDirectives: (view, checkType) => view.def.updateDirectives(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view),\n        updateRenderer: (view, checkType) => view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view),\n    };\n}\nfunction createDebugServices() {\n    return {\n        setCurrentNode: debugSetCurrentNode,\n        createRootView: debugCreateRootView,\n        createEmbeddedView: debugCreateEmbeddedView,\n        createComponentView: debugCreateComponentView,\n        createNgModuleRef: debugCreateNgModuleRef,\n        overrideProvider: debugOverrideProvider,\n        overrideComponentView: debugOverrideComponentView,\n        clearOverrides: debugClearOverrides,\n        checkAndUpdateView: debugCheckAndUpdateView,\n        checkNoChangesView: debugCheckNoChangesView,\n        destroyView: debugDestroyView,\n        createDebugContext: (view, nodeIndex) => new DebugContext_(view, nodeIndex),\n        handleEvent: debugHandleEvent,\n        updateDirectives: debugUpdateDirectives,\n        updateRenderer: debugUpdateRenderer,\n    };\n}\nfunction createProdRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {\n    const rendererFactory = ngModule.injector.get(RendererFactory2);\n    return createRootView(createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode), def, context);\n}\nfunction debugCreateRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {\n    const rendererFactory = ngModule.injector.get(RendererFactory2);\n    const root = createRootData(elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes, rootSelectorOrNode);\n    const defWithOverride = applyProviderOverridesToView(def);\n    return callWithDebugContext(DebugAction.create, createRootView, null, [root, defWithOverride, context]);\n}\nfunction createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode) {\n    const sanitizer = ngModule.injector.get(Sanitizer);\n    const errorHandler = ngModule.injector.get(ErrorHandler);\n    const renderer = rendererFactory.createRenderer(null, null);\n    return {\n        ngModule,\n        injector: elInjector,\n        projectableNodes,\n        selectorOrNode: rootSelectorOrNode,\n        sanitizer,\n        rendererFactory,\n        renderer,\n        errorHandler\n    };\n}\nfunction debugCreateEmbeddedView(parentView, anchorDef, viewDef, context) {\n    const defWithOverride = applyProviderOverridesToView(viewDef);\n    return callWithDebugContext(DebugAction.create, createEmbeddedView, null, [parentView, anchorDef, defWithOverride, context]);\n}\nfunction debugCreateComponentView(parentView, nodeDef, viewDef, hostElement) {\n    const overrideComponentView = viewDefOverrides.get(nodeDef.element.componentProvider.provider.token);\n    if (overrideComponentView) {\n        viewDef = overrideComponentView;\n    }\n    else {\n        viewDef = applyProviderOverridesToView(viewDef);\n    }\n    return callWithDebugContext(DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef, hostElement]);\n}\nfunction debugCreateNgModuleRef(moduleType, parentInjector, bootstrapComponents, def) {\n    const defWithOverride = applyProviderOverridesToNgModule(def);\n    return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);\n}\nconst providerOverrides = new Map();\nconst providerOverridesWithScope = new Map();\nconst viewDefOverrides = new Map();\nfunction debugOverrideProvider(override) {\n    providerOverrides.set(override.token, override);\n    let injectableDef;\n    if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) &&\n        typeof injectableDef.providedIn === 'function') {\n        providerOverridesWithScope.set(override.token, override);\n    }\n}\nfunction debugOverrideComponentView(comp, compFactory) {\n    const hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));\n    const compViewDef = resolveDefinition(hostViewDef.nodes[0].element.componentView);\n    viewDefOverrides.set(comp, compViewDef);\n}\nfunction debugClearOverrides() {\n    providerOverrides.clear();\n    providerOverridesWithScope.clear();\n    viewDefOverrides.clear();\n}\n// Notes about the algorithm:\n// 1) Locate the providers of an element and check if one of them was overwritten\n// 2) Change the providers of that element\n//\n// We only create new data structures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToView(def) {\n    if (providerOverrides.size === 0) {\n        return def;\n    }\n    const elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def);\n    if (elementIndicesWithOverwrittenProviders.length === 0) {\n        return def;\n    }\n    // clone the whole view definition,\n    // as it maintains references between the nodes that are hard to update.\n    def = def.factory(() => NOOP);\n    for (let i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {\n        applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);\n    }\n    return def;\n    function findElementIndicesWithOverwrittenProviders(def) {\n        const elIndicesWithOverwrittenProviders = [];\n        let lastElementDef = null;\n        for (let i = 0; i < def.nodes.length; i++) {\n            const nodeDef = def.nodes[i];\n            if (nodeDef.flags & 1 /* TypeElement */) {\n                lastElementDef = nodeDef;\n            }\n            if (lastElementDef && nodeDef.flags & 3840 /* CatProviderNoDirective */ &&\n                providerOverrides.has(nodeDef.provider.token)) {\n                elIndicesWithOverwrittenProviders.push(lastElementDef.nodeIndex);\n                lastElementDef = null;\n            }\n        }\n        return elIndicesWithOverwrittenProviders;\n    }\n    function applyProviderOverridesToElement(viewDef, elIndex) {\n        for (let i = elIndex + 1; i < viewDef.nodes.length; i++) {\n            const nodeDef = viewDef.nodes[i];\n            if (nodeDef.flags & 1 /* TypeElement */) {\n                // stop at the next element\n                return;\n            }\n            if (nodeDef.flags & 3840 /* CatProviderNoDirective */) {\n                const provider = nodeDef.provider;\n                const override = providerOverrides.get(provider.token);\n                if (override) {\n                    nodeDef.flags = (nodeDef.flags & ~3840 /* CatProviderNoDirective */) | override.flags;\n                    provider.deps = splitDepsDsl(override.deps);\n                    provider.value = override.value;\n                }\n            }\n        }\n    }\n}\n// Notes about the algorithm:\n// We only create new data structures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToNgModule(def) {\n    const { hasOverrides, hasDeprecatedOverrides } = calcHasOverrides(def);\n    if (!hasOverrides) {\n        return def;\n    }\n    // clone the whole view definition,\n    // as it maintains references between the nodes that are hard to update.\n    def = def.factory(() => NOOP);\n    applyProviderOverrides(def);\n    return def;\n    function calcHasOverrides(def) {\n        let hasOverrides = false;\n        let hasDeprecatedOverrides = false;\n        if (providerOverrides.size === 0) {\n            return { hasOverrides, hasDeprecatedOverrides };\n        }\n        def.providers.forEach(node => {\n            const override = providerOverrides.get(node.token);\n            if ((node.flags & 3840 /* CatProviderNoDirective */) && override) {\n                hasOverrides = true;\n                hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n            }\n        });\n        def.modules.forEach(module => {\n            providerOverridesWithScope.forEach((override, token) => {\n                if (resolveForwardRef(getInjectableDef(token).providedIn) === module) {\n                    hasOverrides = true;\n                    hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n                }\n            });\n        });\n        return { hasOverrides, hasDeprecatedOverrides };\n    }\n    function applyProviderOverrides(def) {\n        for (let i = 0; i < def.providers.length; i++) {\n            const provider = def.providers[i];\n            if (hasDeprecatedOverrides) {\n                // We had a bug where me made\n                // all providers lazy. Keep this logic behind a flag\n                // for migrating existing users.\n                provider.flags |= 4096 /* LazyProvider */;\n            }\n            const override = providerOverrides.get(provider.token);\n            if (override) {\n                provider.flags = (provider.flags & ~3840 /* CatProviderNoDirective */) | override.flags;\n                provider.deps = splitDepsDsl(override.deps);\n                provider.value = override.value;\n            }\n        }\n        if (providerOverridesWithScope.size > 0) {\n            let moduleSet = new Set(def.modules);\n            providerOverridesWithScope.forEach((override, token) => {\n                if (moduleSet.has(resolveForwardRef(getInjectableDef(token).providedIn))) {\n                    let provider = {\n                        token: token,\n                        flags: override.flags | (hasDeprecatedOverrides ? 4096 /* LazyProvider */ : 0 /* None */),\n                        deps: splitDepsDsl(override.deps),\n                        value: override.value,\n                        index: def.providers.length,\n                    };\n                    def.providers.push(provider);\n                    def.providersByKey[tokenKey(token)] = provider;\n                }\n            });\n        }\n    }\n}\nfunction prodCheckAndUpdateNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    const nodeDef = view.def.nodes[checkIndex];\n    checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n    return (nodeDef.flags & 224 /* CatPureExpression */) ?\n        asPureExpressionData(view, checkIndex).value :\n        undefined;\n}\nfunction prodCheckNoChangesNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    const nodeDef = view.def.nodes[checkIndex];\n    checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n    return (nodeDef.flags & 224 /* CatPureExpression */) ?\n        asPureExpressionData(view, checkIndex).value :\n        undefined;\n}\nfunction debugCheckAndUpdateView(view) {\n    return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);\n}\nfunction debugCheckNoChangesView(view) {\n    return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);\n}\nfunction debugDestroyView(view) {\n    return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);\n}\nvar DebugAction;\n(function (DebugAction) {\n    DebugAction[DebugAction[\"create\"] = 0] = \"create\";\n    DebugAction[DebugAction[\"detectChanges\"] = 1] = \"detectChanges\";\n    DebugAction[DebugAction[\"checkNoChanges\"] = 2] = \"checkNoChanges\";\n    DebugAction[DebugAction[\"destroy\"] = 3] = \"destroy\";\n    DebugAction[DebugAction[\"handleEvent\"] = 4] = \"handleEvent\";\n})(DebugAction || (DebugAction = {}));\nlet _currentAction;\nlet _currentView;\nlet _currentNodeIndex;\nfunction debugSetCurrentNode(view, nodeIndex) {\n    _currentView = view;\n    _currentNodeIndex = nodeIndex;\n}\nfunction debugHandleEvent(view, nodeIndex, eventName, event) {\n    debugSetCurrentNode(view, nodeIndex);\n    return callWithDebugContext(DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);\n}\nfunction debugUpdateDirectives(view, checkType) {\n    if (view.state & 128 /* Destroyed */) {\n        throw viewDestroyedError(DebugAction[_currentAction]);\n    }\n    debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));\n    return view.def.updateDirectives(debugCheckDirectivesFn, view);\n    function debugCheckDirectivesFn(view, nodeIndex, argStyle, ...values) {\n        const nodeDef = view.def.nodes[nodeIndex];\n        if (checkType === 0 /* CheckAndUpdate */) {\n            debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n        }\n        else {\n            debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n        }\n        if (nodeDef.flags & 16384 /* TypeDirective */) {\n            debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex));\n        }\n        return (nodeDef.flags & 224 /* CatPureExpression */) ?\n            asPureExpressionData(view, nodeDef.nodeIndex).value :\n            undefined;\n    }\n}\nfunction debugUpdateRenderer(view, checkType) {\n    if (view.state & 128 /* Destroyed */) {\n        throw viewDestroyedError(DebugAction[_currentAction]);\n    }\n    debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));\n    return view.def.updateRenderer(debugCheckRenderNodeFn, view);\n    function debugCheckRenderNodeFn(view, nodeIndex, argStyle, ...values) {\n        const nodeDef = view.def.nodes[nodeIndex];\n        if (checkType === 0 /* CheckAndUpdate */) {\n            debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n        }\n        else {\n            debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n        }\n        if (nodeDef.flags & 3 /* CatRenderNode */) {\n            debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex));\n        }\n        return (nodeDef.flags & 224 /* CatPureExpression */) ?\n            asPureExpressionData(view, nodeDef.nodeIndex).value :\n            undefined;\n    }\n}\nfunction debugCheckAndUpdateNode(view, nodeDef, argStyle, givenValues) {\n    const changed = checkAndUpdateNode(view, nodeDef, argStyle, ...givenValues);\n    if (changed) {\n        const values = argStyle === 1 /* Dynamic */ ? givenValues[0] : givenValues;\n        if (nodeDef.flags & 16384 /* TypeDirective */) {\n            const bindingValues = {};\n            for (let i = 0; i < nodeDef.bindings.length; i++) {\n                const binding = nodeDef.bindings[i];\n                const value = values[i];\n                if (binding.flags & 8 /* TypeProperty */) {\n                    bindingValues[normalizeDebugBindingName(binding.nonMinifiedName)] =\n                        normalizeDebugBindingValue(value);\n                }\n            }\n            const elDef = nodeDef.parent;\n            const el = asElementData(view, elDef.nodeIndex).renderElement;\n            if (!elDef.element.name) {\n                // a comment.\n                view.renderer.setValue(el, escapeCommentText(`bindings=${JSON.stringify(bindingValues, null, 2)}`));\n            }\n            else {\n                // a regular element.\n                for (let attr in bindingValues) {\n                    const value = bindingValues[attr];\n                    if (value != null) {\n                        view.renderer.setAttribute(el, attr, value);\n                    }\n                    else {\n                        view.renderer.removeAttribute(el, attr);\n                    }\n                }\n            }\n        }\n    }\n}\nfunction debugCheckNoChangesNode(view, nodeDef, argStyle, values) {\n    checkNoChangesNode(view, nodeDef, argStyle, ...values);\n}\nfunction nextDirectiveWithBinding(view, nodeIndex) {\n    for (let i = nodeIndex; i < view.def.nodes.length; i++) {\n        const nodeDef = view.def.nodes[i];\n        if (nodeDef.flags & 16384 /* TypeDirective */ && nodeDef.bindings && nodeDef.bindings.length) {\n            return i;\n        }\n    }\n    return null;\n}\nfunction nextRenderNodeWithBinding(view, nodeIndex) {\n    for (let i = nodeIndex; i < view.def.nodes.length; i++) {\n        const nodeDef = view.def.nodes[i];\n        if ((nodeDef.flags & 3 /* CatRenderNode */) && nodeDef.bindings && nodeDef.bindings.length) {\n            return i;\n        }\n    }\n    return null;\n}\nclass DebugContext_ {\n    constructor(view, nodeIndex) {\n        this.view = view;\n        this.nodeIndex = nodeIndex;\n        if (nodeIndex == null) {\n            this.nodeIndex = nodeIndex = 0;\n        }\n        this.nodeDef = view.def.nodes[nodeIndex];\n        let elDef = this.nodeDef;\n        let elView = view;\n        while (elDef && (elDef.flags & 1 /* TypeElement */) === 0) {\n            elDef = elDef.parent;\n        }\n        if (!elDef) {\n            while (!elDef && elView) {\n                elDef = viewParentEl(elView);\n                elView = elView.parent;\n            }\n        }\n        this.elDef = elDef;\n        this.elView = elView;\n    }\n    get elOrCompView() {\n        // Has to be done lazily as we use the DebugContext also during creation of elements...\n        return asElementData(this.elView, this.elDef.nodeIndex).componentView || this.view;\n    }\n    get injector() {\n        return createInjector$1(this.elView, this.elDef);\n    }\n    get component() {\n        return this.elOrCompView.component;\n    }\n    get context() {\n        return this.elOrCompView.context;\n    }\n    get providerTokens() {\n        const tokens = [];\n        if (this.elDef) {\n            for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n                const childDef = this.elView.def.nodes[i];\n                if (childDef.flags & 20224 /* CatProvider */) {\n                    tokens.push(childDef.provider.token);\n                }\n                i += childDef.childCount;\n            }\n        }\n        return tokens;\n    }\n    get references() {\n        const references = {};\n        if (this.elDef) {\n            collectReferences(this.elView, this.elDef, references);\n            for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n                const childDef = this.elView.def.nodes[i];\n                if (childDef.flags & 20224 /* CatProvider */) {\n                    collectReferences(this.elView, childDef, references);\n                }\n                i += childDef.childCount;\n            }\n        }\n        return references;\n    }\n    get componentRenderElement() {\n        const elData = findHostElement(this.elOrCompView);\n        return elData ? elData.renderElement : undefined;\n    }\n    get renderNode() {\n        return this.nodeDef.flags & 2 /* TypeText */ ? renderNode(this.view, this.nodeDef) :\n            renderNode(this.elView, this.elDef);\n    }\n    logError(console, ...values) {\n        let logViewDef;\n        let logNodeIndex;\n        if (this.nodeDef.flags & 2 /* TypeText */) {\n            logViewDef = this.view.def;\n            logNodeIndex = this.nodeDef.nodeIndex;\n        }\n        else {\n            logViewDef = this.elView.def;\n            logNodeIndex = this.elDef.nodeIndex;\n        }\n        // Note: we only generate a log function for text and element nodes\n        // to make the generated code as small as possible.\n        const renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);\n        let currRenderNodeIndex = -1;\n        let nodeLogger = () => {\n            currRenderNodeIndex++;\n            if (currRenderNodeIndex === renderNodeIndex) {\n                return console.error.bind(console, ...values);\n            }\n            else {\n                return NOOP;\n            }\n        };\n        logViewDef.factory(nodeLogger);\n        if (currRenderNodeIndex < renderNodeIndex) {\n            console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');\n            console.error(...values);\n        }\n    }\n}\nfunction getRenderNodeIndex(viewDef, nodeIndex) {\n    let renderNodeIndex = -1;\n    for (let i = 0; i <= nodeIndex; i++) {\n        const nodeDef = viewDef.nodes[i];\n        if (nodeDef.flags & 3 /* CatRenderNode */) {\n            renderNodeIndex++;\n        }\n    }\n    return renderNodeIndex;\n}\nfunction findHostElement(view) {\n    while (view && !isComponentView(view)) {\n        view = view.parent;\n    }\n    if (view.parent) {\n        return asElementData(view.parent, viewParentEl(view).nodeIndex);\n    }\n    return null;\n}\nfunction collectReferences(view, nodeDef, references) {\n    for (let refName in nodeDef.references) {\n        references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);\n    }\n}\nfunction callWithDebugContext(action, fn, self, args) {\n    const oldAction = _currentAction;\n    const oldView = _currentView;\n    const oldNodeIndex = _currentNodeIndex;\n    try {\n        _currentAction = action;\n        const result = fn.apply(self, args);\n        _currentView = oldView;\n        _currentNodeIndex = oldNodeIndex;\n        _currentAction = oldAction;\n        return result;\n    }\n    catch (e) {\n        if (isViewDebugError(e) || !_currentView) {\n            throw e;\n        }\n        throw viewWrappedDebugError(e, getCurrentDebugContext());\n    }\n}\nfunction getCurrentDebugContext() {\n    return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;\n}\nclass DebugRendererFactory2 {\n    constructor(delegate) {\n        this.delegate = delegate;\n    }\n    createRenderer(element, renderData) {\n        return new DebugRenderer2(this.delegate.createRenderer(element, renderData));\n    }\n    begin() {\n        if (this.delegate.begin) {\n            this.delegate.begin();\n        }\n    }\n    end() {\n        if (this.delegate.end) {\n            this.delegate.end();\n        }\n    }\n    whenRenderingDone() {\n        if (this.delegate.whenRenderingDone) {\n            return this.delegate.whenRenderingDone();\n        }\n        return Promise.resolve(null);\n    }\n}\nclass DebugRenderer2 {\n    constructor(delegate) {\n        this.delegate = delegate;\n        /**\n         * Factory function used to create a `DebugContext` when a node is created.\n         *\n         * The `DebugContext` allows to retrieve information about the nodes that are useful in tests.\n         *\n         * The factory is configurable so that the `DebugRenderer2` could instantiate either a View Engine\n         * or a Render context.\n         */\n        this.debugContextFactory = getCurrentDebugContext;\n        this.data = this.delegate.data;\n    }\n    createDebugContext(nativeElement) {\n        return this.debugContextFactory(nativeElement);\n    }\n    destroyNode(node) {\n        const debugNode = getDebugNode$1(node);\n        if (debugNode) {\n            removeDebugNodeFromIndex(debugNode);\n            if (debugNode instanceof DebugNode__PRE_R3__) {\n                debugNode.listeners.length = 0;\n            }\n        }\n        if (this.delegate.destroyNode) {\n            this.delegate.destroyNode(node);\n        }\n    }\n    destroy() {\n        this.delegate.destroy();\n    }\n    createElement(name, namespace) {\n        const el = this.delegate.createElement(name, namespace);\n        const debugCtx = this.createDebugContext(el);\n        if (debugCtx) {\n            const debugEl = new DebugElement__PRE_R3__(el, null, debugCtx);\n            debugEl.name = name;\n            indexDebugNode(debugEl);\n        }\n        return el;\n    }\n    createComment(value) {\n        const comment = this.delegate.createComment(escapeCommentText(value));\n        const debugCtx = this.createDebugContext(comment);\n        if (debugCtx) {\n            indexDebugNode(new DebugNode__PRE_R3__(comment, null, debugCtx));\n        }\n        return comment;\n    }\n    createText(value) {\n        const text = this.delegate.createText(value);\n        const debugCtx = this.createDebugContext(text);\n        if (debugCtx) {\n            indexDebugNode(new DebugNode__PRE_R3__(text, null, debugCtx));\n        }\n        return text;\n    }\n    appendChild(parent, newChild) {\n        const debugEl = getDebugNode$1(parent);\n        const debugChildEl = getDebugNode$1(newChild);\n        if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.addChild(debugChildEl);\n        }\n        this.delegate.appendChild(parent, newChild);\n    }\n    insertBefore(parent, newChild, refChild, isMove) {\n        const debugEl = getDebugNode$1(parent);\n        const debugChildEl = getDebugNode$1(newChild);\n        const debugRefEl = getDebugNode$1(refChild);\n        if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.insertBefore(debugRefEl, debugChildEl);\n        }\n        this.delegate.insertBefore(parent, newChild, refChild, isMove);\n    }\n    removeChild(parent, oldChild) {\n        const debugEl = getDebugNode$1(parent);\n        const debugChildEl = getDebugNode$1(oldChild);\n        if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.removeChild(debugChildEl);\n        }\n        this.delegate.removeChild(parent, oldChild);\n    }\n    selectRootElement(selectorOrNode, preserveContent) {\n        const el = this.delegate.selectRootElement(selectorOrNode, preserveContent);\n        const debugCtx = getCurrentDebugContext();\n        if (debugCtx) {\n            indexDebugNode(new DebugElement__PRE_R3__(el, null, debugCtx));\n        }\n        return el;\n    }\n    setAttribute(el, name, value, namespace) {\n        const debugEl = getDebugNode$1(el);\n        if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n            const fullName = namespace ? namespace + ':' + name : name;\n            debugEl.attributes[fullName] = value;\n        }\n        this.delegate.setAttribute(el, name, value, namespace);\n    }\n    removeAttribute(el, name, namespace) {\n        const debugEl = getDebugNode$1(el);\n        if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n            const fullName = namespace ? namespace + ':' + name : name;\n            debugEl.attributes[fullName] = null;\n        }\n        this.delegate.removeAttribute(el, name, namespace);\n    }\n    addClass(el, name) {\n        const debugEl = getDebugNode$1(el);\n        if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.classes[name] = true;\n        }\n        this.delegate.addClass(el, name);\n    }\n    removeClass(el, name) {\n        const debugEl = getDebugNode$1(el);\n        if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.classes[name] = false;\n        }\n        this.delegate.removeClass(el, name);\n    }\n    setStyle(el, style, value, flags) {\n        const debugEl = getDebugNode$1(el);\n        if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.styles[style] = value;\n        }\n        this.delegate.setStyle(el, style, value, flags);\n    }\n    removeStyle(el, style, flags) {\n        const debugEl = getDebugNode$1(el);\n        if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.styles[style] = null;\n        }\n        this.delegate.removeStyle(el, style, flags);\n    }\n    setProperty(el, name, value) {\n        const debugEl = getDebugNode$1(el);\n        if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.properties[name] = value;\n        }\n        this.delegate.setProperty(el, name, value);\n    }\n    listen(target, eventName, callback) {\n        if (typeof target !== 'string') {\n            const debugEl = getDebugNode$1(target);\n            if (debugEl) {\n                debugEl.listeners.push(new DebugEventListener(eventName, callback));\n            }\n        }\n        return this.delegate.listen(target, eventName, callback);\n    }\n    parentNode(node) {\n        return this.delegate.parentNode(node);\n    }\n    nextSibling(node) {\n        return this.delegate.nextSibling(node);\n    }\n    setValue(node, value) {\n        return this.delegate.setValue(node, value);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction overrideProvider(override) {\n    initServicesIfNeeded();\n    return Services.overrideProvider(override);\n}\nfunction overrideComponentView(comp, componentFactory) {\n    initServicesIfNeeded();\n    return Services.overrideComponentView(comp, componentFactory);\n}\nfunction clearOverrides() {\n    initServicesIfNeeded();\n    return Services.clearOverrides();\n}\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nfunction createNgModuleFactory(ngModuleType, bootstrapComponents, defFactory) {\n    return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);\n}\nfunction cloneNgModuleDefinition(def) {\n    const providers = Array.from(def.providers);\n    const modules = Array.from(def.modules);\n    const providersByKey = {};\n    for (const key in def.providersByKey) {\n        providersByKey[key] = def.providersByKey[key];\n    }\n    return {\n        factory: def.factory,\n        scope: def.scope,\n        providers,\n        modules,\n        providersByKey,\n    };\n}\nclass NgModuleFactory_ extends NgModuleFactory {\n    constructor(moduleType, _bootstrapComponents, _ngModuleDefFactory) {\n        // Attention: this ctor is called as top level function.\n        // Putting any logic in here will destroy closure tree shaking!\n        super();\n        this.moduleType = moduleType;\n        this._bootstrapComponents = _bootstrapComponents;\n        this._ngModuleDefFactory = _ngModuleDefFactory;\n    }\n    create(parentInjector) {\n        initServicesIfNeeded();\n        // Clone the NgModuleDefinition so that any tree shakeable provider definition\n        // added to this instance of the NgModuleRef doesn't affect the cached copy.\n        // See https://github.com/angular/angular/issues/25018.\n        const def = cloneNgModuleDefinition(resolveDefinition(this._ngModuleDefFactory));\n        return Services.createNgModuleRef(this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Compiles a partial directive declaration object into a full directive definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareDirective(decl) {\n    const compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'directive', type: decl.type });\n    return compiler.compileDirectiveDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);\n}\n/**\n * Evaluates the class metadata declaration.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareClassMetadata(decl) {\n    var _a, _b;\n    setClassMetadata(decl.type, decl.decorators, (_a = decl.ctorParameters) !== null && _a !== void 0 ? _a : null, (_b = decl.propDecorators) !== null && _b !== void 0 ? _b : null);\n}\n/**\n * Compiles a partial component declaration object into a full component definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareComponent(decl) {\n    const compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'component', type: decl.type });\n    return compiler.compileComponentDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl);\n}\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareFactory(decl) {\n    const compiler = getCompilerFacade({\n        usage: 1 /* PartialDeclaration */,\n        kind: getFactoryKind(decl.target),\n        type: decl.type\n    });\n    return compiler.compileFactoryDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);\n}\nfunction getFactoryKind(target) {\n    switch (target) {\n        case FactoryTarget.Directive:\n            return 'directive';\n        case FactoryTarget.Component:\n            return 'component';\n        case FactoryTarget.Injectable:\n            return 'injectable';\n        case FactoryTarget.Pipe:\n            return 'pipe';\n        case FactoryTarget.NgModule:\n            return 'NgModule';\n    }\n}\n/**\n * Compiles a partial injectable declaration object into a full injectable definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareInjectable(decl) {\n    const compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'injectable', type: decl.type });\n    return compiler.compileInjectableDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵprov.js`, decl);\n}\n/**\n * Compiles a partial injector declaration object into a full injector definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareInjector(decl) {\n    const compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'NgModule', type: decl.type });\n    return compiler.compileInjectorDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵinj.js`, decl);\n}\n/**\n * Compiles a partial NgModule declaration object into a full NgModule definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareNgModule(decl) {\n    const compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'NgModule', type: decl.type });\n    return compiler.compileNgModuleDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵmod.js`, decl);\n}\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclarePipe(decl) {\n    const compiler = getCompilerFacade({ usage: 1 /* PartialDeclaration */, kind: 'pipe', type: decl.type });\n    return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// clang-format on\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nif (typeof ngDevMode !== 'undefined' && ngDevMode) {\n    // This helper is to give a reasonable error message to people upgrading to v9 that have not yet\n    // installed `@angular/localize` in their app.\n    // tslint:disable-next-line: no-toplevel-property-access\n    _global.$localize = _global.$localize || function () {\n        throw new Error('It looks like your application or one of its dependencies is using i18n.\\n' +\n            'Angular 9 introduced a global `$localize()` function that needs to be loaded.\\n' +\n            'Please run `ng add @angular/localize` from the Angular CLI.\\n' +\n            '(For non-CLI projects, add `import \\'@angular/localize/init\\';` to your `polyfills.ts` file.\\n' +\n            'For server-side rendering applications add the import to your `main.server.ts` file.)');\n    };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ElementRef, EmbeddedViewRef, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR$1 as INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID$1 as LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory, NgModuleFactoryLoader, NgModuleRef, NgProbeToken, NgZone, Optional, Output, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation, ViewRef$1 as ViewRef, WrappedValue, asNativeElements, assertPlatform, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode$1 as getDebugNode, getModuleFactory, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ɵ0$3 as ɵ0, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, CREATE_ATTRIBUTE_DECORATOR__POST_R3__ as ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__, ChangeDetectorStatus as ɵChangeDetectorStatus, CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver, Compiler_compileModuleAndAllComponentsAsync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__, Compiler_compileModuleAndAllComponentsSync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__, Compiler_compileModuleAsync__POST_R3__ as ɵCompiler_compileModuleAsync__POST_R3__, Compiler_compileModuleSync__POST_R3__ as ɵCompiler_compileModuleSync__POST_R3__, ComponentFactory as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, EMPTY_ARRAY as ɵEMPTY_ARRAY, EMPTY_MAP as ɵEMPTY_MAP, INJECTOR_IMPL__POST_R3__ as ɵINJECTOR_IMPL__POST_R3__, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory$1 as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory$1 as ɵRender3ComponentFactory, ComponentRef$1 as ɵRender3ComponentRef, NgModuleRef$1 as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ as ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__, SWITCH_COMPILE_COMPONENT__POST_R3__ as ɵSWITCH_COMPILE_COMPONENT__POST_R3__, SWITCH_COMPILE_DIRECTIVE__POST_R3__ as ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__, SWITCH_COMPILE_INJECTABLE__POST_R3__ as ɵSWITCH_COMPILE_INJECTABLE__POST_R3__, SWITCH_COMPILE_NGMODULE__POST_R3__ as ɵSWITCH_COMPILE_NGMODULE__POST_R3__, SWITCH_COMPILE_PIPE__POST_R3__ as ɵSWITCH_COMPILE_PIPE__POST_R3__, SWITCH_ELEMENT_REF_FACTORY__POST_R3__ as ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__, SWITCH_IVY_ENABLED__POST_R3__ as ɵSWITCH_IVY_ENABLED__POST_R3__, SWITCH_RENDERER2_FACTORY__POST_R3__ as ɵSWITCH_RENDERER2_FACTORY__POST_R3__, SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ as ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__, SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ as ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, anchorDef as ɵand, isForwardRef as ɵangular_packages_core_core_a, injectInjectorOnly as ɵangular_packages_core_core_b, zoneSchedulerFactory as ɵangular_packages_core_core_ba, USD_CURRENCY_CODE as ɵangular_packages_core_core_bb, _def as ɵangular_packages_core_core_bc, DebugContext as ɵangular_packages_core_core_bd, NgOnChangesFeatureImpl as ɵangular_packages_core_core_be, SCHEDULER as ɵangular_packages_core_core_bf, injectAttributeImpl as ɵangular_packages_core_core_bg, getLView as ɵangular_packages_core_core_bh, getBindingRoot as ɵangular_packages_core_core_bi, nextContextImpl as ɵangular_packages_core_core_bj, pureFunction1Internal as ɵangular_packages_core_core_bl, pureFunction2Internal as ɵangular_packages_core_core_bm, pureFunction3Internal as ɵangular_packages_core_core_bn, pureFunction4Internal as ɵangular_packages_core_core_bo, pureFunctionVInternal as ɵangular_packages_core_core_bp, getUrlSanitizer as ɵangular_packages_core_core_bq, makePropDecorator as ɵangular_packages_core_core_br, makeParamDecorator as ɵangular_packages_core_core_bs, getClosureSafeProperty as ɵangular_packages_core_core_bv, NullInjector as ɵangular_packages_core_core_bw, getInjectImplementation as ɵangular_packages_core_core_bx, getNativeByTNode as ɵangular_packages_core_core_bz, attachInjectFlag as ɵangular_packages_core_core_c, getRootContext as ɵangular_packages_core_core_cb, i18nPostprocess as ɵangular_packages_core_core_cc, ReflectiveInjector_ as ɵangular_packages_core_core_d, ReflectiveDependency as ɵangular_packages_core_core_e, resolveReflectiveProviders as ɵangular_packages_core_core_f, _appIdRandomProviderFactory as ɵangular_packages_core_core_g, injectRenderer2 as ɵangular_packages_core_core_h, injectElementRef as ɵangular_packages_core_core_i, createElementRef as ɵangular_packages_core_core_j, getModuleFactory__PRE_R3__ as ɵangular_packages_core_core_k, injectTemplateRef as ɵangular_packages_core_core_l, createTemplateRef as ɵangular_packages_core_core_m, injectViewContainerRef as ɵangular_packages_core_core_n, DebugNode__PRE_R3__ as ɵangular_packages_core_core_o, DebugElement__PRE_R3__ as ɵangular_packages_core_core_p, getDebugNodeR2__PRE_R3__ as ɵangular_packages_core_core_q, injectChangeDetectorRef as ɵangular_packages_core_core_r, DefaultIterableDifferFactory as ɵangular_packages_core_core_s, DefaultKeyValueDifferFactory as ɵangular_packages_core_core_t, defaultIterableDiffersFactory as ɵangular_packages_core_core_u, defaultKeyValueDiffersFactory as ɵangular_packages_core_core_v, _iterableDiffersFactory as ɵangular_packages_core_core_w, _keyValueDiffersFactory as ɵangular_packages_core_core_x, _localeFactory as ɵangular_packages_core_core_y, APPLICATION_MODULE_PROVIDERS as ɵangular_packages_core_core_z, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, createComponentFactory as ɵccf, clearOverrides as ɵclearOverrides, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, createNgModuleFactory as ɵcmf, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory__POST_R3__ as ɵcompileNgModuleFactory__POST_R3__, compilePipe as ɵcompilePipe, createInjector as ɵcreateInjector, createRendererType2 as ɵcrt, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, directiveDef as ɵdid, elementDef as ɵeld, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, getComponentViewDefinitionFactory as ɵgetComponentViewDefinitionFactory, getDebugNodeR2 as ɵgetDebugNodeR2, getDebugNode__POST_R3__ as ɵgetDebugNode__POST_R3__, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getModuleFactory__POST_R3__ as ɵgetModuleFactory__POST_R3__, getSanitizationBypassType as ɵgetSanitizationBypassType, _global as ɵglobal, initServicesIfNeeded as ɵinitServicesIfNeeded, inlineInterpolate as ɵinlineInterpolate, interpolate as ɵinterpolate, isBoundToModule__POST_R3__ as ɵisBoundToModule__POST_R3__, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, isListLikeIterable as ɵisListLikeIterable, isObservable as ɵisObservable, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, ivyEnabled as ɵivyEnabled, makeDecorator as ɵmakeDecorator, markDirty as ɵmarkDirty, moduleDef as ɵmod, moduleProvideDef as ɵmpd, ngContentDef as ɵncd, noSideEffects as ɵnoSideEffects, nodeValue as ɵnov, overrideComponentView as ɵoverrideComponentView, overrideProvider as ɵoverrideProvider, pureArrayDef as ɵpad, patchComponentDefWithScope as ɵpatchComponentDefWithScope, pipeDef as ɵpid, pureObjectDef as ɵpod, purePipeDef as ɵppd, providerDef as ɵprd, publishDefaultGlobalUtils as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, queryDef as ɵqud, registerLocaleData as ɵregisterLocaleData, registerModuleFactory as ɵregisterModuleFactory, registerNgModuleType as ɵregisterNgModuleType, renderComponent$1 as ɵrenderComponent, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, store as ɵstore, stringify as ɵstringify, textDef as ɵted, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapValue as ɵunv, unwrapSafeValue as ɵunwrapSafeValue, viewDef as ɵvid, whenRendered as ɵwhenRendered, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵviewQuery };\n\n","import { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { map } from '../operators/map';\nimport { isObject } from '../util/isObject';\nimport { from } from './from';\nexport function forkJoin(...sources) {\n    if (sources.length === 1) {\n        const first = sources[0];\n        if (isArray(first)) {\n            return forkJoinInternal(first, null);\n        }\n        if (isObject(first) && Object.getPrototypeOf(first) === Object.prototype) {\n            const keys = Object.keys(first);\n            return forkJoinInternal(keys.map(key => first[key]), keys);\n        }\n    }\n    if (typeof sources[sources.length - 1] === 'function') {\n        const resultSelector = sources.pop();\n        sources = (sources.length === 1 && isArray(sources[0])) ? sources[0] : sources;\n        return forkJoinInternal(sources, null).pipe(map((args) => resultSelector(...args)));\n    }\n    return forkJoinInternal(sources, null);\n}\nfunction forkJoinInternal(sources, keys) {\n    return new Observable(subscriber => {\n        const len = sources.length;\n        if (len === 0) {\n            subscriber.complete();\n            return;\n        }\n        const values = new Array(len);\n        let completed = 0;\n        let emitted = 0;\n        for (let i = 0; i < len; i++) {\n            const source = from(sources[i]);\n            let hasValue = false;\n            subscriber.add(source.subscribe({\n                next: value => {\n                    if (!hasValue) {\n                        hasValue = true;\n                        emitted++;\n                    }\n                    values[i] = value;\n                },\n                error: err => subscriber.error(err),\n                complete: () => {\n                    completed++;\n                    if (completed === len || !hasValue) {\n                        if (emitted === len) {\n                            subscriber.next(keys ?\n                                keys.reduce((result, key, i) => (result[key] = values[i], result), {}) :\n                                values);\n                        }\n                        subscriber.complete();\n                    }\n                }\n            }));\n        }\n    });\n}\n","/**\n * @license Angular v12.2.5\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { Directive, Renderer2, ElementRef, InjectionToken, forwardRef, Optional, Inject, ɵisPromise, ɵisObservable, Self, EventEmitter, Input, Host, SkipSelf, Output, NgModule, ɵɵdefineInjectable, Injectable, Injector, Version } from '@angular/core';\nimport { ɵgetDOM } from '@angular/common';\nimport { from, forkJoin } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Base class for all ControlValueAccessor classes defined in Forms package.\n * Contains common logic and utility functions.\n *\n * Note: this is an *internal-only* class and should not be extended or used directly in\n * applications code.\n */\nimport * as ɵngcc0 from '@angular/core';\nclass BaseControlValueAccessor {\n    constructor(_renderer, _elementRef) {\n        this._renderer = _renderer;\n        this._elementRef = _elementRef;\n        /**\n         * The registered callback function called when a change or input event occurs on the input\n         * element.\n         * @nodoc\n         */\n        this.onChange = (_) => { };\n        /**\n         * The registered callback function called when a blur event occurs on the input element.\n         * @nodoc\n         */\n        this.onTouched = () => { };\n    }\n    /**\n     * Helper method that sets a property on a target element using the current Renderer\n     * implementation.\n     * @nodoc\n     */\n    setProperty(key, value) {\n        this._renderer.setProperty(this._elementRef.nativeElement, key, value);\n    }\n    /**\n     * Registers a function called when the control is touched.\n     * @nodoc\n     */\n    registerOnTouched(fn) {\n        this.onTouched = fn;\n    }\n    /**\n     * Registers a function called when the control value changes.\n     * @nodoc\n     */\n    registerOnChange(fn) {\n        this.onChange = fn;\n    }\n    /**\n     * Sets the \"disabled\" property on the range input element.\n     * @nodoc\n     */\n    setDisabledState(isDisabled) {\n        this.setProperty('disabled', isDisabled);\n    }\n}\nBaseControlValueAccessor.ɵfac = function BaseControlValueAccessor_Factory(t) { return new (t || BaseControlValueAccessor)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nBaseControlValueAccessor.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: BaseControlValueAccessor });\nBaseControlValueAccessor.ctorParameters = () => [\n    { type: Renderer2 },\n    { type: ElementRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BaseControlValueAccessor, [{\n        type: Directive\n    }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }]; }, null); })();\n/**\n * Base class for all built-in ControlValueAccessor classes (except DefaultValueAccessor, which is\n * used in case no other CVAs can be found). We use this class to distinguish between default CVA,\n * built-in CVAs and custom CVAs, so that Forms logic can recognize built-in CVAs and treat custom\n * ones with higher priority (when both built-in and custom CVAs are present).\n *\n * Note: this is an *internal-only* class and should not be extended or used directly in\n * applications code.\n */\nclass BuiltInControlValueAccessor extends BaseControlValueAccessor {\n}\nBuiltInControlValueAccessor.ɵfac = /*@__PURE__*/ function () { let ɵBuiltInControlValueAccessor_BaseFactory; return function BuiltInControlValueAccessor_Factory(t) { return (ɵBuiltInControlValueAccessor_BaseFactory || (ɵBuiltInControlValueAccessor_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(BuiltInControlValueAccessor)))(t || BuiltInControlValueAccessor); }; }();\nBuiltInControlValueAccessor.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: BuiltInControlValueAccessor, features: [ɵngcc0.ɵɵInheritDefinitionFeature] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BuiltInControlValueAccessor, [{\n        type: Directive\n    }], null, null); })();\n/**\n * Used to provide a `ControlValueAccessor` for form controls.\n *\n * See `DefaultValueAccessor` for how to implement one.\n *\n * @publicApi\n */\nconst NG_VALUE_ACCESSOR = new InjectionToken('NgValueAccessor');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst CHECKBOX_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => CheckboxControlValueAccessor),\n    multi: true,\n};\n/**\n * @description\n * A `ControlValueAccessor` for writing a value and listening to changes on a checkbox input\n * element.\n *\n * @usageNotes\n *\n * ### Using a checkbox with a reactive form.\n *\n * The following example shows how to use a checkbox with a reactive form.\n *\n * ```ts\n * const rememberLoginControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"checkbox\" [formControl]=\"rememberLoginControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass CheckboxControlValueAccessor extends BuiltInControlValueAccessor {\n    /**\n     * Sets the \"checked\" property on the input element.\n     * @nodoc\n     */\n    writeValue(value) {\n        this.setProperty('checked', value);\n    }\n}\nCheckboxControlValueAccessor.ɵfac = /*@__PURE__*/ function () { let ɵCheckboxControlValueAccessor_BaseFactory; return function CheckboxControlValueAccessor_Factory(t) { return (ɵCheckboxControlValueAccessor_BaseFactory || (ɵCheckboxControlValueAccessor_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(CheckboxControlValueAccessor)))(t || CheckboxControlValueAccessor); }; }();\nCheckboxControlValueAccessor.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: CheckboxControlValueAccessor, selectors: [[\"input\", \"type\", \"checkbox\", \"formControlName\", \"\"], [\"input\", \"type\", \"checkbox\", \"formControl\", \"\"], [\"input\", \"type\", \"checkbox\", \"ngModel\", \"\"]], hostBindings: function CheckboxControlValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"change\", function CheckboxControlValueAccessor_change_HostBindingHandler($event) { return ctx.onChange($event.target.checked); })(\"blur\", function CheckboxControlValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });\n    } }, features: [ɵngcc0.ɵɵProvidersFeature([CHECKBOX_VALUE_ACCESSOR]), ɵngcc0.ɵɵInheritDefinitionFeature] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(CheckboxControlValueAccessor, [{\n        type: Directive,\n        args: [{\n                selector: 'input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]',\n                host: { '(change)': 'onChange($event.target.checked)', '(blur)': 'onTouched()' },\n                providers: [CHECKBOX_VALUE_ACCESSOR]\n            }]\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst DEFAULT_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => DefaultValueAccessor),\n    multi: true\n};\n/**\n * We must check whether the agent is Android because composition events\n * behave differently between iOS and Android.\n */\nfunction _isAndroid() {\n    const userAgent = ɵgetDOM() ? ɵgetDOM().getUserAgent() : '';\n    return /android (\\d+)/.test(userAgent.toLowerCase());\n}\n/**\n * @description\n * Provide this token to control if form directives buffer IME input until\n * the \"compositionend\" event occurs.\n * @publicApi\n */\nconst COMPOSITION_BUFFER_MODE = new InjectionToken('CompositionEventMode');\n/**\n * The default `ControlValueAccessor` for writing a value and listening to changes on input\n * elements. The accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * {@searchKeywords ngDefaultControl}\n *\n * @usageNotes\n *\n * ### Using the default value accessor\n *\n * The following example shows how to use an input element that activates the default value accessor\n * (in this case, a text field).\n *\n * ```ts\n * const firstNameControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"text\" [formControl]=\"firstNameControl\">\n * ```\n *\n * This value accessor is used by default for `<input type=\"text\">` and `<textarea>` elements, but\n * you could also use it for custom components that have similar behavior and do not require special\n * processing. In order to attach the default value accessor to a custom element, add the\n * `ngDefaultControl` attribute as shown below.\n *\n * ```\n * <custom-input-component ngDefaultControl [(ngModel)]=\"value\"></custom-input-component>\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass DefaultValueAccessor extends BaseControlValueAccessor {\n    constructor(renderer, elementRef, _compositionMode) {\n        super(renderer, elementRef);\n        this._compositionMode = _compositionMode;\n        /** Whether the user is creating a composition string (IME events). */\n        this._composing = false;\n        if (this._compositionMode == null) {\n            this._compositionMode = !_isAndroid();\n        }\n    }\n    /**\n     * Sets the \"value\" property on the input element.\n     * @nodoc\n     */\n    writeValue(value) {\n        const normalizedValue = value == null ? '' : value;\n        this.setProperty('value', normalizedValue);\n    }\n    /** @internal */\n    _handleInput(value) {\n        if (!this._compositionMode || (this._compositionMode && !this._composing)) {\n            this.onChange(value);\n        }\n    }\n    /** @internal */\n    _compositionStart() {\n        this._composing = true;\n    }\n    /** @internal */\n    _compositionEnd(value) {\n        this._composing = false;\n        this._compositionMode && this.onChange(value);\n    }\n}\nDefaultValueAccessor.ɵfac = function DefaultValueAccessor_Factory(t) { return new (t || DefaultValueAccessor)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(COMPOSITION_BUFFER_MODE, 8)); };\nDefaultValueAccessor.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: DefaultValueAccessor, selectors: [[\"input\", \"formControlName\", \"\", 3, \"type\", \"checkbox\"], [\"textarea\", \"formControlName\", \"\"], [\"input\", \"formControl\", \"\", 3, \"type\", \"checkbox\"], [\"textarea\", \"formControl\", \"\"], [\"input\", \"ngModel\", \"\", 3, \"type\", \"checkbox\"], [\"textarea\", \"ngModel\", \"\"], [\"\", \"ngDefaultControl\", \"\"]], hostBindings: function DefaultValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"input\", function DefaultValueAccessor_input_HostBindingHandler($event) { return ctx._handleInput($event.target.value); })(\"blur\", function DefaultValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); })(\"compositionstart\", function DefaultValueAccessor_compositionstart_HostBindingHandler() { return ctx._compositionStart(); })(\"compositionend\", function DefaultValueAccessor_compositionend_HostBindingHandler($event) { return ctx._compositionEnd($event.target.value); });\n    } }, features: [ɵngcc0.ɵɵProvidersFeature([DEFAULT_VALUE_ACCESSOR]), ɵngcc0.ɵɵInheritDefinitionFeature] });\nDefaultValueAccessor.ctorParameters = () => [\n    { type: Renderer2 },\n    { type: ElementRef },\n    { type: Boolean, decorators: [{ type: Optional }, { type: Inject, args: [COMPOSITION_BUFFER_MODE,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DefaultValueAccessor, [{\n        type: Directive,\n        args: [{\n                selector: 'input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]',\n                // TODO: vsavkin replace the above selector with the one below it once\n                // https://github.com/angular/angular/issues/3011 is implemented\n                // selector: '[ngModel],[formControl],[formControlName]',\n                host: {\n                    '(input)': '$any(this)._handleInput($event.target.value)',\n                    '(blur)': 'onTouched()',\n                    '(compositionstart)': '$any(this)._compositionStart()',\n                    '(compositionend)': '$any(this)._compositionEnd($event.target.value)'\n                },\n                providers: [DEFAULT_VALUE_ACCESSOR]\n            }]\n    }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }, { type: Boolean, decorators: [{\n                type: Optional\n            }, {\n                type: Inject,\n                args: [COMPOSITION_BUFFER_MODE]\n            }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction isEmptyInputValue(value) {\n    // we don't check for string here so it also works with arrays\n    return value == null || value.length === 0;\n}\nfunction hasValidLength(value) {\n    // non-strict comparison is intentional, to check for both `null` and `undefined` values\n    return value != null && typeof value.length === 'number';\n}\n/**\n * @description\n * An `InjectionToken` for registering additional synchronous validators used with\n * `AbstractControl`s.\n *\n * @see `NG_ASYNC_VALIDATORS`\n *\n * @usageNotes\n *\n * ### Providing a custom validator\n *\n * The following example registers a custom validator directive. Adding the validator to the\n * existing collection of validators requires the `multi: true` option.\n *\n * ```typescript\n * @Directive({\n *   selector: '[customValidator]',\n *   providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]\n * })\n * class CustomValidatorDirective implements Validator {\n *   validate(control: AbstractControl): ValidationErrors | null {\n *     return { 'custom': true };\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nconst NG_VALIDATORS = new InjectionToken('NgValidators');\n/**\n * @description\n * An `InjectionToken` for registering additional asynchronous validators used with\n * `AbstractControl`s.\n *\n * @see `NG_VALIDATORS`\n *\n * @publicApi\n */\nconst NG_ASYNC_VALIDATORS = new InjectionToken('NgAsyncValidators');\n/**\n * A regular expression that matches valid e-mail addresses.\n *\n * At a high level, this regexp matches e-mail addresses of the format `local-part@tld`, where:\n * - `local-part` consists of one or more of the allowed characters (alphanumeric and some\n *   punctuation symbols).\n * - `local-part` cannot begin or end with a period (`.`).\n * - `local-part` cannot be longer than 64 characters.\n * - `tld` consists of one or more `labels` separated by periods (`.`). For example `localhost` or\n *   `foo.com`.\n * - A `label` consists of one or more of the allowed characters (alphanumeric, dashes (`-`) and\n *   periods (`.`)).\n * - A `label` cannot begin or end with a dash (`-`) or a period (`.`).\n * - A `label` cannot be longer than 63 characters.\n * - The whole address cannot be longer than 254 characters.\n *\n * ## Implementation background\n *\n * This regexp was ported over from AngularJS (see there for git history):\n * https://github.com/angular/angular.js/blob/c133ef836/src/ng/directive/input.js#L27\n * It is based on the\n * [WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n * lengths of different parts of the address). The main differences from the WHATWG version are:\n *   - Disallow `local-part` to begin or end with a period (`.`).\n *   - Disallow `local-part` length to exceed 64 characters.\n *   - Disallow total address length to exceed 254 characters.\n *\n * See [this commit](https://github.com/angular/angular.js/commit/f3f5cf72e) for more details.\n */\nconst EMAIL_REGEXP = /^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n/**\n * @description\n * Provides a set of built-in validators that can be used by form controls.\n *\n * A validator is a function that processes a `FormControl` or collection of\n * controls and returns an error map or null. A null map means that validation has passed.\n *\n * @see [Form Validation](/guide/form-validation)\n *\n * @publicApi\n */\nclass Validators {\n    /**\n     * @description\n     * Validator that requires the control's value to be greater than or equal to the provided number.\n     *\n     * @usageNotes\n     *\n     * ### Validate against a minimum of 3\n     *\n     * ```typescript\n     * const control = new FormControl(2, Validators.min(3));\n     *\n     * console.log(control.errors); // {min: {min: 3, actual: 2}}\n     * ```\n     *\n     * @returns A validator function that returns an error map with the\n     * `min` property if the validation check fails, otherwise `null`.\n     *\n     * @see `updateValueAndValidity()`\n     *\n     */\n    static min(min) {\n        return minValidator(min);\n    }\n    /**\n     * @description\n     * Validator that requires the control's value to be less than or equal to the provided number.\n     *\n     * @usageNotes\n     *\n     * ### Validate against a maximum of 15\n     *\n     * ```typescript\n     * const control = new FormControl(16, Validators.max(15));\n     *\n     * console.log(control.errors); // {max: {max: 15, actual: 16}}\n     * ```\n     *\n     * @returns A validator function that returns an error map with the\n     * `max` property if the validation check fails, otherwise `null`.\n     *\n     * @see `updateValueAndValidity()`\n     *\n     */\n    static max(max) {\n        return maxValidator(max);\n    }\n    /**\n     * @description\n     * Validator that requires the control have a non-empty value.\n     *\n     * @usageNotes\n     *\n     * ### Validate that the field is non-empty\n     *\n     * ```typescript\n     * const control = new FormControl('', Validators.required);\n     *\n     * console.log(control.errors); // {required: true}\n     * ```\n     *\n     * @returns An error map with the `required` property\n     * if the validation check fails, otherwise `null`.\n     *\n     * @see `updateValueAndValidity()`\n     *\n     */\n    static required(control) {\n        return requiredValidator(control);\n    }\n    /**\n     * @description\n     * Validator that requires the control's value be true. This validator is commonly\n     * used for required checkboxes.\n     *\n     * @usageNotes\n     *\n     * ### Validate that the field value is true\n     *\n     * ```typescript\n     * const control = new FormControl('', Validators.requiredTrue);\n     *\n     * console.log(control.errors); // {required: true}\n     * ```\n     *\n     * @returns An error map that contains the `required` property\n     * set to `true` if the validation check fails, otherwise `null`.\n     *\n     * @see `updateValueAndValidity()`\n     *\n     */\n    static requiredTrue(control) {\n        return requiredTrueValidator(control);\n    }\n    /**\n     * @description\n     * Validator that requires the control's value pass an email validation test.\n     *\n     * Tests the value using a [regular\n     * expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)\n     * pattern suitable for common usecases. The pattern is based on the definition of a valid email\n     * address in the [WHATWG HTML\n     * specification](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n     * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n     * lengths of different parts of the address).\n     *\n     * The differences from the WHATWG version include:\n     * - Disallow `local-part` (the part before the `@` symbol) to begin or end with a period (`.`).\n     * - Disallow `local-part` to be longer than 64 characters.\n     * - Disallow the whole address to be longer than 254 characters.\n     *\n     * If this pattern does not satisfy your business needs, you can use `Validators.pattern()` to\n     * validate the value against a different pattern.\n     *\n     * @usageNotes\n     *\n     * ### Validate that the field matches a valid email pattern\n     *\n     * ```typescript\n     * const control = new FormControl('bad@', Validators.email);\n     *\n     * console.log(control.errors); // {email: true}\n     * ```\n     *\n     * @returns An error map with the `email` property\n     * if the validation check fails, otherwise `null`.\n     *\n     * @see `updateValueAndValidity()`\n     *\n     */\n    static email(control) {\n        return emailValidator(control);\n    }\n    /**\n     * @description\n     * Validator that requires the length of the control's value to be greater than or equal\n     * to the provided minimum length. This validator is also provided by default if you use the\n     * the HTML5 `minlength` attribute. Note that the `minLength` validator is intended to be used\n     * only for types that have a numeric `length` property, such as strings or arrays. The\n     * `minLength` validator logic is also not invoked for values when their `length` property is 0\n     * (for example in case of an empty string or an empty array), to support optional controls. You\n     * can use the standard `required` validator if empty values should not be considered valid.\n     *\n     * @usageNotes\n     *\n     * ### Validate that the field has a minimum of 3 characters\n     *\n     * ```typescript\n     * const control = new FormControl('ng', Validators.minLength(3));\n     *\n     * console.log(control.errors); // {minlength: {requiredLength: 3, actualLength: 2}}\n     * ```\n     *\n     * ```html\n     * <input minlength=\"5\">\n     * ```\n     *\n     * @returns A validator function that returns an error map with the\n     * `minlength` property if the validation check fails, otherwise `null`.\n     *\n     * @see `updateValueAndValidity()`\n     *\n     */\n    static minLength(minLength) {\n        return minLengthValidator(minLength);\n    }\n    /**\n     * @description\n     * Validator that requires the length of the control's value to be less than or equal\n     * to the provided maximum length. This validator is also provided by default if you use the\n     * the HTML5 `maxlength` attribute. Note that the `maxLength` validator is intended to be used\n     * only for types that have a numeric `length` property, such as strings or arrays.\n     *\n     * @usageNotes\n     *\n     * ### Validate that the field has maximum of 5 characters\n     *\n     * ```typescript\n     * const control = new FormControl('Angular', Validators.maxLength(5));\n     *\n     * console.log(control.errors); // {maxlength: {requiredLength: 5, actualLength: 7}}\n     * ```\n     *\n     * ```html\n     * <input maxlength=\"5\">\n     * ```\n     *\n     * @returns A validator function that returns an error map with the\n     * `maxlength` property if the validation check fails, otherwise `null`.\n     *\n     * @see `updateValueAndValidity()`\n     *\n     */\n    static maxLength(maxLength) {\n        return maxLengthValidator(maxLength);\n    }\n    /**\n     * @description\n     * Validator that requires the control's value to match a regex pattern. This validator is also\n     * provided by default if you use the HTML5 `pattern` attribute.\n     *\n     * @usageNotes\n     *\n     * ### Validate that the field only contains letters or spaces\n     *\n     * ```typescript\n     * const control = new FormControl('1', Validators.pattern('[a-zA-Z ]*'));\n     *\n     * console.log(control.errors); // {pattern: {requiredPattern: '^[a-zA-Z ]*$', actualValue: '1'}}\n     * ```\n     *\n     * ```html\n     * <input pattern=\"[a-zA-Z ]*\">\n     * ```\n     *\n     * ### Pattern matching with the global or sticky flag\n     *\n     * `RegExp` objects created with the `g` or `y` flags that are passed into `Validators.pattern`\n     * can produce different results on the same input when validations are run consecutively. This is\n     * due to how the behavior of `RegExp.prototype.test` is\n     * specified in [ECMA-262](https://tc39.es/ecma262/#sec-regexpbuiltinexec)\n     * (`RegExp` preserves the index of the last match when the global or sticky flag is used).\n     * Due to this behavior, it is recommended that when using\n     * `Validators.pattern` you **do not** pass in a `RegExp` object with either the global or sticky\n     * flag enabled.\n     *\n     * ```typescript\n     * // Not recommended (since the `g` flag is used)\n     * const controlOne = new FormControl('1', Validators.pattern(/foo/g));\n     *\n     * // Good\n     * const controlTwo = new FormControl('1', Validators.pattern(/foo/));\n     * ```\n     *\n     * @param pattern A regular expression to be used as is to test the values, or a string.\n     * If a string is passed, the `^` character is prepended and the `$` character is\n     * appended to the provided string (if not already present), and the resulting regular\n     * expression is used to test the values.\n     *\n     * @returns A validator function that returns an error map with the\n     * `pattern` property if the validation check fails, otherwise `null`.\n     *\n     * @see `updateValueAndValidity()`\n     *\n     */\n    static pattern(pattern) {\n        return patternValidator(pattern);\n    }\n    /**\n     * @description\n     * Validator that performs no operation.\n     *\n     * @see `updateValueAndValidity()`\n     *\n     */\n    static nullValidator(control) {\n        return nullValidator(control);\n    }\n    static compose(validators) {\n        return compose(validators);\n    }\n    /**\n     * @description\n     * Compose multiple async validators into a single function that returns the union\n     * of the individual error objects for the provided control.\n     *\n     * @returns A validator function that returns an error map with the\n     * merged error objects of the async validators if the validation check fails, otherwise `null`.\n     *\n     * @see `updateValueAndValidity()`\n     *\n     */\n    static composeAsync(validators) {\n        return composeAsync(validators);\n    }\n}\n/**\n * Validator that requires the control's value to be greater than or equal to the provided number.\n * See `Validators.min` for additional information.\n */\nfunction minValidator(min) {\n    return (control) => {\n        if (isEmptyInputValue(control.value) || isEmptyInputValue(min)) {\n            return null; // don't validate empty values to allow optional controls\n        }\n        const value = parseFloat(control.value);\n        // Controls with NaN values after parsing should be treated as not having a\n        // minimum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-min\n        return !isNaN(value) && value < min ? { 'min': { 'min': min, 'actual': control.value } } : null;\n    };\n}\n/**\n * Validator that requires the control's value to be less than or equal to the provided number.\n * See `Validators.max` for additional information.\n */\nfunction maxValidator(max) {\n    return (control) => {\n        if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {\n            return null; // don't validate empty values to allow optional controls\n        }\n        const value = parseFloat(control.value);\n        // Controls with NaN values after parsing should be treated as not having a\n        // maximum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-max\n        return !isNaN(value) && value > max ? { 'max': { 'max': max, 'actual': control.value } } : null;\n    };\n}\n/**\n * Validator that requires the control have a non-empty value.\n * See `Validators.required` for additional information.\n */\nfunction requiredValidator(control) {\n    return isEmptyInputValue(control.value) ? { 'required': true } : null;\n}\n/**\n * Validator that requires the control's value be true. This validator is commonly\n * used for required checkboxes.\n * See `Validators.requiredTrue` for additional information.\n */\nfunction requiredTrueValidator(control) {\n    return control.value === true ? null : { 'required': true };\n}\n/**\n * Validator that requires the control's value pass an email validation test.\n * See `Validators.email` for additional information.\n */\nfunction emailValidator(control) {\n    if (isEmptyInputValue(control.value)) {\n        return null; // don't validate empty values to allow optional controls\n    }\n    return EMAIL_REGEXP.test(control.value) ? null : { 'email': true };\n}\n/**\n * Validator that requires the length of the control's value to be greater than or equal\n * to the provided minimum length. See `Validators.minLength` for additional information.\n */\nfunction minLengthValidator(minLength) {\n    return (control) => {\n        if (isEmptyInputValue(control.value) || !hasValidLength(control.value)) {\n            // don't validate empty values to allow optional controls\n            // don't validate values without `length` property\n            return null;\n        }\n        return control.value.length < minLength ?\n            { 'minlength': { 'requiredLength': minLength, 'actualLength': control.value.length } } :\n            null;\n    };\n}\n/**\n * Validator that requires the length of the control's value to be less than or equal\n * to the provided maximum length. See `Validators.maxLength` for additional information.\n */\nfunction maxLengthValidator(maxLength) {\n    return (control) => {\n        return hasValidLength(control.value) && control.value.length > maxLength ?\n            { 'maxlength': { 'requiredLength': maxLength, 'actualLength': control.value.length } } :\n            null;\n    };\n}\n/**\n * Validator that requires the control's value to match a regex pattern.\n * See `Validators.pattern` for additional information.\n */\nfunction patternValidator(pattern) {\n    if (!pattern)\n        return nullValidator;\n    let regex;\n    let regexStr;\n    if (typeof pattern === 'string') {\n        regexStr = '';\n        if (pattern.charAt(0) !== '^')\n            regexStr += '^';\n        regexStr += pattern;\n        if (pattern.charAt(pattern.length - 1) !== '$')\n            regexStr += '$';\n        regex = new RegExp(regexStr);\n    }\n    else {\n        regexStr = pattern.toString();\n        regex = pattern;\n    }\n    return (control) => {\n        if (isEmptyInputValue(control.value)) {\n            return null; // don't validate empty values to allow optional controls\n        }\n        const value = control.value;\n        return regex.test(value) ? null :\n            { 'pattern': { 'requiredPattern': regexStr, 'actualValue': value } };\n    };\n}\n/**\n * Function that has `ValidatorFn` shape, but performs no operation.\n */\nfunction nullValidator(control) {\n    return null;\n}\nfunction isPresent(o) {\n    return o != null;\n}\nfunction toObservable(r) {\n    const obs = ɵisPromise(r) ? from(r) : r;\n    if (!(ɵisObservable(obs)) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n        throw new Error(`Expected validator to return Promise or Observable.`);\n    }\n    return obs;\n}\nfunction mergeErrors(arrayOfErrors) {\n    let res = {};\n    // Not using Array.reduce here due to a Chrome 80 bug\n    // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\n    arrayOfErrors.forEach((errors) => {\n        res = errors != null ? Object.assign(Object.assign({}, res), errors) : res;\n    });\n    return Object.keys(res).length === 0 ? null : res;\n}\nfunction executeValidators(control, validators) {\n    return validators.map(validator => validator(control));\n}\nfunction isValidatorFn(validator) {\n    return !validator.validate;\n}\n/**\n * Given the list of validators that may contain both functions as well as classes, return the list\n * of validator functions (convert validator classes into validator functions). This is needed to\n * have consistent structure in validators list before composing them.\n *\n * @param validators The set of validators that may contain validators both in plain function form\n *     as well as represented as a validator class.\n */\nfunction normalizeValidators(validators) {\n    return validators.map(validator => {\n        return isValidatorFn(validator) ?\n            validator :\n            ((c) => validator.validate(c));\n    });\n}\n/**\n * Merges synchronous validators into a single validator function.\n * See `Validators.compose` for additional information.\n */\nfunction compose(validators) {\n    if (!validators)\n        return null;\n    const presentValidators = validators.filter(isPresent);\n    if (presentValidators.length == 0)\n        return null;\n    return function (control) {\n        return mergeErrors(executeValidators(control, presentValidators));\n    };\n}\n/**\n * Accepts a list of validators of different possible shapes (`Validator` and `ValidatorFn`),\n * normalizes the list (converts everything to `ValidatorFn`) and merges them into a single\n * validator function.\n */\nfunction composeValidators(validators) {\n    return validators != null ? compose(normalizeValidators(validators)) : null;\n}\n/**\n * Merges asynchronous validators into a single validator function.\n * See `Validators.composeAsync` for additional information.\n */\nfunction composeAsync(validators) {\n    if (!validators)\n        return null;\n    const presentValidators = validators.filter(isPresent);\n    if (presentValidators.length == 0)\n        return null;\n    return function (control) {\n        const observables = executeValidators(control, presentValidators).map(toObservable);\n        return forkJoin(observables).pipe(map(mergeErrors));\n    };\n}\n/**\n * Accepts a list of async validators of different possible shapes (`AsyncValidator` and\n * `AsyncValidatorFn`), normalizes the list (converts everything to `AsyncValidatorFn`) and merges\n * them into a single validator function.\n */\nfunction composeAsyncValidators(validators) {\n    return validators != null ? composeAsync(normalizeValidators(validators)) :\n        null;\n}\n/**\n * Merges raw control validators with a given directive validator and returns the combined list of\n * validators as an array.\n */\nfunction mergeValidators(controlValidators, dirValidator) {\n    if (controlValidators === null)\n        return [dirValidator];\n    return Array.isArray(controlValidators) ? [...controlValidators, dirValidator] :\n        [controlValidators, dirValidator];\n}\n/**\n * Retrieves the list of raw synchronous validators attached to a given control.\n */\nfunction getControlValidators(control) {\n    return control._rawValidators;\n}\n/**\n * Retrieves the list of raw asynchronous validators attached to a given control.\n */\nfunction getControlAsyncValidators(control) {\n    return control._rawAsyncValidators;\n}\n/**\n * Accepts a singleton validator, an array, or null, and returns an array type with the provided\n * validators.\n *\n * @param validators A validator, validators, or null.\n * @returns A validators array.\n */\nfunction makeValidatorsArray(validators) {\n    if (!validators)\n        return [];\n    return Array.isArray(validators) ? validators : [validators];\n}\n/**\n * Determines whether a validator or validators array has a given validator.\n *\n * @param validators The validator or validators to compare against.\n * @param validator The validator to check.\n * @returns Whether the validator is present.\n */\nfunction hasValidator(validators, validator) {\n    return Array.isArray(validators) ? validators.includes(validator) : validators === validator;\n}\n/**\n * Combines two arrays of validators into one. If duplicates are provided, only one will be added.\n *\n * @param validators The new validators.\n * @param currentValidators The base array of currrent validators.\n * @returns An array of validators.\n */\nfunction addValidators(validators, currentValidators) {\n    const current = makeValidatorsArray(currentValidators);\n    const validatorsToAdd = makeValidatorsArray(validators);\n    validatorsToAdd.forEach((v) => {\n        // Note: if there are duplicate entries in the new validators array,\n        // only the first one would be added to the current list of validarors.\n        // Duplicate ones would be ignored since `hasValidator` would detect\n        // the presence of a validator function and we update the current list in place.\n        if (!hasValidator(current, v)) {\n            current.push(v);\n        }\n    });\n    return current;\n}\nfunction removeValidators(validators, currentValidators) {\n    return makeValidatorsArray(currentValidators).filter(v => !hasValidator(validators, v));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n * Base class for control directives.\n *\n * This class is only used internally in the `ReactiveFormsModule` and the `FormsModule`.\n *\n * @publicApi\n */\nclass AbstractControlDirective {\n    constructor() {\n        /**\n         * Set of synchronous validators as they were provided while calling `setValidators` function.\n         * @internal\n         */\n        this._rawValidators = [];\n        /**\n         * Set of asynchronous validators as they were provided while calling `setAsyncValidators`\n         * function.\n         * @internal\n         */\n        this._rawAsyncValidators = [];\n        /*\n         * The set of callbacks to be invoked when directive instance is being destroyed.\n         */\n        this._onDestroyCallbacks = [];\n    }\n    /**\n     * @description\n     * Reports the value of the control if it is present, otherwise null.\n     */\n    get value() {\n        return this.control ? this.control.value : null;\n    }\n    /**\n     * @description\n     * Reports whether the control is valid. A control is considered valid if no\n     * validation errors exist with the current value.\n     * If the control is not present, null is returned.\n     */\n    get valid() {\n        return this.control ? this.control.valid : null;\n    }\n    /**\n     * @description\n     * Reports whether the control is invalid, meaning that an error exists in the input value.\n     * If the control is not present, null is returned.\n     */\n    get invalid() {\n        return this.control ? this.control.invalid : null;\n    }\n    /**\n     * @description\n     * Reports whether a control is pending, meaning that that async validation is occurring and\n     * errors are not yet available for the input value. If the control is not present, null is\n     * returned.\n     */\n    get pending() {\n        return this.control ? this.control.pending : null;\n    }\n    /**\n     * @description\n     * Reports whether the control is disabled, meaning that the control is disabled\n     * in the UI and is exempt from validation checks and excluded from aggregate\n     * values of ancestor controls. If the control is not present, null is returned.\n     */\n    get disabled() {\n        return this.control ? this.control.disabled : null;\n    }\n    /**\n     * @description\n     * Reports whether the control is enabled, meaning that the control is included in ancestor\n     * calculations of validity or value. If the control is not present, null is returned.\n     */\n    get enabled() {\n        return this.control ? this.control.enabled : null;\n    }\n    /**\n     * @description\n     * Reports the control's validation errors. If the control is not present, null is returned.\n     */\n    get errors() {\n        return this.control ? this.control.errors : null;\n    }\n    /**\n     * @description\n     * Reports whether the control is pristine, meaning that the user has not yet changed\n     * the value in the UI. If the control is not present, null is returned.\n     */\n    get pristine() {\n        return this.control ? this.control.pristine : null;\n    }\n    /**\n     * @description\n     * Reports whether the control is dirty, meaning that the user has changed\n     * the value in the UI. If the control is not present, null is returned.\n     */\n    get dirty() {\n        return this.control ? this.control.dirty : null;\n    }\n    /**\n     * @description\n     * Reports whether the control is touched, meaning that the user has triggered\n     * a `blur` event on it. If the control is not present, null is returned.\n     */\n    get touched() {\n        return this.control ? this.control.touched : null;\n    }\n    /**\n     * @description\n     * Reports the validation status of the control. Possible values include:\n     * 'VALID', 'INVALID', 'DISABLED', and 'PENDING'.\n     * If the control is not present, null is returned.\n     */\n    get status() {\n        return this.control ? this.control.status : null;\n    }\n    /**\n     * @description\n     * Reports whether the control is untouched, meaning that the user has not yet triggered\n     * a `blur` event on it. If the control is not present, null is returned.\n     */\n    get untouched() {\n        return this.control ? this.control.untouched : null;\n    }\n    /**\n     * @description\n     * Returns a multicasting observable that emits a validation status whenever it is\n     * calculated for the control. If the control is not present, null is returned.\n     */\n    get statusChanges() {\n        return this.control ? this.control.statusChanges : null;\n    }\n    /**\n     * @description\n     * Returns a multicasting observable of value changes for the control that emits every time the\n     * value of the control changes in the UI or programmatically.\n     * If the control is not present, null is returned.\n     */\n    get valueChanges() {\n        return this.control ? this.control.valueChanges : null;\n    }\n    /**\n     * @description\n     * Returns an array that represents the path from the top-level form to this control.\n     * Each index is the string name of the control on that level.\n     */\n    get path() {\n        return null;\n    }\n    /**\n     * Sets synchronous validators for this directive.\n     * @internal\n     */\n    _setValidators(validators) {\n        this._rawValidators = validators || [];\n        this._composedValidatorFn = composeValidators(this._rawValidators);\n    }\n    /**\n     * Sets asynchronous validators for this directive.\n     * @internal\n     */\n    _setAsyncValidators(validators) {\n        this._rawAsyncValidators = validators || [];\n        this._composedAsyncValidatorFn = composeAsyncValidators(this._rawAsyncValidators);\n    }\n    /**\n     * @description\n     * Synchronous validator function composed of all the synchronous validators registered with this\n     * directive.\n     */\n    get validator() {\n        return this._composedValidatorFn || null;\n    }\n    /**\n     * @description\n     * Asynchronous validator function composed of all the asynchronous validators registered with\n     * this directive.\n     */\n    get asyncValidator() {\n        return this._composedAsyncValidatorFn || null;\n    }\n    /**\n     * Internal function to register callbacks that should be invoked\n     * when directive instance is being destroyed.\n     * @internal\n     */\n    _registerOnDestroy(fn) {\n        this._onDestroyCallbacks.push(fn);\n    }\n    /**\n     * Internal function to invoke all registered \"on destroy\" callbacks.\n     * Note: calling this function also clears the list of callbacks.\n     * @internal\n     */\n    _invokeOnDestroyCallbacks() {\n        this._onDestroyCallbacks.forEach(fn => fn());\n        this._onDestroyCallbacks = [];\n    }\n    /**\n     * @description\n     * Resets the control with the provided value if the control is present.\n     */\n    reset(value = undefined) {\n        if (this.control)\n            this.control.reset(value);\n    }\n    /**\n     * @description\n     * Reports whether the control with the given path has the error specified.\n     *\n     * @param errorCode The code of the error to check\n     * @param path A list of control names that designates how to move from the current control\n     * to the control that should be queried for errors.\n     *\n     * @usageNotes\n     * For example, for the following `FormGroup`:\n     *\n     * ```\n     * form = new FormGroup({\n     *   address: new FormGroup({ street: new FormControl() })\n     * });\n     * ```\n     *\n     * The path to the 'street' control from the root form would be 'address' -> 'street'.\n     *\n     * It can be provided to this method in one of two formats:\n     *\n     * 1. An array of string control names, e.g. `['address', 'street']`\n     * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n     *\n     * If no path is given, this method checks for the error on the current control.\n     *\n     * @returns whether the given error is present in the control at the given path.\n     *\n     * If the control is not present, false is returned.\n     */\n    hasError(errorCode, path) {\n        return this.control ? this.control.hasError(errorCode, path) : false;\n    }\n    /**\n     * @description\n     * Reports error data for the control with the given path.\n     *\n     * @param errorCode The code of the error to check\n     * @param path A list of control names that designates how to move from the current control\n     * to the control that should be queried for errors.\n     *\n     * @usageNotes\n     * For example, for the following `FormGroup`:\n     *\n     * ```\n     * form = new FormGroup({\n     *   address: new FormGroup({ street: new FormControl() })\n     * });\n     * ```\n     *\n     * The path to the 'street' control from the root form would be 'address' -> 'street'.\n     *\n     * It can be provided to this method in one of two formats:\n     *\n     * 1. An array of string control names, e.g. `['address', 'street']`\n     * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n     *\n     * @returns error data for that particular error. If the control or error is not present,\n     * null is returned.\n     */\n    getError(errorCode, path) {\n        return this.control ? this.control.getError(errorCode, path) : null;\n    }\n}\nAbstractControlDirective.ɵfac = function AbstractControlDirective_Factory(t) { return new (t || AbstractControlDirective)(); };\nAbstractControlDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: AbstractControlDirective });\n\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n * A base class for directives that contain multiple registered instances of `NgControl`.\n * Only used by the forms module.\n *\n * @publicApi\n */\nclass ControlContainer extends AbstractControlDirective {\n    /**\n     * @description\n     * The top-level form directive for the control.\n     */\n    get formDirective() {\n        return null;\n    }\n    /**\n     * @description\n     * The path to this group.\n     */\n    get path() {\n        return null;\n    }\n}\nControlContainer.ɵfac = /*@__PURE__*/ function () { let ɵControlContainer_BaseFactory; return function ControlContainer_Factory(t) { return (ɵControlContainer_BaseFactory || (ɵControlContainer_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(ControlContainer)))(t || ControlContainer); }; }();\nControlContainer.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: ControlContainer, features: [ɵngcc0.ɵɵInheritDefinitionFeature] });\n\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n * A base class that all `FormControl`-based directives extend. It binds a `FormControl`\n * object to a DOM element.\n *\n * @publicApi\n */\nclass NgControl extends AbstractControlDirective {\n    constructor() {\n        super(...arguments);\n        /**\n         * @description\n         * The parent form for the control.\n         *\n         * @internal\n         */\n        this._parent = null;\n        /**\n         * @description\n         * The name for the control\n         */\n        this.name = null;\n        /**\n         * @description\n         * The value accessor for the control\n         */\n        this.valueAccessor = null;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass AbstractControlStatus {\n    constructor(cd) {\n        this._cd = cd;\n    }\n    is(status) {\n        var _a, _b, _c;\n        // Currently with ViewEngine (in AOT mode) it's not possible to use private methods in host\n        // bindings.\n        // TODO: once ViewEngine is removed, this function should be refactored:\n        //  - make the `is` method `protected`, so it's not accessible publicly\n        //  - move the `submitted` status logic to the `NgControlStatusGroup` class\n        //    and make it `private` or `protected` too.\n        if (status === 'submitted') {\n            // We check for the `submitted` field from `NgForm` and `FormGroupDirective` classes, but\n            // we avoid instanceof checks to prevent non-tree-shakable references to those types.\n            return !!((_a = this._cd) === null || _a === void 0 ? void 0 : _a.submitted);\n        }\n        return !!((_c = (_b = this._cd) === null || _b === void 0 ? void 0 : _b.control) === null || _c === void 0 ? void 0 : _c[status]);\n    }\n}\nconst ngControlStatusHost = {\n    '[class.ng-untouched]': 'is(\"untouched\")',\n    '[class.ng-touched]': 'is(\"touched\")',\n    '[class.ng-pristine]': 'is(\"pristine\")',\n    '[class.ng-dirty]': 'is(\"dirty\")',\n    '[class.ng-valid]': 'is(\"valid\")',\n    '[class.ng-invalid]': 'is(\"invalid\")',\n    '[class.ng-pending]': 'is(\"pending\")',\n};\nconst ngGroupStatusHost = {\n    '[class.ng-untouched]': 'is(\"untouched\")',\n    '[class.ng-touched]': 'is(\"touched\")',\n    '[class.ng-pristine]': 'is(\"pristine\")',\n    '[class.ng-dirty]': 'is(\"dirty\")',\n    '[class.ng-valid]': 'is(\"valid\")',\n    '[class.ng-invalid]': 'is(\"invalid\")',\n    '[class.ng-pending]': 'is(\"pending\")',\n    '[class.ng-submitted]': 'is(\"submitted\")',\n};\n/**\n * @description\n * Directive automatically applied to Angular form controls that sets CSS classes\n * based on control status.\n *\n * @usageNotes\n *\n * ### CSS classes applied\n *\n * The following classes are applied as the properties become true:\n *\n * * ng-valid\n * * ng-invalid\n * * ng-pending\n * * ng-pristine\n * * ng-dirty\n * * ng-untouched\n * * ng-touched\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgControlStatus extends AbstractControlStatus {\n    constructor(cd) {\n        super(cd);\n    }\n}\nNgControlStatus.ɵfac = function NgControlStatus_Factory(t) { return new (t || NgControlStatus)(ɵngcc0.ɵɵdirectiveInject(NgControl, 2)); };\nNgControlStatus.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgControlStatus, selectors: [[\"\", \"formControlName\", \"\"], [\"\", \"ngModel\", \"\"], [\"\", \"formControl\", \"\"]], hostVars: 14, hostBindings: function NgControlStatus_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵclassProp(\"ng-untouched\", ctx.is(\"untouched\"))(\"ng-touched\", ctx.is(\"touched\"))(\"ng-pristine\", ctx.is(\"pristine\"))(\"ng-dirty\", ctx.is(\"dirty\"))(\"ng-valid\", ctx.is(\"valid\"))(\"ng-invalid\", ctx.is(\"invalid\"))(\"ng-pending\", ctx.is(\"pending\"));\n    } }, features: [ɵngcc0.ɵɵInheritDefinitionFeature] });\nNgControlStatus.ctorParameters = () => [\n    { type: NgControl, decorators: [{ type: Self }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgControlStatus, [{\n        type: Directive,\n        args: [{ selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost }]\n    }], function () { return [{ type: NgControl, decorators: [{\n                type: Self\n            }] }]; }, null); })();\n/**\n * @description\n * Directive automatically applied to Angular form groups that sets CSS classes\n * based on control status (valid/invalid/dirty/etc). On groups, this includes the additional\n * class ng-submitted.\n *\n * @see `NgControlStatus`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgControlStatusGroup extends AbstractControlStatus {\n    constructor(cd) {\n        super(cd);\n    }\n}\nNgControlStatusGroup.ɵfac = function NgControlStatusGroup_Factory(t) { return new (t || NgControlStatusGroup)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 10)); };\nNgControlStatusGroup.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgControlStatusGroup, selectors: [[\"\", \"formGroupName\", \"\"], [\"\", \"formArrayName\", \"\"], [\"\", \"ngModelGroup\", \"\"], [\"\", \"formGroup\", \"\"], [\"form\", 3, \"ngNoForm\", \"\"], [\"\", \"ngForm\", \"\"]], hostVars: 16, hostBindings: function NgControlStatusGroup_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵclassProp(\"ng-untouched\", ctx.is(\"untouched\"))(\"ng-touched\", ctx.is(\"touched\"))(\"ng-pristine\", ctx.is(\"pristine\"))(\"ng-dirty\", ctx.is(\"dirty\"))(\"ng-valid\", ctx.is(\"valid\"))(\"ng-invalid\", ctx.is(\"invalid\"))(\"ng-pending\", ctx.is(\"pending\"))(\"ng-submitted\", ctx.is(\"submitted\"));\n    } }, features: [ɵngcc0.ɵɵInheritDefinitionFeature] });\nNgControlStatusGroup.ctorParameters = () => [\n    { type: ControlContainer, decorators: [{ type: Optional }, { type: Self }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgControlStatusGroup, [{\n        type: Directive,\n        args: [{\n                selector: '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',\n                host: ngGroupStatusHost\n            }]\n    }], function () { return [{ type: ControlContainer, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst formControlNameExample = `\n  <div [formGroup]=\"myGroup\">\n    <input formControlName=\"firstName\">\n  </div>\n\n  In your class:\n\n  this.myGroup = new FormGroup({\n      firstName: new FormControl()\n  });`;\nconst formGroupNameExample = `\n  <div [formGroup]=\"myGroup\">\n      <div formGroupName=\"person\">\n        <input formControlName=\"firstName\">\n      </div>\n  </div>\n\n  In your class:\n\n  this.myGroup = new FormGroup({\n      person: new FormGroup({ firstName: new FormControl() })\n  });`;\nconst formArrayNameExample = `\n  <div [formGroup]=\"myGroup\">\n    <div formArrayName=\"cities\">\n      <div *ngFor=\"let city of cityArray.controls; index as i\">\n        <input [formControlName]=\"i\">\n      </div>\n    </div>\n  </div>\n\n  In your class:\n\n  this.cityArray = new FormArray([new FormControl('SF')]);\n  this.myGroup = new FormGroup({\n    cities: this.cityArray\n  });`;\nconst ngModelGroupExample = `\n  <form>\n      <div ngModelGroup=\"person\">\n        <input [(ngModel)]=\"person.name\" name=\"firstName\">\n      </div>\n  </form>`;\nconst ngModelWithFormGroupExample = `\n  <div [formGroup]=\"myGroup\">\n      <input formControlName=\"firstName\">\n      <input [(ngModel)]=\"showMoreControls\" [ngModelOptions]=\"{standalone: true}\">\n  </div>\n`;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction controlParentException() {\n    return new Error(`formControlName must be used with a parent formGroup directive.  You'll want to add a formGroup\n      directive and pass it an existing FormGroup instance (you can create one in your class).\n\n    Example:\n\n    ${formControlNameExample}`);\n}\nfunction ngModelGroupException() {\n    return new Error(`formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n      that also have a \"form\" prefix: formGroupName, formArrayName, or formGroup.\n\n      Option 1:  Update the parent to be formGroupName (reactive form strategy)\n\n      ${formGroupNameExample}\n\n      Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n      ${ngModelGroupExample}`);\n}\nfunction missingFormException() {\n    return new Error(`formGroup expects a FormGroup instance. Please pass one in.\n\n      Example:\n\n      ${formControlNameExample}`);\n}\nfunction groupParentException() {\n    return new Error(`formGroupName must be used with a parent formGroup directive.  You'll want to add a formGroup\n    directive and pass it an existing FormGroup instance (you can create one in your class).\n\n    Example:\n\n    ${formGroupNameExample}`);\n}\nfunction arrayParentException() {\n    return new Error(`formArrayName must be used with a parent formGroup directive.  You'll want to add a formGroup\n      directive and pass it an existing FormGroup instance (you can create one in your class).\n\n      Example:\n\n      ${formArrayNameExample}`);\n}\nconst disabledAttrWarning = `\n  It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n  when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n  you. We recommend using this approach to avoid 'changed after checked' errors.\n\n  Example:\n  form = new FormGroup({\n    first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n    last: new FormControl('Drew', Validators.required)\n  });\n`;\nfunction ngModelWarning(directiveName) {\n    return `\n  It looks like you're using ngModel on the same form field as ${directiveName}.\n  Support for using the ngModel input property and ngModelChange event with\n  reactive form directives has been deprecated in Angular v6 and will be removed\n  in a future version of Angular.\n\n  For more information on this, see our API docs here:\n  https://angular.io/api/forms/${directiveName === 'formControl' ? 'FormControlDirective' : 'FormControlName'}#use-with-ngmodel\n  `;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction controlPath(name, parent) {\n    return [...parent.path, name];\n}\n/**\n * Links a Form control and a Form directive by setting up callbacks (such as `onChange`) on both\n * instances. This function is typically invoked when form directive is being initialized.\n *\n * @param control Form control instance that should be linked.\n * @param dir Directive that should be linked with a given control.\n */\nfunction setUpControl(control, dir) {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        if (!control)\n            _throwError(dir, 'Cannot find control with');\n        if (!dir.valueAccessor)\n            _throwError(dir, 'No value accessor for form control with');\n    }\n    setUpValidators(control, dir);\n    dir.valueAccessor.writeValue(control.value);\n    setUpViewChangePipeline(control, dir);\n    setUpModelChangePipeline(control, dir);\n    setUpBlurPipeline(control, dir);\n    setUpDisabledChangeHandler(control, dir);\n}\n/**\n * Reverts configuration performed by the `setUpControl` control function.\n * Effectively disconnects form control with a given form directive.\n * This function is typically invoked when corresponding form directive is being destroyed.\n *\n * @param control Form control which should be cleaned up.\n * @param dir Directive that should be disconnected from a given control.\n * @param validateControlPresenceOnChange Flag that indicates whether onChange handler should\n *     contain asserts to verify that it's not called once directive is destroyed. We need this flag\n *     to avoid potentially breaking changes caused by better control cleanup introduced in #39235.\n */\nfunction cleanUpControl(control, dir, validateControlPresenceOnChange = true) {\n    const noop = () => {\n        if (validateControlPresenceOnChange && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            _noControlError(dir);\n        }\n    };\n    // The `valueAccessor` field is typically defined on FromControl and FormControlName directive\n    // instances and there is a logic in `selectValueAccessor` function that throws if it's not the\n    // case. We still check the presence of `valueAccessor` before invoking its methods to make sure\n    // that cleanup works correctly if app code or tests are setup to ignore the error thrown from\n    // `selectValueAccessor`. See https://github.com/angular/angular/issues/40521.\n    if (dir.valueAccessor) {\n        dir.valueAccessor.registerOnChange(noop);\n        dir.valueAccessor.registerOnTouched(noop);\n    }\n    cleanUpValidators(control, dir);\n    if (control) {\n        dir._invokeOnDestroyCallbacks();\n        control._registerOnCollectionChange(() => { });\n    }\n}\nfunction registerOnValidatorChange(validators, onChange) {\n    validators.forEach((validator) => {\n        if (validator.registerOnValidatorChange)\n            validator.registerOnValidatorChange(onChange);\n    });\n}\n/**\n * Sets up disabled change handler function on a given form control if ControlValueAccessor\n * associated with a given directive instance supports the `setDisabledState` call.\n *\n * @param control Form control where disabled change handler should be setup.\n * @param dir Corresponding directive instance associated with this control.\n */\nfunction setUpDisabledChangeHandler(control, dir) {\n    if (dir.valueAccessor.setDisabledState) {\n        const onDisabledChange = (isDisabled) => {\n            dir.valueAccessor.setDisabledState(isDisabled);\n        };\n        control.registerOnDisabledChange(onDisabledChange);\n        // Register a callback function to cleanup disabled change handler\n        // from a control instance when a directive is destroyed.\n        dir._registerOnDestroy(() => {\n            control._unregisterOnDisabledChange(onDisabledChange);\n        });\n    }\n}\n/**\n * Sets up sync and async directive validators on provided form control.\n * This function merges validators from the directive into the validators of the control.\n *\n * @param control Form control where directive validators should be setup.\n * @param dir Directive instance that contains validators to be setup.\n */\nfunction setUpValidators(control, dir) {\n    const validators = getControlValidators(control);\n    if (dir.validator !== null) {\n        control.setValidators(mergeValidators(validators, dir.validator));\n    }\n    else if (typeof validators === 'function') {\n        // If sync validators are represented by a single validator function, we force the\n        // `Validators.compose` call to happen by executing the `setValidators` function with\n        // an array that contains that function. We need this to avoid possible discrepancies in\n        // validators behavior, so sync validators are always processed by the `Validators.compose`.\n        // Note: we should consider moving this logic inside the `setValidators` function itself, so we\n        // have consistent behavior on AbstractControl API level. The same applies to the async\n        // validators logic below.\n        control.setValidators([validators]);\n    }\n    const asyncValidators = getControlAsyncValidators(control);\n    if (dir.asyncValidator !== null) {\n        control.setAsyncValidators(mergeValidators(asyncValidators, dir.asyncValidator));\n    }\n    else if (typeof asyncValidators === 'function') {\n        control.setAsyncValidators([asyncValidators]);\n    }\n    // Re-run validation when validator binding changes, e.g. minlength=3 -> minlength=4\n    const onValidatorChange = () => control.updateValueAndValidity();\n    registerOnValidatorChange(dir._rawValidators, onValidatorChange);\n    registerOnValidatorChange(dir._rawAsyncValidators, onValidatorChange);\n}\n/**\n * Cleans up sync and async directive validators on provided form control.\n * This function reverts the setup performed by the `setUpValidators` function, i.e.\n * removes directive-specific validators from a given control instance.\n *\n * @param control Form control from where directive validators should be removed.\n * @param dir Directive instance that contains validators to be removed.\n * @returns true if a control was updated as a result of this action.\n */\nfunction cleanUpValidators(control, dir) {\n    let isControlUpdated = false;\n    if (control !== null) {\n        if (dir.validator !== null) {\n            const validators = getControlValidators(control);\n            if (Array.isArray(validators) && validators.length > 0) {\n                // Filter out directive validator function.\n                const updatedValidators = validators.filter(validator => validator !== dir.validator);\n                if (updatedValidators.length !== validators.length) {\n                    isControlUpdated = true;\n                    control.setValidators(updatedValidators);\n                }\n            }\n        }\n        if (dir.asyncValidator !== null) {\n            const asyncValidators = getControlAsyncValidators(control);\n            if (Array.isArray(asyncValidators) && asyncValidators.length > 0) {\n                // Filter out directive async validator function.\n                const updatedAsyncValidators = asyncValidators.filter(asyncValidator => asyncValidator !== dir.asyncValidator);\n                if (updatedAsyncValidators.length !== asyncValidators.length) {\n                    isControlUpdated = true;\n                    control.setAsyncValidators(updatedAsyncValidators);\n                }\n            }\n        }\n    }\n    // Clear onValidatorChange callbacks by providing a noop function.\n    const noop = () => { };\n    registerOnValidatorChange(dir._rawValidators, noop);\n    registerOnValidatorChange(dir._rawAsyncValidators, noop);\n    return isControlUpdated;\n}\nfunction setUpViewChangePipeline(control, dir) {\n    dir.valueAccessor.registerOnChange((newValue) => {\n        control._pendingValue = newValue;\n        control._pendingChange = true;\n        control._pendingDirty = true;\n        if (control.updateOn === 'change')\n            updateControl(control, dir);\n    });\n}\nfunction setUpBlurPipeline(control, dir) {\n    dir.valueAccessor.registerOnTouched(() => {\n        control._pendingTouched = true;\n        if (control.updateOn === 'blur' && control._pendingChange)\n            updateControl(control, dir);\n        if (control.updateOn !== 'submit')\n            control.markAsTouched();\n    });\n}\nfunction updateControl(control, dir) {\n    if (control._pendingDirty)\n        control.markAsDirty();\n    control.setValue(control._pendingValue, { emitModelToViewChange: false });\n    dir.viewToModelUpdate(control._pendingValue);\n    control._pendingChange = false;\n}\nfunction setUpModelChangePipeline(control, dir) {\n    const onChange = (newValue, emitModelEvent) => {\n        // control -> view\n        dir.valueAccessor.writeValue(newValue);\n        // control -> ngModel\n        if (emitModelEvent)\n            dir.viewToModelUpdate(newValue);\n    };\n    control.registerOnChange(onChange);\n    // Register a callback function to cleanup onChange handler\n    // from a control instance when a directive is destroyed.\n    dir._registerOnDestroy(() => {\n        control._unregisterOnChange(onChange);\n    });\n}\n/**\n * Links a FormGroup or FormArray instance and corresponding Form directive by setting up validators\n * present in the view.\n *\n * @param control FormGroup or FormArray instance that should be linked.\n * @param dir Directive that provides view validators.\n */\nfunction setUpFormContainer(control, dir) {\n    if (control == null && (typeof ngDevMode === 'undefined' || ngDevMode))\n        _throwError(dir, 'Cannot find control with');\n    setUpValidators(control, dir);\n}\n/**\n * Reverts the setup performed by the `setUpFormContainer` function.\n *\n * @param control FormGroup or FormArray instance that should be cleaned up.\n * @param dir Directive that provided view validators.\n * @returns true if a control was updated as a result of this action.\n */\nfunction cleanUpFormContainer(control, dir) {\n    return cleanUpValidators(control, dir);\n}\nfunction _noControlError(dir) {\n    return _throwError(dir, 'There is no FormControl instance attached to form control element with');\n}\nfunction _throwError(dir, message) {\n    let messageEnd;\n    if (dir.path.length > 1) {\n        messageEnd = `path: '${dir.path.join(' -> ')}'`;\n    }\n    else if (dir.path[0]) {\n        messageEnd = `name: '${dir.path}'`;\n    }\n    else {\n        messageEnd = 'unspecified name attribute';\n    }\n    throw new Error(`${message} ${messageEnd}`);\n}\nfunction isPropertyUpdated(changes, viewModel) {\n    if (!changes.hasOwnProperty('model'))\n        return false;\n    const change = changes['model'];\n    if (change.isFirstChange())\n        return true;\n    return !Object.is(viewModel, change.currentValue);\n}\nfunction isBuiltInAccessor(valueAccessor) {\n    // Check if a given value accessor is an instance of a class that directly extends\n    // `BuiltInControlValueAccessor` one.\n    return Object.getPrototypeOf(valueAccessor.constructor) === BuiltInControlValueAccessor;\n}\nfunction syncPendingControls(form, directives) {\n    form._syncPendingControls();\n    directives.forEach(dir => {\n        const control = dir.control;\n        if (control.updateOn === 'submit' && control._pendingChange) {\n            dir.viewToModelUpdate(control._pendingValue);\n            control._pendingChange = false;\n        }\n    });\n}\n// TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented\nfunction selectValueAccessor(dir, valueAccessors) {\n    if (!valueAccessors)\n        return null;\n    if (!Array.isArray(valueAccessors) && (typeof ngDevMode === 'undefined' || ngDevMode))\n        _throwError(dir, 'Value accessor was not provided as an array for form control with');\n    let defaultAccessor = undefined;\n    let builtinAccessor = undefined;\n    let customAccessor = undefined;\n    valueAccessors.forEach((v) => {\n        if (v.constructor === DefaultValueAccessor) {\n            defaultAccessor = v;\n        }\n        else if (isBuiltInAccessor(v)) {\n            if (builtinAccessor && (typeof ngDevMode === 'undefined' || ngDevMode))\n                _throwError(dir, 'More than one built-in value accessor matches form control with');\n            builtinAccessor = v;\n        }\n        else {\n            if (customAccessor && (typeof ngDevMode === 'undefined' || ngDevMode))\n                _throwError(dir, 'More than one custom value accessor matches form control with');\n            customAccessor = v;\n        }\n    });\n    if (customAccessor)\n        return customAccessor;\n    if (builtinAccessor)\n        return builtinAccessor;\n    if (defaultAccessor)\n        return defaultAccessor;\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        _throwError(dir, 'No valid value accessor for form control with');\n    }\n    return null;\n}\nfunction removeListItem(list, el) {\n    const index = list.indexOf(el);\n    if (index > -1)\n        list.splice(index, 1);\n}\n// TODO(kara): remove after deprecation period\nfunction _ngModelWarning(name, type, instance, warningConfig) {\n    if (warningConfig === 'never')\n        return;\n    if (((warningConfig === null || warningConfig === 'once') && !type._ngModelWarningSentOnce) ||\n        (warningConfig === 'always' && !instance._ngModelWarningSent)) {\n        console.warn(ngModelWarning(name));\n        type._ngModelWarningSentOnce = true;\n        instance._ngModelWarningSent = true;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Reports that a FormControl is valid, meaning that no errors exist in the input value.\n *\n * @see `status`\n */\nconst VALID = 'VALID';\n/**\n * Reports that a FormControl is invalid, meaning that an error exists in the input value.\n *\n * @see `status`\n */\nconst INVALID = 'INVALID';\n/**\n * Reports that a FormControl is pending, meaning that that async validation is occurring and\n * errors are not yet available for the input value.\n *\n * @see `markAsPending`\n * @see `status`\n */\nconst PENDING = 'PENDING';\n/**\n * Reports that a FormControl is disabled, meaning that the control is exempt from ancestor\n * calculations of validity or value.\n *\n * @see `markAsDisabled`\n * @see `status`\n */\nconst DISABLED = 'DISABLED';\nfunction _find(control, path, delimiter) {\n    if (path == null)\n        return null;\n    if (!Array.isArray(path)) {\n        path = path.split(delimiter);\n    }\n    if (Array.isArray(path) && path.length === 0)\n        return null;\n    // Not using Array.reduce here due to a Chrome 80 bug\n    // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\n    let controlToFind = control;\n    path.forEach((name) => {\n        if (controlToFind instanceof FormGroup) {\n            controlToFind = controlToFind.controls.hasOwnProperty(name) ?\n                controlToFind.controls[name] :\n                null;\n        }\n        else if (controlToFind instanceof FormArray) {\n            controlToFind = controlToFind.at(name) || null;\n        }\n        else {\n            controlToFind = null;\n        }\n    });\n    return controlToFind;\n}\n/**\n * Gets validators from either an options object or given validators.\n */\nfunction pickValidators(validatorOrOpts) {\n    return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.validators : validatorOrOpts) || null;\n}\n/**\n * Creates validator function by combining provided validators.\n */\nfunction coerceToValidator(validator) {\n    return Array.isArray(validator) ? composeValidators(validator) : validator || null;\n}\n/**\n * Gets async validators from either an options object or given validators.\n */\nfunction pickAsyncValidators(asyncValidator, validatorOrOpts) {\n    return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.asyncValidators : asyncValidator) || null;\n}\n/**\n * Creates async validator function by combining provided async validators.\n */\nfunction coerceToAsyncValidator(asyncValidator) {\n    return Array.isArray(asyncValidator) ? composeAsyncValidators(asyncValidator) :\n        asyncValidator || null;\n}\nfunction isOptionsObj(validatorOrOpts) {\n    return validatorOrOpts != null && !Array.isArray(validatorOrOpts) &&\n        typeof validatorOrOpts === 'object';\n}\n/**\n * This is the base class for `FormControl`, `FormGroup`, and `FormArray`.\n *\n * It provides some of the shared behavior that all controls and groups of controls have, like\n * running validators, calculating status, and resetting state. It also defines the properties\n * that are shared between all sub-classes, like `value`, `valid`, and `dirty`. It shouldn't be\n * instantiated directly.\n *\n * @see [Forms Guide](/guide/forms)\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n * @see [Dynamic Forms Guide](/guide/dynamic-form)\n *\n * @publicApi\n */\nclass AbstractControl {\n    /**\n     * Initialize the AbstractControl instance.\n     *\n     * @param validators The function or array of functions that is used to determine the validity of\n     *     this control synchronously.\n     * @param asyncValidators The function or array of functions that is used to determine validity of\n     *     this control asynchronously.\n     */\n    constructor(validators, asyncValidators) {\n        /**\n         * Indicates that a control has its own pending asynchronous validation in progress.\n         *\n         * @internal\n         */\n        this._hasOwnPendingAsyncValidator = false;\n        /** @internal */\n        this._onCollectionChange = () => { };\n        this._parent = null;\n        /**\n         * A control is `pristine` if the user has not yet changed\n         * the value in the UI.\n         *\n         * @returns True if the user has not yet changed the value in the UI; compare `dirty`.\n         * Programmatic changes to a control's value do not mark it dirty.\n         */\n        this.pristine = true;\n        /**\n         * True if the control is marked as `touched`.\n         *\n         * A control is marked `touched` once the user has triggered\n         * a `blur` event on it.\n         */\n        this.touched = false;\n        /** @internal */\n        this._onDisabledChange = [];\n        this._rawValidators = validators;\n        this._rawAsyncValidators = asyncValidators;\n        this._composedValidatorFn = coerceToValidator(this._rawValidators);\n        this._composedAsyncValidatorFn = coerceToAsyncValidator(this._rawAsyncValidators);\n    }\n    /**\n     * Returns the function that is used to determine the validity of this control synchronously.\n     * If multiple validators have been added, this will be a single composed function.\n     * See `Validators.compose()` for additional information.\n     */\n    get validator() {\n        return this._composedValidatorFn;\n    }\n    set validator(validatorFn) {\n        this._rawValidators = this._composedValidatorFn = validatorFn;\n    }\n    /**\n     * Returns the function that is used to determine the validity of this control asynchronously.\n     * If multiple validators have been added, this will be a single composed function.\n     * See `Validators.compose()` for additional information.\n     */\n    get asyncValidator() {\n        return this._composedAsyncValidatorFn;\n    }\n    set asyncValidator(asyncValidatorFn) {\n        this._rawAsyncValidators = this._composedAsyncValidatorFn = asyncValidatorFn;\n    }\n    /**\n     * The parent control.\n     */\n    get parent() {\n        return this._parent;\n    }\n    /**\n     * A control is `valid` when its `status` is `VALID`.\n     *\n     * @see {@link AbstractControl.status}\n     *\n     * @returns True if the control has passed all of its validation tests,\n     * false otherwise.\n     */\n    get valid() {\n        return this.status === VALID;\n    }\n    /**\n     * A control is `invalid` when its `status` is `INVALID`.\n     *\n     * @see {@link AbstractControl.status}\n     *\n     * @returns True if this control has failed one or more of its validation checks,\n     * false otherwise.\n     */\n    get invalid() {\n        return this.status === INVALID;\n    }\n    /**\n     * A control is `pending` when its `status` is `PENDING`.\n     *\n     * @see {@link AbstractControl.status}\n     *\n     * @returns True if this control is in the process of conducting a validation check,\n     * false otherwise.\n     */\n    get pending() {\n        return this.status == PENDING;\n    }\n    /**\n     * A control is `disabled` when its `status` is `DISABLED`.\n     *\n     * Disabled controls are exempt from validation checks and\n     * are not included in the aggregate value of their ancestor\n     * controls.\n     *\n     * @see {@link AbstractControl.status}\n     *\n     * @returns True if the control is disabled, false otherwise.\n     */\n    get disabled() {\n        return this.status === DISABLED;\n    }\n    /**\n     * A control is `enabled` as long as its `status` is not `DISABLED`.\n     *\n     * @returns True if the control has any status other than 'DISABLED',\n     * false if the status is 'DISABLED'.\n     *\n     * @see {@link AbstractControl.status}\n     *\n     */\n    get enabled() {\n        return this.status !== DISABLED;\n    }\n    /**\n     * A control is `dirty` if the user has changed the value\n     * in the UI.\n     *\n     * @returns True if the user has changed the value of this control in the UI; compare `pristine`.\n     * Programmatic changes to a control's value do not mark it dirty.\n     */\n    get dirty() {\n        return !this.pristine;\n    }\n    /**\n     * True if the control has not been marked as touched\n     *\n     * A control is `untouched` if the user has not yet triggered\n     * a `blur` event on it.\n     */\n    get untouched() {\n        return !this.touched;\n    }\n    /**\n     * Reports the update strategy of the `AbstractControl` (meaning\n     * the event on which the control updates itself).\n     * Possible values: `'change'` | `'blur'` | `'submit'`\n     * Default value: `'change'`\n     */\n    get updateOn() {\n        return this._updateOn ? this._updateOn : (this.parent ? this.parent.updateOn : 'change');\n    }\n    /**\n     * Sets the synchronous validators that are active on this control.  Calling\n     * this overwrites any existing synchronous validators.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     * If you want to add a new validator without affecting existing ones, consider\n     * using `addValidators()` method instead.\n     */\n    setValidators(validators) {\n        this._rawValidators = validators;\n        this._composedValidatorFn = coerceToValidator(validators);\n    }\n    /**\n     * Sets the asynchronous validators that are active on this control. Calling this\n     * overwrites any existing asynchronous validators.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     * If you want to add a new validator without affecting existing ones, consider\n     * using `addAsyncValidators()` method instead.\n     */\n    setAsyncValidators(validators) {\n        this._rawAsyncValidators = validators;\n        this._composedAsyncValidatorFn = coerceToAsyncValidator(validators);\n    }\n    /**\n     * Add a synchronous validator or validators to this control, without affecting other validators.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     * Adding a validator that already exists will have no effect. If duplicate validator functions\n     * are present in the `validators` array, only the first instance would be added to a form\n     * control.\n     *\n     * @param validators The new validator function or functions to add to this control.\n     */\n    addValidators(validators) {\n        this.setValidators(addValidators(validators, this._rawValidators));\n    }\n    /**\n     * Add an asynchronous validator or validators to this control, without affecting other\n     * validators.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     * Adding a validator that already exists will have no effect.\n     *\n     * @param validators The new asynchronous validator function or functions to add to this control.\n     */\n    addAsyncValidators(validators) {\n        this.setAsyncValidators(addValidators(validators, this._rawAsyncValidators));\n    }\n    /**\n     * Remove a synchronous validator from this control, without affecting other validators.\n     * Validators are compared by function reference; you must pass a reference to the exact same\n     * validator function as the one that was originally set. If a provided validator is not found,\n     * it is ignored.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     * @param validators The validator or validators to remove.\n     */\n    removeValidators(validators) {\n        this.setValidators(removeValidators(validators, this._rawValidators));\n    }\n    /**\n     * Remove an asynchronous validator from this control, without affecting other validators.\n     * Validators are compared by function reference; you must pass a reference to the exact same\n     * validator function as the one that was originally set. If a provided validator is not found, it\n     * is ignored.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     * @param validators The asynchronous validator or validators to remove.\n     */\n    removeAsyncValidators(validators) {\n        this.setAsyncValidators(removeValidators(validators, this._rawAsyncValidators));\n    }\n    /**\n     * Check whether a synchronous validator function is present on this control. The provided\n     * validator must be a reference to the exact same function that was provided.\n     *\n     * @param validator The validator to check for presence. Compared by function reference.\n     * @returns Whether the provided validator was found on this control.\n     */\n    hasValidator(validator) {\n        return hasValidator(this._rawValidators, validator);\n    }\n    /**\n     * Check whether an asynchronous validator function is present on this control. The provided\n     * validator must be a reference to the exact same function that was provided.\n     *\n     * @param validator The asynchronous validator to check for presence. Compared by function\n     *     reference.\n     * @returns Whether the provided asynchronous validator was found on this control.\n     */\n    hasAsyncValidator(validator) {\n        return hasValidator(this._rawAsyncValidators, validator);\n    }\n    /**\n     * Empties out the synchronous validator list.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     */\n    clearValidators() {\n        this.validator = null;\n    }\n    /**\n     * Empties out the async validator list.\n     *\n     * When you add or remove a validator at run time, you must call\n     * `updateValueAndValidity()` for the new validation to take effect.\n     *\n     */\n    clearAsyncValidators() {\n        this.asyncValidator = null;\n    }\n    /**\n     * Marks the control as `touched`. A control is touched by focus and\n     * blur events that do not change the value.\n     *\n     * @see `markAsUntouched()`\n     * @see `markAsDirty()`\n     * @see `markAsPristine()`\n     *\n     * @param opts Configuration options that determine how the control propagates changes\n     * and emits events after marking is applied.\n     * * `onlySelf`: When true, mark only this control. When false or not supplied,\n     * marks all direct ancestors. Default is false.\n     */\n    markAsTouched(opts = {}) {\n        this.touched = true;\n        if (this._parent && !opts.onlySelf) {\n            this._parent.markAsTouched(opts);\n        }\n    }\n    /**\n     * Marks the control and all its descendant controls as `touched`.\n     * @see `markAsTouched()`\n     */\n    markAllAsTouched() {\n        this.markAsTouched({ onlySelf: true });\n        this._forEachChild((control) => control.markAllAsTouched());\n    }\n    /**\n     * Marks the control as `untouched`.\n     *\n     * If the control has any children, also marks all children as `untouched`\n     * and recalculates the `touched` status of all parent controls.\n     *\n     * @see `markAsTouched()`\n     * @see `markAsDirty()`\n     * @see `markAsPristine()`\n     *\n     * @param opts Configuration options that determine how the control propagates changes\n     * and emits events after the marking is applied.\n     * * `onlySelf`: When true, mark only this control. When false or not supplied,\n     * marks all direct ancestors. Default is false.\n     */\n    markAsUntouched(opts = {}) {\n        this.touched = false;\n        this._pendingTouched = false;\n        this._forEachChild((control) => {\n            control.markAsUntouched({ onlySelf: true });\n        });\n        if (this._parent && !opts.onlySelf) {\n            this._parent._updateTouched(opts);\n        }\n    }\n    /**\n     * Marks the control as `dirty`. A control becomes dirty when\n     * the control's value is changed through the UI; compare `markAsTouched`.\n     *\n     * @see `markAsTouched()`\n     * @see `markAsUntouched()`\n     * @see `markAsPristine()`\n     *\n     * @param opts Configuration options that determine how the control propagates changes\n     * and emits events after marking is applied.\n     * * `onlySelf`: When true, mark only this control. When false or not supplied,\n     * marks all direct ancestors. Default is false.\n     */\n    markAsDirty(opts = {}) {\n        this.pristine = false;\n        if (this._parent && !opts.onlySelf) {\n            this._parent.markAsDirty(opts);\n        }\n    }\n    /**\n     * Marks the control as `pristine`.\n     *\n     * If the control has any children, marks all children as `pristine`,\n     * and recalculates the `pristine` status of all parent\n     * controls.\n     *\n     * @see `markAsTouched()`\n     * @see `markAsUntouched()`\n     * @see `markAsDirty()`\n     *\n     * @param opts Configuration options that determine how the control emits events after\n     * marking is applied.\n     * * `onlySelf`: When true, mark only this control. When false or not supplied,\n     * marks all direct ancestors. Default is false.\n     */\n    markAsPristine(opts = {}) {\n        this.pristine = true;\n        this._pendingDirty = false;\n        this._forEachChild((control) => {\n            control.markAsPristine({ onlySelf: true });\n        });\n        if (this._parent && !opts.onlySelf) {\n            this._parent._updatePristine(opts);\n        }\n    }\n    /**\n     * Marks the control as `pending`.\n     *\n     * A control is pending while the control performs async validation.\n     *\n     * @see {@link AbstractControl.status}\n     *\n     * @param opts Configuration options that determine how the control propagates changes and\n     * emits events after marking is applied.\n     * * `onlySelf`: When true, mark only this control. When false or not supplied,\n     * marks all direct ancestors. Default is false.\n     * * `emitEvent`: When true or not supplied (the default), the `statusChanges`\n     * observable emits an event with the latest status the control is marked pending.\n     * When false, no events are emitted.\n     *\n     */\n    markAsPending(opts = {}) {\n        this.status = PENDING;\n        if (opts.emitEvent !== false) {\n            this.statusChanges.emit(this.status);\n        }\n        if (this._parent && !opts.onlySelf) {\n            this._parent.markAsPending(opts);\n        }\n    }\n    /**\n     * Disables the control. This means the control is exempt from validation checks and\n     * excluded from the aggregate value of any parent. Its status is `DISABLED`.\n     *\n     * If the control has children, all children are also disabled.\n     *\n     * @see {@link AbstractControl.status}\n     *\n     * @param opts Configuration options that determine how the control propagates\n     * changes and emits events after the control is disabled.\n     * * `onlySelf`: When true, mark only this control. When false or not supplied,\n     * marks all direct ancestors. Default is false.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges`\n     * observables emit events with the latest status and value when the control is disabled.\n     * When false, no events are emitted.\n     */\n    disable(opts = {}) {\n        // If parent has been marked artificially dirty we don't want to re-calculate the\n        // parent's dirtiness based on the children.\n        const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n        this.status = DISABLED;\n        this.errors = null;\n        this._forEachChild((control) => {\n            control.disable(Object.assign(Object.assign({}, opts), { onlySelf: true }));\n        });\n        this._updateValue();\n        if (opts.emitEvent !== false) {\n            this.valueChanges.emit(this.value);\n            this.statusChanges.emit(this.status);\n        }\n        this._updateAncestors(Object.assign(Object.assign({}, opts), { skipPristineCheck }));\n        this._onDisabledChange.forEach((changeFn) => changeFn(true));\n    }\n    /**\n     * Enables the control. This means the control is included in validation checks and\n     * the aggregate value of its parent. Its status recalculates based on its value and\n     * its validators.\n     *\n     * By default, if the control has children, all children are enabled.\n     *\n     * @see {@link AbstractControl.status}\n     *\n     * @param opts Configure options that control how the control propagates changes and\n     * emits events when marked as untouched\n     * * `onlySelf`: When true, mark only this control. When false or not supplied,\n     * marks all direct ancestors. Default is false.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges`\n     * observables emit events with the latest status and value when the control is enabled.\n     * When false, no events are emitted.\n     */\n    enable(opts = {}) {\n        // If parent has been marked artificially dirty we don't want to re-calculate the\n        // parent's dirtiness based on the children.\n        const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n        this.status = VALID;\n        this._forEachChild((control) => {\n            control.enable(Object.assign(Object.assign({}, opts), { onlySelf: true }));\n        });\n        this.updateValueAndValidity({ onlySelf: true, emitEvent: opts.emitEvent });\n        this._updateAncestors(Object.assign(Object.assign({}, opts), { skipPristineCheck }));\n        this._onDisabledChange.forEach((changeFn) => changeFn(false));\n    }\n    _updateAncestors(opts) {\n        if (this._parent && !opts.onlySelf) {\n            this._parent.updateValueAndValidity(opts);\n            if (!opts.skipPristineCheck) {\n                this._parent._updatePristine();\n            }\n            this._parent._updateTouched();\n        }\n    }\n    /**\n     * @param parent Sets the parent of the control\n     */\n    setParent(parent) {\n        this._parent = parent;\n    }\n    /**\n     * Recalculates the value and validation status of the control.\n     *\n     * By default, it also updates the value and validity of its ancestors.\n     *\n     * @param opts Configuration options determine how the control propagates changes and emits events\n     * after updates and validity checks are applied.\n     * * `onlySelf`: When true, only update this control. When false or not supplied,\n     * update all direct ancestors. Default is false.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges`\n     * observables emit events with the latest status and value when the control is updated.\n     * When false, no events are emitted.\n     */\n    updateValueAndValidity(opts = {}) {\n        this._setInitialStatus();\n        this._updateValue();\n        if (this.enabled) {\n            this._cancelExistingSubscription();\n            this.errors = this._runValidator();\n            this.status = this._calculateStatus();\n            if (this.status === VALID || this.status === PENDING) {\n                this._runAsyncValidator(opts.emitEvent);\n            }\n        }\n        if (opts.emitEvent !== false) {\n            this.valueChanges.emit(this.value);\n            this.statusChanges.emit(this.status);\n        }\n        if (this._parent && !opts.onlySelf) {\n            this._parent.updateValueAndValidity(opts);\n        }\n    }\n    /** @internal */\n    _updateTreeValidity(opts = { emitEvent: true }) {\n        this._forEachChild((ctrl) => ctrl._updateTreeValidity(opts));\n        this.updateValueAndValidity({ onlySelf: true, emitEvent: opts.emitEvent });\n    }\n    _setInitialStatus() {\n        this.status = this._allControlsDisabled() ? DISABLED : VALID;\n    }\n    _runValidator() {\n        return this.validator ? this.validator(this) : null;\n    }\n    _runAsyncValidator(emitEvent) {\n        if (this.asyncValidator) {\n            this.status = PENDING;\n            this._hasOwnPendingAsyncValidator = true;\n            const obs = toObservable(this.asyncValidator(this));\n            this._asyncValidationSubscription = obs.subscribe((errors) => {\n                this._hasOwnPendingAsyncValidator = false;\n                // This will trigger the recalculation of the validation status, which depends on\n                // the state of the asynchronous validation (whether it is in progress or not). So, it is\n                // necessary that we have updated the `_hasOwnPendingAsyncValidator` boolean flag first.\n                this.setErrors(errors, { emitEvent });\n            });\n        }\n    }\n    _cancelExistingSubscription() {\n        if (this._asyncValidationSubscription) {\n            this._asyncValidationSubscription.unsubscribe();\n            this._hasOwnPendingAsyncValidator = false;\n        }\n    }\n    /**\n     * Sets errors on a form control when running validations manually, rather than automatically.\n     *\n     * Calling `setErrors` also updates the validity of the parent control.\n     *\n     * @usageNotes\n     *\n     * ### Manually set the errors for a control\n     *\n     * ```\n     * const login = new FormControl('someLogin');\n     * login.setErrors({\n     *   notUnique: true\n     * });\n     *\n     * expect(login.valid).toEqual(false);\n     * expect(login.errors).toEqual({ notUnique: true });\n     *\n     * login.setValue('someOtherLogin');\n     *\n     * expect(login.valid).toEqual(true);\n     * ```\n     */\n    setErrors(errors, opts = {}) {\n        this.errors = errors;\n        this._updateControlsErrors(opts.emitEvent !== false);\n    }\n    /**\n     * Retrieves a child control given the control's name or path.\n     *\n     * @param path A dot-delimited string or array of string/number values that define the path to the\n     * control.\n     *\n     * @usageNotes\n     * ### Retrieve a nested control\n     *\n     * For example, to get a `name` control nested within a `person` sub-group:\n     *\n     * * `this.form.get('person.name');`\n     *\n     * -OR-\n     *\n     * * `this.form.get(['person', 'name']);`\n     *\n     * ### Retrieve a control in a FormArray\n     *\n     * When accessing an element inside a FormArray, you can use an element index.\n     * For example, to get a `price` control from the first element in an `items` array you can use:\n     *\n     * * `this.form.get('items.0.price');`\n     *\n     * -OR-\n     *\n     * * `this.form.get(['items', 0, 'price']);`\n     */\n    get(path) {\n        return _find(this, path, '.');\n    }\n    /**\n     * @description\n     * Reports error data for the control with the given path.\n     *\n     * @param errorCode The code of the error to check\n     * @param path A list of control names that designates how to move from the current control\n     * to the control that should be queried for errors.\n     *\n     * @usageNotes\n     * For example, for the following `FormGroup`:\n     *\n     * ```\n     * form = new FormGroup({\n     *   address: new FormGroup({ street: new FormControl() })\n     * });\n     * ```\n     *\n     * The path to the 'street' control from the root form would be 'address' -> 'street'.\n     *\n     * It can be provided to this method in one of two formats:\n     *\n     * 1. An array of string control names, e.g. `['address', 'street']`\n     * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n     *\n     * @returns error data for that particular error. If the control or error is not present,\n     * null is returned.\n     */\n    getError(errorCode, path) {\n        const control = path ? this.get(path) : this;\n        return control && control.errors ? control.errors[errorCode] : null;\n    }\n    /**\n     * @description\n     * Reports whether the control with the given path has the error specified.\n     *\n     * @param errorCode The code of the error to check\n     * @param path A list of control names that designates how to move from the current control\n     * to the control that should be queried for errors.\n     *\n     * @usageNotes\n     * For example, for the following `FormGroup`:\n     *\n     * ```\n     * form = new FormGroup({\n     *   address: new FormGroup({ street: new FormControl() })\n     * });\n     * ```\n     *\n     * The path to the 'street' control from the root form would be 'address' -> 'street'.\n     *\n     * It can be provided to this method in one of two formats:\n     *\n     * 1. An array of string control names, e.g. `['address', 'street']`\n     * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n     *\n     * If no path is given, this method checks for the error on the current control.\n     *\n     * @returns whether the given error is present in the control at the given path.\n     *\n     * If the control is not present, false is returned.\n     */\n    hasError(errorCode, path) {\n        return !!this.getError(errorCode, path);\n    }\n    /**\n     * Retrieves the top-level ancestor of this control.\n     */\n    get root() {\n        let x = this;\n        while (x._parent) {\n            x = x._parent;\n        }\n        return x;\n    }\n    /** @internal */\n    _updateControlsErrors(emitEvent) {\n        this.status = this._calculateStatus();\n        if (emitEvent) {\n            this.statusChanges.emit(this.status);\n        }\n        if (this._parent) {\n            this._parent._updateControlsErrors(emitEvent);\n        }\n    }\n    /** @internal */\n    _initObservables() {\n        this.valueChanges = new EventEmitter();\n        this.statusChanges = new EventEmitter();\n    }\n    _calculateStatus() {\n        if (this._allControlsDisabled())\n            return DISABLED;\n        if (this.errors)\n            return INVALID;\n        if (this._hasOwnPendingAsyncValidator || this._anyControlsHaveStatus(PENDING))\n            return PENDING;\n        if (this._anyControlsHaveStatus(INVALID))\n            return INVALID;\n        return VALID;\n    }\n    /** @internal */\n    _anyControlsHaveStatus(status) {\n        return this._anyControls((control) => control.status === status);\n    }\n    /** @internal */\n    _anyControlsDirty() {\n        return this._anyControls((control) => control.dirty);\n    }\n    /** @internal */\n    _anyControlsTouched() {\n        return this._anyControls((control) => control.touched);\n    }\n    /** @internal */\n    _updatePristine(opts = {}) {\n        this.pristine = !this._anyControlsDirty();\n        if (this._parent && !opts.onlySelf) {\n            this._parent._updatePristine(opts);\n        }\n    }\n    /** @internal */\n    _updateTouched(opts = {}) {\n        this.touched = this._anyControlsTouched();\n        if (this._parent && !opts.onlySelf) {\n            this._parent._updateTouched(opts);\n        }\n    }\n    /** @internal */\n    _isBoxedValue(formState) {\n        return typeof formState === 'object' && formState !== null &&\n            Object.keys(formState).length === 2 && 'value' in formState && 'disabled' in formState;\n    }\n    /** @internal */\n    _registerOnCollectionChange(fn) {\n        this._onCollectionChange = fn;\n    }\n    /** @internal */\n    _setUpdateStrategy(opts) {\n        if (isOptionsObj(opts) && opts.updateOn != null) {\n            this._updateOn = opts.updateOn;\n        }\n    }\n    /**\n     * Check to see if parent has been marked artificially dirty.\n     *\n     * @internal\n     */\n    _parentMarkedDirty(onlySelf) {\n        const parentDirty = this._parent && this._parent.dirty;\n        return !onlySelf && !!parentDirty && !this._parent._anyControlsDirty();\n    }\n}\n/**\n * Tracks the value and validation status of an individual form control.\n *\n * This is one of the three fundamental building blocks of Angular forms, along with\n * `FormGroup` and `FormArray`. It extends the `AbstractControl` class that\n * implements most of the base functionality for accessing the value, validation status,\n * user interactions and events. See [usage examples below](#usage-notes).\n *\n * @see `AbstractControl`\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see [Usage Notes](#usage-notes)\n *\n * @usageNotes\n *\n * ### Initializing Form Controls\n *\n * Instantiate a `FormControl`, with an initial value.\n *\n * ```ts\n * const control = new FormControl('some value');\n * console.log(control.value);     // 'some value'\n *```\n *\n * The following example initializes the control with a form state object. The `value`\n * and `disabled` keys are required in this case.\n *\n * ```ts\n * const control = new FormControl({ value: 'n/a', disabled: true });\n * console.log(control.value);     // 'n/a'\n * console.log(control.status);    // 'DISABLED'\n * ```\n *\n * The following example initializes the control with a synchronous validator.\n *\n * ```ts\n * const control = new FormControl('', Validators.required);\n * console.log(control.value);      // ''\n * console.log(control.status);     // 'INVALID'\n * ```\n *\n * The following example initializes the control using an options object.\n *\n * ```ts\n * const control = new FormControl('', {\n *    validators: Validators.required,\n *    asyncValidators: myAsyncValidator\n * });\n * ```\n *\n * ### Configure the control to update on a blur event\n *\n * Set the `updateOn` option to `'blur'` to update on the blur `event`.\n *\n * ```ts\n * const control = new FormControl('', { updateOn: 'blur' });\n * ```\n *\n * ### Configure the control to update on a submit event\n *\n * Set the `updateOn` option to `'submit'` to update on a submit `event`.\n *\n * ```ts\n * const control = new FormControl('', { updateOn: 'submit' });\n * ```\n *\n * ### Reset the control back to an initial value\n *\n * You reset to a specific form state by passing through a standalone\n * value or a form state object that contains both a value and a disabled state\n * (these are the only two properties that cannot be calculated).\n *\n * ```ts\n * const control = new FormControl('Nancy');\n *\n * console.log(control.value); // 'Nancy'\n *\n * control.reset('Drew');\n *\n * console.log(control.value); // 'Drew'\n * ```\n *\n * ### Reset the control back to an initial value and disabled\n *\n * ```\n * const control = new FormControl('Nancy');\n *\n * console.log(control.value); // 'Nancy'\n * console.log(control.status); // 'VALID'\n *\n * control.reset({ value: 'Drew', disabled: true });\n *\n * console.log(control.value); // 'Drew'\n * console.log(control.status); // 'DISABLED'\n * ```\n *\n * @publicApi\n */\nclass FormControl extends AbstractControl {\n    /**\n     * Creates a new `FormControl` instance.\n     *\n     * @param formState Initializes the control with an initial value,\n     * or an object that defines the initial value and disabled state.\n     *\n     * @param validatorOrOpts A synchronous validator function, or an array of\n     * such functions, or an `AbstractControlOptions` object that contains validation functions\n     * and a validation trigger.\n     *\n     * @param asyncValidator A single async validator or array of async validator functions\n     *\n     */\n    constructor(formState = null, validatorOrOpts, asyncValidator) {\n        super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n        /** @internal */\n        this._onChange = [];\n        this._applyFormState(formState);\n        this._setUpdateStrategy(validatorOrOpts);\n        this._initObservables();\n        this.updateValueAndValidity({\n            onlySelf: true,\n            // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n            // `VALID` or `INVALID`.\n            // The status should be broadcasted via the `statusChanges` observable, so we set `emitEvent`\n            // to `true` to allow that during the control creation process.\n            emitEvent: !!this.asyncValidator\n        });\n    }\n    /**\n     * Sets a new value for the form control.\n     *\n     * @param value The new value for the control.\n     * @param options Configuration options that determine how the control propagates changes\n     * and emits events when the value changes.\n     * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n     * updateValueAndValidity} method.\n     *\n     * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n     * false.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges`\n     * observables emit events with the latest status and value when the control value is updated.\n     * When false, no events are emitted.\n     * * `emitModelToViewChange`: When true or not supplied  (the default), each change triggers an\n     * `onChange` event to\n     * update the view.\n     * * `emitViewToModelChange`: When true or not supplied (the default), each change triggers an\n     * `ngModelChange`\n     * event to update the model.\n     *\n     */\n    setValue(value, options = {}) {\n        this.value = this._pendingValue = value;\n        if (this._onChange.length && options.emitModelToViewChange !== false) {\n            this._onChange.forEach((changeFn) => changeFn(this.value, options.emitViewToModelChange !== false));\n        }\n        this.updateValueAndValidity(options);\n    }\n    /**\n     * Patches the value of a control.\n     *\n     * This function is functionally the same as {@link FormControl#setValue setValue} at this level.\n     * It exists for symmetry with {@link FormGroup#patchValue patchValue} on `FormGroups` and\n     * `FormArrays`, where it does behave differently.\n     *\n     * @see `setValue` for options\n     */\n    patchValue(value, options = {}) {\n        this.setValue(value, options);\n    }\n    /**\n     * Resets the form control, marking it `pristine` and `untouched`, and setting\n     * the value to null.\n     *\n     * @param formState Resets the control with an initial value,\n     * or an object that defines the initial value and disabled state.\n     *\n     * @param options Configuration options that determine how the control propagates changes\n     * and emits events after the value changes.\n     *\n     * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n     * false.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges`\n     * observables emit events with the latest status and value when the control is reset.\n     * When false, no events are emitted.\n     *\n     */\n    reset(formState = null, options = {}) {\n        this._applyFormState(formState);\n        this.markAsPristine(options);\n        this.markAsUntouched(options);\n        this.setValue(this.value, options);\n        this._pendingChange = false;\n    }\n    /**\n     * @internal\n     */\n    _updateValue() { }\n    /**\n     * @internal\n     */\n    _anyControls(condition) {\n        return false;\n    }\n    /**\n     * @internal\n     */\n    _allControlsDisabled() {\n        return this.disabled;\n    }\n    /**\n     * Register a listener for change events.\n     *\n     * @param fn The method that is called when the value changes\n     */\n    registerOnChange(fn) {\n        this._onChange.push(fn);\n    }\n    /**\n     * Internal function to unregister a change events listener.\n     * @internal\n     */\n    _unregisterOnChange(fn) {\n        removeListItem(this._onChange, fn);\n    }\n    /**\n     * Register a listener for disabled events.\n     *\n     * @param fn The method that is called when the disabled status changes.\n     */\n    registerOnDisabledChange(fn) {\n        this._onDisabledChange.push(fn);\n    }\n    /**\n     * Internal function to unregister a disabled event listener.\n     * @internal\n     */\n    _unregisterOnDisabledChange(fn) {\n        removeListItem(this._onDisabledChange, fn);\n    }\n    /**\n     * @internal\n     */\n    _forEachChild(cb) { }\n    /** @internal */\n    _syncPendingControls() {\n        if (this.updateOn === 'submit') {\n            if (this._pendingDirty)\n                this.markAsDirty();\n            if (this._pendingTouched)\n                this.markAsTouched();\n            if (this._pendingChange) {\n                this.setValue(this._pendingValue, { onlySelf: true, emitModelToViewChange: false });\n                return true;\n            }\n        }\n        return false;\n    }\n    _applyFormState(formState) {\n        if (this._isBoxedValue(formState)) {\n            this.value = this._pendingValue = formState.value;\n            formState.disabled ? this.disable({ onlySelf: true, emitEvent: false }) :\n                this.enable({ onlySelf: true, emitEvent: false });\n        }\n        else {\n            this.value = this._pendingValue = formState;\n        }\n    }\n}\n/**\n * Tracks the value and validity state of a group of `FormControl` instances.\n *\n * A `FormGroup` aggregates the values of each child `FormControl` into one object,\n * with each control name as the key.  It calculates its status by reducing the status values\n * of its children. For example, if one of the controls in a group is invalid, the entire\n * group becomes invalid.\n *\n * `FormGroup` is one of the three fundamental building blocks used to define forms in Angular,\n * along with `FormControl` and `FormArray`.\n *\n * When instantiating a `FormGroup`, pass in a collection of child controls as the first\n * argument. The key for each child registers the name for the control.\n *\n * @usageNotes\n *\n * ### Create a form group with 2 controls\n *\n * ```\n * const form = new FormGroup({\n *   first: new FormControl('Nancy', Validators.minLength(2)),\n *   last: new FormControl('Drew'),\n * });\n *\n * console.log(form.value);   // {first: 'Nancy', last; 'Drew'}\n * console.log(form.status);  // 'VALID'\n * ```\n *\n * ### Create a form group with a group-level validator\n *\n * You include group-level validators as the second arg, or group-level async\n * validators as the third arg. These come in handy when you want to perform validation\n * that considers the value of more than one child control.\n *\n * ```\n * const form = new FormGroup({\n *   password: new FormControl('', Validators.minLength(2)),\n *   passwordConfirm: new FormControl('', Validators.minLength(2)),\n * }, passwordMatchValidator);\n *\n *\n * function passwordMatchValidator(g: FormGroup) {\n *    return g.get('password').value === g.get('passwordConfirm').value\n *       ? null : {'mismatch': true};\n * }\n * ```\n *\n * Like `FormControl` instances, you choose to pass in\n * validators and async validators as part of an options object.\n *\n * ```\n * const form = new FormGroup({\n *   password: new FormControl('')\n *   passwordConfirm: new FormControl('')\n * }, { validators: passwordMatchValidator, asyncValidators: otherValidator });\n * ```\n *\n * ### Set the updateOn property for all controls in a form group\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * group level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const c = new FormGroup({\n *   one: new FormControl()\n * }, { updateOn: 'blur' });\n * ```\n *\n * @publicApi\n */\nclass FormGroup extends AbstractControl {\n    /**\n     * Creates a new `FormGroup` instance.\n     *\n     * @param controls A collection of child controls. The key for each child is the name\n     * under which it is registered.\n     *\n     * @param validatorOrOpts A synchronous validator function, or an array of\n     * such functions, or an `AbstractControlOptions` object that contains validation functions\n     * and a validation trigger.\n     *\n     * @param asyncValidator A single async validator or array of async validator functions\n     *\n     */\n    constructor(controls, validatorOrOpts, asyncValidator) {\n        super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n        this.controls = controls;\n        this._initObservables();\n        this._setUpdateStrategy(validatorOrOpts);\n        this._setUpControls();\n        this.updateValueAndValidity({\n            onlySelf: true,\n            // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n            // `VALID` or `INVALID`. The status should be broadcasted via the `statusChanges` observable,\n            // so we set `emitEvent` to `true` to allow that during the control creation process.\n            emitEvent: !!this.asyncValidator\n        });\n    }\n    /**\n     * Registers a control with the group's list of controls.\n     *\n     * This method does not update the value or validity of the control.\n     * Use {@link FormGroup#addControl addControl} instead.\n     *\n     * @param name The control name to register in the collection\n     * @param control Provides the control for the given name\n     */\n    registerControl(name, control) {\n        if (this.controls[name])\n            return this.controls[name];\n        this.controls[name] = control;\n        control.setParent(this);\n        control._registerOnCollectionChange(this._onCollectionChange);\n        return control;\n    }\n    /**\n     * Add a control to this group.\n     *\n     * If a control with a given name already exists, it would *not* be replaced with a new one.\n     * If you want to replace an existing control, use the {@link FormGroup#setControl setControl}\n     * method instead. This method also updates the value and validity of the control.\n     *\n     * @param name The control name to add to the collection\n     * @param control Provides the control for the given name\n     * @param options Specifies whether this FormGroup instance should emit events after a new\n     *     control is added.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * added. When false, no events are emitted.\n     */\n    addControl(name, control, options = {}) {\n        this.registerControl(name, control);\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\n        this._onCollectionChange();\n    }\n    /**\n     * Remove a control from this group.\n     *\n     * This method also updates the value and validity of the control.\n     *\n     * @param name The control name to remove from the collection\n     * @param options Specifies whether this FormGroup instance should emit events after a\n     *     control is removed.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * removed. When false, no events are emitted.\n     */\n    removeControl(name, options = {}) {\n        if (this.controls[name])\n            this.controls[name]._registerOnCollectionChange(() => { });\n        delete (this.controls[name]);\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\n        this._onCollectionChange();\n    }\n    /**\n     * Replace an existing control.\n     *\n     * If a control with a given name does not exist in this `FormGroup`, it will be added.\n     *\n     * @param name The control name to replace in the collection\n     * @param control Provides the control for the given name\n     * @param options Specifies whether this FormGroup instance should emit events after an\n     *     existing control is replaced.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * replaced with a new one. When false, no events are emitted.\n     */\n    setControl(name, control, options = {}) {\n        if (this.controls[name])\n            this.controls[name]._registerOnCollectionChange(() => { });\n        delete (this.controls[name]);\n        if (control)\n            this.registerControl(name, control);\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\n        this._onCollectionChange();\n    }\n    /**\n     * Check whether there is an enabled control with the given name in the group.\n     *\n     * Reports false for disabled controls. If you'd like to check for existence in the group\n     * only, use {@link AbstractControl#get get} instead.\n     *\n     * @param controlName The control name to check for existence in the collection\n     *\n     * @returns false for disabled controls, true otherwise.\n     */\n    contains(controlName) {\n        return this.controls.hasOwnProperty(controlName) && this.controls[controlName].enabled;\n    }\n    /**\n     * Sets the value of the `FormGroup`. It accepts an object that matches\n     * the structure of the group, with control names as keys.\n     *\n     * @usageNotes\n     * ### Set the complete value for the form group\n     *\n     * ```\n     * const form = new FormGroup({\n     *   first: new FormControl(),\n     *   last: new FormControl()\n     * });\n     *\n     * console.log(form.value);   // {first: null, last: null}\n     *\n     * form.setValue({first: 'Nancy', last: 'Drew'});\n     * console.log(form.value);   // {first: 'Nancy', last: 'Drew'}\n     * ```\n     *\n     * @throws When strict checks fail, such as setting the value of a control\n     * that doesn't exist or if you exclude a value of a control that does exist.\n     *\n     * @param value The new value for the control that matches the structure of the group.\n     * @param options Configuration options that determine how the control propagates changes\n     * and emits events after the value changes.\n     * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n     * updateValueAndValidity} method.\n     *\n     * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n     * false.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges`\n     * observables emit events with the latest status and value when the control value is updated.\n     * When false, no events are emitted.\n     */\n    setValue(value, options = {}) {\n        this._checkAllValuesPresent(value);\n        Object.keys(value).forEach(name => {\n            this._throwIfControlMissing(name);\n            this.controls[name].setValue(value[name], { onlySelf: true, emitEvent: options.emitEvent });\n        });\n        this.updateValueAndValidity(options);\n    }\n    /**\n     * Patches the value of the `FormGroup`. It accepts an object with control\n     * names as keys, and does its best to match the values to the correct controls\n     * in the group.\n     *\n     * It accepts both super-sets and sub-sets of the group without throwing an error.\n     *\n     * @usageNotes\n     * ### Patch the value for a form group\n     *\n     * ```\n     * const form = new FormGroup({\n     *    first: new FormControl(),\n     *    last: new FormControl()\n     * });\n     * console.log(form.value);   // {first: null, last: null}\n     *\n     * form.patchValue({first: 'Nancy'});\n     * console.log(form.value);   // {first: 'Nancy', last: null}\n     * ```\n     *\n     * @param value The object that matches the structure of the group.\n     * @param options Configuration options that determine how the control propagates changes and\n     * emits events after the value is patched.\n     * * `onlySelf`: When true, each change only affects this control and not its parent. Default is\n     * true.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control value\n     * is updated. When false, no events are emitted. The configuration options are passed to\n     * the {@link AbstractControl#updateValueAndValidity updateValueAndValidity} method.\n     */\n    patchValue(value, options = {}) {\n        // Even though the `value` argument type doesn't allow `null` and `undefined` values, the\n        // `patchValue` can be called recursively and inner data structures might have these values, so\n        // we just ignore such cases when a field containing FormGroup instance receives `null` or\n        // `undefined` as a value.\n        if (value == null /* both `null` and `undefined` */)\n            return;\n        Object.keys(value).forEach(name => {\n            if (this.controls[name]) {\n                this.controls[name].patchValue(value[name], { onlySelf: true, emitEvent: options.emitEvent });\n            }\n        });\n        this.updateValueAndValidity(options);\n    }\n    /**\n     * Resets the `FormGroup`, marks all descendants `pristine` and `untouched` and sets\n     * the value of all descendants to null.\n     *\n     * You reset to a specific form state by passing in a map of states\n     * that matches the structure of your form, with control names as keys. The state\n     * is a standalone value or a form state object with both a value and a disabled\n     * status.\n     *\n     * @param value Resets the control with an initial value,\n     * or an object that defines the initial value and disabled state.\n     *\n     * @param options Configuration options that determine how the control propagates changes\n     * and emits events when the group is reset.\n     * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n     * false.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges`\n     * observables emit events with the latest status and value when the control is reset.\n     * When false, no events are emitted.\n     * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n     * updateValueAndValidity} method.\n     *\n     * @usageNotes\n     *\n     * ### Reset the form group values\n     *\n     * ```ts\n     * const form = new FormGroup({\n     *   first: new FormControl('first name'),\n     *   last: new FormControl('last name')\n     * });\n     *\n     * console.log(form.value);  // {first: 'first name', last: 'last name'}\n     *\n     * form.reset({ first: 'name', last: 'last name' });\n     *\n     * console.log(form.value);  // {first: 'name', last: 'last name'}\n     * ```\n     *\n     * ### Reset the form group values and disabled status\n     *\n     * ```\n     * const form = new FormGroup({\n     *   first: new FormControl('first name'),\n     *   last: new FormControl('last name')\n     * });\n     *\n     * form.reset({\n     *   first: {value: 'name', disabled: true},\n     *   last: 'last'\n     * });\n     *\n     * console.log(form.value);  // {last: 'last'}\n     * console.log(form.get('first').status);  // 'DISABLED'\n     * ```\n     */\n    reset(value = {}, options = {}) {\n        this._forEachChild((control, name) => {\n            control.reset(value[name], { onlySelf: true, emitEvent: options.emitEvent });\n        });\n        this._updatePristine(options);\n        this._updateTouched(options);\n        this.updateValueAndValidity(options);\n    }\n    /**\n     * The aggregate value of the `FormGroup`, including any disabled controls.\n     *\n     * Retrieves all values regardless of disabled status.\n     * The `value` property is the best way to get the value of the group, because\n     * it excludes disabled controls in the `FormGroup`.\n     */\n    getRawValue() {\n        return this._reduceChildren({}, (acc, control, name) => {\n            acc[name] = control instanceof FormControl ? control.value : control.getRawValue();\n            return acc;\n        });\n    }\n    /** @internal */\n    _syncPendingControls() {\n        let subtreeUpdated = this._reduceChildren(false, (updated, child) => {\n            return child._syncPendingControls() ? true : updated;\n        });\n        if (subtreeUpdated)\n            this.updateValueAndValidity({ onlySelf: true });\n        return subtreeUpdated;\n    }\n    /** @internal */\n    _throwIfControlMissing(name) {\n        if (!Object.keys(this.controls).length) {\n            throw new Error(`\n        There are no form controls registered with this group yet. If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      `);\n        }\n        if (!this.controls[name]) {\n            throw new Error(`Cannot find form control with name: ${name}.`);\n        }\n    }\n    /** @internal */\n    _forEachChild(cb) {\n        Object.keys(this.controls).forEach(key => {\n            // The list of controls can change (for ex. controls might be removed) while the loop\n            // is running (as a result of invoking Forms API in `valueChanges` subscription), so we\n            // have to null check before invoking the callback.\n            const control = this.controls[key];\n            control && cb(control, key);\n        });\n    }\n    /** @internal */\n    _setUpControls() {\n        this._forEachChild((control) => {\n            control.setParent(this);\n            control._registerOnCollectionChange(this._onCollectionChange);\n        });\n    }\n    /** @internal */\n    _updateValue() {\n        this.value = this._reduceValue();\n    }\n    /** @internal */\n    _anyControls(condition) {\n        for (const controlName of Object.keys(this.controls)) {\n            const control = this.controls[controlName];\n            if (this.contains(controlName) && condition(control)) {\n                return true;\n            }\n        }\n        return false;\n    }\n    /** @internal */\n    _reduceValue() {\n        return this._reduceChildren({}, (acc, control, name) => {\n            if (control.enabled || this.disabled) {\n                acc[name] = control.value;\n            }\n            return acc;\n        });\n    }\n    /** @internal */\n    _reduceChildren(initValue, fn) {\n        let res = initValue;\n        this._forEachChild((control, name) => {\n            res = fn(res, control, name);\n        });\n        return res;\n    }\n    /** @internal */\n    _allControlsDisabled() {\n        for (const controlName of Object.keys(this.controls)) {\n            if (this.controls[controlName].enabled) {\n                return false;\n            }\n        }\n        return Object.keys(this.controls).length > 0 || this.disabled;\n    }\n    /** @internal */\n    _checkAllValuesPresent(value) {\n        this._forEachChild((control, name) => {\n            if (value[name] === undefined) {\n                throw new Error(`Must supply a value for form control with name: '${name}'.`);\n            }\n        });\n    }\n}\n/**\n * Tracks the value and validity state of an array of `FormControl`,\n * `FormGroup` or `FormArray` instances.\n *\n * A `FormArray` aggregates the values of each child `FormControl` into an array.\n * It calculates its status by reducing the status values of its children. For example, if one of\n * the controls in a `FormArray` is invalid, the entire array becomes invalid.\n *\n * `FormArray` is one of the three fundamental building blocks used to define forms in Angular,\n * along with `FormControl` and `FormGroup`.\n *\n * @usageNotes\n *\n * ### Create an array of form controls\n *\n * ```\n * const arr = new FormArray([\n *   new FormControl('Nancy', Validators.minLength(2)),\n *   new FormControl('Drew'),\n * ]);\n *\n * console.log(arr.value);   // ['Nancy', 'Drew']\n * console.log(arr.status);  // 'VALID'\n * ```\n *\n * ### Create a form array with array-level validators\n *\n * You include array-level validators and async validators. These come in handy\n * when you want to perform validation that considers the value of more than one child\n * control.\n *\n * The two types of validators are passed in separately as the second and third arg\n * respectively, or together as part of an options object.\n *\n * ```\n * const arr = new FormArray([\n *   new FormControl('Nancy'),\n *   new FormControl('Drew')\n * ], {validators: myValidator, asyncValidators: myAsyncValidator});\n * ```\n *\n * ### Set the updateOn property for all controls in a form array\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * array level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const arr = new FormArray([\n *    new FormControl()\n * ], {updateOn: 'blur'});\n * ```\n *\n * ### Adding or removing controls from a form array\n *\n * To change the controls in the array, use the `push`, `insert`, `removeAt` or `clear` methods\n * in `FormArray` itself. These methods ensure the controls are properly tracked in the\n * form's hierarchy. Do not modify the array of `AbstractControl`s used to instantiate\n * the `FormArray` directly, as that result in strange and unexpected behavior such\n * as broken change detection.\n *\n * @publicApi\n */\nclass FormArray extends AbstractControl {\n    /**\n     * Creates a new `FormArray` instance.\n     *\n     * @param controls An array of child controls. Each child control is given an index\n     * where it is registered.\n     *\n     * @param validatorOrOpts A synchronous validator function, or an array of\n     * such functions, or an `AbstractControlOptions` object that contains validation functions\n     * and a validation trigger.\n     *\n     * @param asyncValidator A single async validator or array of async validator functions\n     *\n     */\n    constructor(controls, validatorOrOpts, asyncValidator) {\n        super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n        this.controls = controls;\n        this._initObservables();\n        this._setUpdateStrategy(validatorOrOpts);\n        this._setUpControls();\n        this.updateValueAndValidity({\n            onlySelf: true,\n            // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n            // `VALID` or `INVALID`.\n            // The status should be broadcasted via the `statusChanges` observable, so we set `emitEvent`\n            // to `true` to allow that during the control creation process.\n            emitEvent: !!this.asyncValidator\n        });\n    }\n    /**\n     * Get the `AbstractControl` at the given `index` in the array.\n     *\n     * @param index Index in the array to retrieve the control\n     */\n    at(index) {\n        return this.controls[index];\n    }\n    /**\n     * Insert a new `AbstractControl` at the end of the array.\n     *\n     * @param control Form control to be inserted\n     * @param options Specifies whether this FormArray instance should emit events after a new\n     *     control is added.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * inserted. When false, no events are emitted.\n     */\n    push(control, options = {}) {\n        this.controls.push(control);\n        this._registerControl(control);\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\n        this._onCollectionChange();\n    }\n    /**\n     * Insert a new `AbstractControl` at the given `index` in the array.\n     *\n     * @param index Index in the array to insert the control\n     * @param control Form control to be inserted\n     * @param options Specifies whether this FormArray instance should emit events after a new\n     *     control is inserted.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * inserted. When false, no events are emitted.\n     */\n    insert(index, control, options = {}) {\n        this.controls.splice(index, 0, control);\n        this._registerControl(control);\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\n    }\n    /**\n     * Remove the control at the given `index` in the array.\n     *\n     * @param index Index in the array to remove the control\n     * @param options Specifies whether this FormArray instance should emit events after a\n     *     control is removed.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * removed. When false, no events are emitted.\n     */\n    removeAt(index, options = {}) {\n        if (this.controls[index])\n            this.controls[index]._registerOnCollectionChange(() => { });\n        this.controls.splice(index, 1);\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\n    }\n    /**\n     * Replace an existing control.\n     *\n     * @param index Index in the array to replace the control\n     * @param control The `AbstractControl` control to replace the existing control\n     * @param options Specifies whether this FormArray instance should emit events after an\n     *     existing control is replaced with a new one.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * replaced with a new one. When false, no events are emitted.\n     */\n    setControl(index, control, options = {}) {\n        if (this.controls[index])\n            this.controls[index]._registerOnCollectionChange(() => { });\n        this.controls.splice(index, 1);\n        if (control) {\n            this.controls.splice(index, 0, control);\n            this._registerControl(control);\n        }\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\n        this._onCollectionChange();\n    }\n    /**\n     * Length of the control array.\n     */\n    get length() {\n        return this.controls.length;\n    }\n    /**\n     * Sets the value of the `FormArray`. It accepts an array that matches\n     * the structure of the control.\n     *\n     * This method performs strict checks, and throws an error if you try\n     * to set the value of a control that doesn't exist or if you exclude the\n     * value of a control.\n     *\n     * @usageNotes\n     * ### Set the values for the controls in the form array\n     *\n     * ```\n     * const arr = new FormArray([\n     *   new FormControl(),\n     *   new FormControl()\n     * ]);\n     * console.log(arr.value);   // [null, null]\n     *\n     * arr.setValue(['Nancy', 'Drew']);\n     * console.log(arr.value);   // ['Nancy', 'Drew']\n     * ```\n     *\n     * @param value Array of values for the controls\n     * @param options Configure options that determine how the control propagates changes and\n     * emits events after the value changes\n     *\n     * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n     * is false.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges`\n     * observables emit events with the latest status and value when the control value is updated.\n     * When false, no events are emitted.\n     * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n     * updateValueAndValidity} method.\n     */\n    setValue(value, options = {}) {\n        this._checkAllValuesPresent(value);\n        value.forEach((newValue, index) => {\n            this._throwIfControlMissing(index);\n            this.at(index).setValue(newValue, { onlySelf: true, emitEvent: options.emitEvent });\n        });\n        this.updateValueAndValidity(options);\n    }\n    /**\n     * Patches the value of the `FormArray`. It accepts an array that matches the\n     * structure of the control, and does its best to match the values to the correct\n     * controls in the group.\n     *\n     * It accepts both super-sets and sub-sets of the array without throwing an error.\n     *\n     * @usageNotes\n     * ### Patch the values for controls in a form array\n     *\n     * ```\n     * const arr = new FormArray([\n     *    new FormControl(),\n     *    new FormControl()\n     * ]);\n     * console.log(arr.value);   // [null, null]\n     *\n     * arr.patchValue(['Nancy']);\n     * console.log(arr.value);   // ['Nancy', null]\n     * ```\n     *\n     * @param value Array of latest values for the controls\n     * @param options Configure options that determine how the control propagates changes and\n     * emits events after the value changes\n     *\n     * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n     * is false.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control value\n     * is updated. When false, no events are emitted. The configuration options are passed to\n     * the {@link AbstractControl#updateValueAndValidity updateValueAndValidity} method.\n     */\n    patchValue(value, options = {}) {\n        // Even though the `value` argument type doesn't allow `null` and `undefined` values, the\n        // `patchValue` can be called recursively and inner data structures might have these values, so\n        // we just ignore such cases when a field containing FormArray instance receives `null` or\n        // `undefined` as a value.\n        if (value == null /* both `null` and `undefined` */)\n            return;\n        value.forEach((newValue, index) => {\n            if (this.at(index)) {\n                this.at(index).patchValue(newValue, { onlySelf: true, emitEvent: options.emitEvent });\n            }\n        });\n        this.updateValueAndValidity(options);\n    }\n    /**\n     * Resets the `FormArray` and all descendants are marked `pristine` and `untouched`, and the\n     * value of all descendants to null or null maps.\n     *\n     * You reset to a specific form state by passing in an array of states\n     * that matches the structure of the control. The state is a standalone value\n     * or a form state object with both a value and a disabled status.\n     *\n     * @usageNotes\n     * ### Reset the values in a form array\n     *\n     * ```ts\n     * const arr = new FormArray([\n     *    new FormControl(),\n     *    new FormControl()\n     * ]);\n     * arr.reset(['name', 'last name']);\n     *\n     * console.log(arr.value);  // ['name', 'last name']\n     * ```\n     *\n     * ### Reset the values in a form array and the disabled status for the first control\n     *\n     * ```\n     * arr.reset([\n     *   {value: 'name', disabled: true},\n     *   'last'\n     * ]);\n     *\n     * console.log(arr.value);  // ['last']\n     * console.log(arr.at(0).status);  // 'DISABLED'\n     * ```\n     *\n     * @param value Array of values for the controls\n     * @param options Configure options that determine how the control propagates changes and\n     * emits events after the value changes\n     *\n     * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n     * is false.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges`\n     * observables emit events with the latest status and value when the control is reset.\n     * When false, no events are emitted.\n     * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n     * updateValueAndValidity} method.\n     */\n    reset(value = [], options = {}) {\n        this._forEachChild((control, index) => {\n            control.reset(value[index], { onlySelf: true, emitEvent: options.emitEvent });\n        });\n        this._updatePristine(options);\n        this._updateTouched(options);\n        this.updateValueAndValidity(options);\n    }\n    /**\n     * The aggregate value of the array, including any disabled controls.\n     *\n     * Reports all values regardless of disabled status.\n     * For enabled controls only, the `value` property is the best way to get the value of the array.\n     */\n    getRawValue() {\n        return this.controls.map((control) => {\n            return control instanceof FormControl ? control.value : control.getRawValue();\n        });\n    }\n    /**\n     * Remove all controls in the `FormArray`.\n     *\n     * @param options Specifies whether this FormArray instance should emit events after all\n     *     controls are removed.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when all controls\n     * in this FormArray instance are removed. When false, no events are emitted.\n     *\n     * @usageNotes\n     * ### Remove all elements from a FormArray\n     *\n     * ```ts\n     * const arr = new FormArray([\n     *    new FormControl(),\n     *    new FormControl()\n     * ]);\n     * console.log(arr.length);  // 2\n     *\n     * arr.clear();\n     * console.log(arr.length);  // 0\n     * ```\n     *\n     * It's a simpler and more efficient alternative to removing all elements one by one:\n     *\n     * ```ts\n     * const arr = new FormArray([\n     *    new FormControl(),\n     *    new FormControl()\n     * ]);\n     *\n     * while (arr.length) {\n     *    arr.removeAt(0);\n     * }\n     * ```\n     */\n    clear(options = {}) {\n        if (this.controls.length < 1)\n            return;\n        this._forEachChild((control) => control._registerOnCollectionChange(() => { }));\n        this.controls.splice(0);\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\n    }\n    /** @internal */\n    _syncPendingControls() {\n        let subtreeUpdated = this.controls.reduce((updated, child) => {\n            return child._syncPendingControls() ? true : updated;\n        }, false);\n        if (subtreeUpdated)\n            this.updateValueAndValidity({ onlySelf: true });\n        return subtreeUpdated;\n    }\n    /** @internal */\n    _throwIfControlMissing(index) {\n        if (!this.controls.length) {\n            throw new Error(`\n        There are no form controls registered with this array yet. If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      `);\n        }\n        if (!this.at(index)) {\n            throw new Error(`Cannot find form control at index ${index}`);\n        }\n    }\n    /** @internal */\n    _forEachChild(cb) {\n        this.controls.forEach((control, index) => {\n            cb(control, index);\n        });\n    }\n    /** @internal */\n    _updateValue() {\n        this.value =\n            this.controls.filter((control) => control.enabled || this.disabled)\n                .map((control) => control.value);\n    }\n    /** @internal */\n    _anyControls(condition) {\n        return this.controls.some((control) => control.enabled && condition(control));\n    }\n    /** @internal */\n    _setUpControls() {\n        this._forEachChild((control) => this._registerControl(control));\n    }\n    /** @internal */\n    _checkAllValuesPresent(value) {\n        this._forEachChild((control, i) => {\n            if (value[i] === undefined) {\n                throw new Error(`Must supply a value for form control at index: ${i}.`);\n            }\n        });\n    }\n    /** @internal */\n    _allControlsDisabled() {\n        for (const control of this.controls) {\n            if (control.enabled)\n                return false;\n        }\n        return this.controls.length > 0 || this.disabled;\n    }\n    _registerControl(control) {\n        control.setParent(this);\n        control._registerOnCollectionChange(this._onCollectionChange);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst formDirectiveProvider = {\n    provide: ControlContainer,\n    useExisting: forwardRef(() => NgForm)\n};\nconst ɵ0 = () => Promise.resolve(null);\nconst resolvedPromise = (ɵ0)();\n/**\n * @description\n * Creates a top-level `FormGroup` instance and binds it to a form\n * to track aggregate form value and validation status.\n *\n * As soon as you import the `FormsModule`, this directive becomes active by default on\n * all `<form>` tags.  You don't need to add a special selector.\n *\n * You optionally export the directive into a local template variable using `ngForm` as the key\n * (ex: `#myForm=\"ngForm\"`). This is optional, but useful.  Many properties from the underlying\n * `FormGroup` instance are duplicated on the directive itself, so a reference to it\n * gives you access to the aggregate value and validity status of the form, as well as\n * user interaction properties like `dirty` and `touched`.\n *\n * To register child controls with the form, use `NgModel` with a `name`\n * attribute. You may use `NgModelGroup` to create sub-groups within the form.\n *\n * If necessary, listen to the directive's `ngSubmit` event to be notified when the user has\n * triggered a form submission. The `ngSubmit` event emits the original form\n * submission event.\n *\n * In template driven forms, all `<form>` tags are automatically tagged as `NgForm`.\n * To import the `FormsModule` but skip its usage in some forms,\n * for example, to use native HTML5 validation, add the `ngNoForm` and the `<form>`\n * tags won't create an `NgForm` directive. In reactive forms, using `ngNoForm` is\n * unnecessary because the `<form>` tags are inert. In that case, you would\n * refrain from using the `formGroup` directive.\n *\n * @usageNotes\n *\n * ### Listening for form submission\n *\n * The following example shows how to capture the form values from the \"ngSubmit\" event.\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * ### Setting the update options\n *\n * The following example shows you how to change the \"updateOn\" option from its default using\n * ngFormOptions.\n *\n * ```html\n * <form [ngFormOptions]=\"{updateOn: 'blur'}\">\n *    <input name=\"one\" ngModel>  <!-- this ngModel will update on blur -->\n * </form>\n * ```\n *\n * ### Native DOM validation UI\n *\n * In order to prevent the native DOM form validation UI from interfering with Angular's form\n * validation, Angular automatically adds the `novalidate` attribute on any `<form>` whenever\n * `FormModule` or `ReactiveFormModule` are imported into the application.\n * If you want to explicitly enable native DOM validation UI with Angular forms, you can add the\n * `ngNativeValidate` attribute to the `<form>` element:\n *\n * ```html\n * <form ngNativeValidate>\n *   ...\n * </form>\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgForm extends ControlContainer {\n    constructor(validators, asyncValidators) {\n        super();\n        /**\n         * @description\n         * Returns whether the form submission has been triggered.\n         */\n        this.submitted = false;\n        this._directives = [];\n        /**\n         * @description\n         * Event emitter for the \"ngSubmit\" event\n         */\n        this.ngSubmit = new EventEmitter();\n        this.form =\n            new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));\n    }\n    /** @nodoc */\n    ngAfterViewInit() {\n        this._setUpdateStrategy();\n    }\n    /**\n     * @description\n     * The directive instance.\n     */\n    get formDirective() {\n        return this;\n    }\n    /**\n     * @description\n     * The internal `FormGroup` instance.\n     */\n    get control() {\n        return this.form;\n    }\n    /**\n     * @description\n     * Returns an array representing the path to this group. Because this directive\n     * always lives at the top level of a form, it is always an empty array.\n     */\n    get path() {\n        return [];\n    }\n    /**\n     * @description\n     * Returns a map of the controls in this group.\n     */\n    get controls() {\n        return this.form.controls;\n    }\n    /**\n     * @description\n     * Method that sets up the control directive in this group, re-calculates its value\n     * and validity, and adds the instance to the internal list of directives.\n     *\n     * @param dir The `NgModel` directive instance.\n     */\n    addControl(dir) {\n        resolvedPromise.then(() => {\n            const container = this._findContainer(dir.path);\n            dir.control =\n                container.registerControl(dir.name, dir.control);\n            setUpControl(dir.control, dir);\n            dir.control.updateValueAndValidity({ emitEvent: false });\n            this._directives.push(dir);\n        });\n    }\n    /**\n     * @description\n     * Retrieves the `FormControl` instance from the provided `NgModel` directive.\n     *\n     * @param dir The `NgModel` directive instance.\n     */\n    getControl(dir) {\n        return this.form.get(dir.path);\n    }\n    /**\n     * @description\n     * Removes the `NgModel` instance from the internal list of directives\n     *\n     * @param dir The `NgModel` directive instance.\n     */\n    removeControl(dir) {\n        resolvedPromise.then(() => {\n            const container = this._findContainer(dir.path);\n            if (container) {\n                container.removeControl(dir.name);\n            }\n            removeListItem(this._directives, dir);\n        });\n    }\n    /**\n     * @description\n     * Adds a new `NgModelGroup` directive instance to the form.\n     *\n     * @param dir The `NgModelGroup` directive instance.\n     */\n    addFormGroup(dir) {\n        resolvedPromise.then(() => {\n            const container = this._findContainer(dir.path);\n            const group = new FormGroup({});\n            setUpFormContainer(group, dir);\n            container.registerControl(dir.name, group);\n            group.updateValueAndValidity({ emitEvent: false });\n        });\n    }\n    /**\n     * @description\n     * Removes the `NgModelGroup` directive instance from the form.\n     *\n     * @param dir The `NgModelGroup` directive instance.\n     */\n    removeFormGroup(dir) {\n        resolvedPromise.then(() => {\n            const container = this._findContainer(dir.path);\n            if (container) {\n                container.removeControl(dir.name);\n            }\n        });\n    }\n    /**\n     * @description\n     * Retrieves the `FormGroup` for a provided `NgModelGroup` directive instance\n     *\n     * @param dir The `NgModelGroup` directive instance.\n     */\n    getFormGroup(dir) {\n        return this.form.get(dir.path);\n    }\n    /**\n     * Sets the new value for the provided `NgControl` directive.\n     *\n     * @param dir The `NgControl` directive instance.\n     * @param value The new value for the directive's control.\n     */\n    updateModel(dir, value) {\n        resolvedPromise.then(() => {\n            const ctrl = this.form.get(dir.path);\n            ctrl.setValue(value);\n        });\n    }\n    /**\n     * @description\n     * Sets the value for this `FormGroup`.\n     *\n     * @param value The new value\n     */\n    setValue(value) {\n        this.control.setValue(value);\n    }\n    /**\n     * @description\n     * Method called when the \"submit\" event is triggered on the form.\n     * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n     *\n     * @param $event The \"submit\" event object\n     */\n    onSubmit($event) {\n        this.submitted = true;\n        syncPendingControls(this.form, this._directives);\n        this.ngSubmit.emit($event);\n        return false;\n    }\n    /**\n     * @description\n     * Method called when the \"reset\" event is triggered on the form.\n     */\n    onReset() {\n        this.resetForm();\n    }\n    /**\n     * @description\n     * Resets the form to an initial value and resets its submitted status.\n     *\n     * @param value The new value for the form.\n     */\n    resetForm(value = undefined) {\n        this.form.reset(value);\n        this.submitted = false;\n    }\n    _setUpdateStrategy() {\n        if (this.options && this.options.updateOn != null) {\n            this.form._updateOn = this.options.updateOn;\n        }\n    }\n    /** @internal */\n    _findContainer(path) {\n        path.pop();\n        return path.length ? this.form.get(path) : this.form;\n    }\n}\nNgForm.ɵfac = function NgForm_Factory(t) { return new (t || NgForm)(ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10)); };\nNgForm.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgForm, selectors: [[\"form\", 3, \"ngNoForm\", \"\", 3, \"formGroup\", \"\"], [\"ng-form\"], [\"\", \"ngForm\", \"\"]], hostBindings: function NgForm_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"submit\", function NgForm_submit_HostBindingHandler($event) { return ctx.onSubmit($event); })(\"reset\", function NgForm_reset_HostBindingHandler() { return ctx.onReset(); });\n    } }, inputs: { options: [\"ngFormOptions\", \"options\"] }, outputs: { ngSubmit: \"ngSubmit\" }, exportAs: [\"ngForm\"], features: [ɵngcc0.ɵɵProvidersFeature([formDirectiveProvider]), ɵngcc0.ɵɵInheritDefinitionFeature] });\nNgForm.ctorParameters = () => [\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] }] }\n];\nNgForm.propDecorators = {\n    options: [{ type: Input, args: ['ngFormOptions',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgForm, [{\n        type: Directive,\n        args: [{\n                selector: 'form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]',\n                providers: [formDirectiveProvider],\n                host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },\n                outputs: ['ngSubmit'],\n                exportAs: 'ngForm'\n            }]\n    }], function () { return [{ type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_VALIDATORS]\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_ASYNC_VALIDATORS]\n            }] }]; }, { options: [{\n            type: Input,\n            args: ['ngFormOptions']\n        }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n * A base class for code shared between the `NgModelGroup` and `FormGroupName` directives.\n *\n * @publicApi\n */\nclass AbstractFormGroupDirective extends ControlContainer {\n    /** @nodoc */\n    ngOnInit() {\n        this._checkParentType();\n        // Register the group with its parent group.\n        this.formDirective.addFormGroup(this);\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        if (this.formDirective) {\n            // Remove the group from its parent group.\n            this.formDirective.removeFormGroup(this);\n        }\n    }\n    /**\n     * @description\n     * The `FormGroup` bound to this directive.\n     */\n    get control() {\n        return this.formDirective.getFormGroup(this);\n    }\n    /**\n     * @description\n     * The path to this group from the top-level directive.\n     */\n    get path() {\n        return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n    }\n    /**\n     * @description\n     * The top-level directive for this group if present, otherwise null.\n     */\n    get formDirective() {\n        return this._parent ? this._parent.formDirective : null;\n    }\n    /** @internal */\n    _checkParentType() { }\n}\nAbstractFormGroupDirective.ɵfac = /*@__PURE__*/ function () { let ɵAbstractFormGroupDirective_BaseFactory; return function AbstractFormGroupDirective_Factory(t) { return (ɵAbstractFormGroupDirective_BaseFactory || (ɵAbstractFormGroupDirective_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(AbstractFormGroupDirective)))(t || AbstractFormGroupDirective); }; }();\nAbstractFormGroupDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: AbstractFormGroupDirective, features: [ɵngcc0.ɵɵInheritDefinitionFeature] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(AbstractFormGroupDirective, [{\n        type: Directive\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction modelParentException() {\n    return new Error(`\n    ngModel cannot be used to register form controls with a parent formGroup directive.  Try using\n    formGroup's partner directive \"formControlName\" instead.  Example:\n\n    ${formControlNameExample}\n\n    Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n    Example:\n\n    ${ngModelWithFormGroupExample}`);\n}\nfunction formGroupNameException() {\n    return new Error(`\n    ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n    Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n    ${formGroupNameExample}\n\n    Option 2:  Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n    ${ngModelGroupExample}`);\n}\nfunction missingNameException() {\n    return new Error(`If ngModel is used within a form tag, either the name attribute must be set or the form\n    control must be defined as 'standalone' in ngModelOptions.\n\n    Example 1: <input [(ngModel)]=\"person.firstName\" name=\"first\">\n    Example 2: <input [(ngModel)]=\"person.firstName\" [ngModelOptions]=\"{standalone: true}\">`);\n}\nfunction modelGroupParentException() {\n    return new Error(`\n    ngModelGroup cannot be used with a parent formGroup directive.\n\n    Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n    ${formGroupNameExample}\n\n    Option 2:  Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n    ${ngModelGroupExample}`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst modelGroupProvider = {\n    provide: ControlContainer,\n    useExisting: forwardRef(() => NgModelGroup)\n};\n/**\n * @description\n * Creates and binds a `FormGroup` instance to a DOM element.\n *\n * This directive can only be used as a child of `NgForm` (within `<form>` tags).\n *\n * Use this directive to validate a sub-group of your form separately from the\n * rest of your form, or if some values in your domain model make more sense\n * to consume together in a nested object.\n *\n * Provide a name for the sub-group and it will become the key\n * for the sub-group in the form's full value. If you need direct access, export the directive into\n * a local template variable using `ngModelGroup` (ex: `#myGroup=\"ngModelGroup\"`).\n *\n * @usageNotes\n *\n * ### Consuming controls in a grouping\n *\n * The following example shows you how to combine controls together in a sub-group\n * of the form.\n *\n * {@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'}\n *\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgModelGroup extends AbstractFormGroupDirective {\n    constructor(parent, validators, asyncValidators) {\n        super();\n        this._parent = parent;\n        this._setValidators(validators);\n        this._setAsyncValidators(asyncValidators);\n    }\n    /** @internal */\n    _checkParentType() {\n        if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm) &&\n            (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw modelGroupParentException();\n        }\n    }\n}\nNgModelGroup.ɵfac = function NgModelGroup_Factory(t) { return new (t || NgModelGroup)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 5), ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10)); };\nNgModelGroup.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgModelGroup, selectors: [[\"\", \"ngModelGroup\", \"\"]], inputs: { name: [\"ngModelGroup\", \"name\"] }, exportAs: [\"ngModelGroup\"], features: [ɵngcc0.ɵɵProvidersFeature([modelGroupProvider]), ɵngcc0.ɵɵInheritDefinitionFeature] });\nNgModelGroup.ctorParameters = () => [\n    { type: ControlContainer, decorators: [{ type: Host }, { type: SkipSelf }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] }] }\n];\nNgModelGroup.propDecorators = {\n    name: [{ type: Input, args: ['ngModelGroup',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgModelGroup, [{\n        type: Directive,\n        args: [{ selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup' }]\n    }], function () { return [{ type: ControlContainer, decorators: [{\n                type: Host\n            }, {\n                type: SkipSelf\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_VALIDATORS]\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_ASYNC_VALIDATORS]\n            }] }]; }, { name: [{\n            type: Input,\n            args: ['ngModelGroup']\n        }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst formControlBinding = {\n    provide: NgControl,\n    useExisting: forwardRef(() => NgModel)\n};\nconst ɵ0$1 = () => Promise.resolve(null);\n/**\n * `ngModel` forces an additional change detection run when its inputs change:\n * E.g.:\n * ```\n * <div>{{myModel.valid}}</div>\n * <input [(ngModel)]=\"myValue\" #myModel=\"ngModel\">\n * ```\n * I.e. `ngModel` can export itself on the element and then be used in the template.\n * Normally, this would result in expressions before the `input` that use the exported directive\n * to have an old value as they have been\n * dirty checked before. As this is a very common case for `ngModel`, we added this second change\n * detection run.\n *\n * Notes:\n * - this is just one extra run no matter how many `ngModel`s have been changed.\n * - this is a general problem when using `exportAs` for directives!\n */\nconst resolvedPromise$1 = (ɵ0$1)();\n/**\n * @description\n * Creates a `FormControl` instance from a domain model and binds it\n * to a form control element.\n *\n * The `FormControl` instance tracks the value, user interaction, and\n * validation status of the control and keeps the view synced with the model. If used\n * within a parent form, the directive also registers itself with the form as a child\n * control.\n *\n * This directive is used by itself or as part of a larger form. Use the\n * `ngModel` selector to activate it.\n *\n * It accepts a domain model as an optional `Input`. If you have a one-way binding\n * to `ngModel` with `[]` syntax, changing the domain model's value in the component\n * class sets the value in the view. If you have a two-way binding with `[()]` syntax\n * (also known as 'banana-in-a-box syntax'), the value in the UI always syncs back to\n * the domain model in your class.\n *\n * To inspect the properties of the associated `FormControl` (like the validity state),\n * export the directive into a local template variable using `ngModel` as the key (ex:\n * `#myVar=\"ngModel\"`). You can then access the control using the directive's `control` property.\n * However, the most commonly used properties (like `valid` and `dirty`) also exist on the control\n * for direct access. See a full list of properties directly available in\n * `AbstractControlDirective`.\n *\n * @see `RadioControlValueAccessor`\n * @see `SelectControlValueAccessor`\n *\n * @usageNotes\n *\n * ### Using ngModel on a standalone control\n *\n * The following examples show a simple standalone control using `ngModel`:\n *\n * {@example forms/ts/simpleNgModel/simple_ng_model_example.ts region='Component'}\n *\n * When using the `ngModel` within `<form>` tags, you'll also need to supply a `name` attribute\n * so that the control can be registered with the parent form under that name.\n *\n * In the context of a parent form, it's often unnecessary to include one-way or two-way binding,\n * as the parent form syncs the value for you. You access its properties by exporting it into a\n * local template variable using `ngForm` such as (`#f=\"ngForm\"`). Use the variable where\n * needed on form submission.\n *\n * If you do need to populate initial values into your form, using a one-way binding for\n * `ngModel` tends to be sufficient as long as you use the exported form's value rather\n * than the domain model's value on submit.\n *\n * ### Using ngModel within a form\n *\n * The following example shows controls using `ngModel` within a form:\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * ### Using a standalone ngModel within a group\n *\n * The following example shows you how to use a standalone ngModel control\n * within a form. This controls the display of the form, but doesn't contain form data.\n *\n * ```html\n * <form>\n *   <input name=\"login\" ngModel placeholder=\"Login\">\n *   <input type=\"checkbox\" ngModel [ngModelOptions]=\"{standalone: true}\"> Show more options?\n * </form>\n * <!-- form value: {login: ''} -->\n * ```\n *\n * ### Setting the ngModel `name` attribute through options\n *\n * The following example shows you an alternate way to set the name attribute. Here,\n * an attribute identified as name is used within a custom form control component. To still be able\n * to specify the NgModel's name, you must specify it using the `ngModelOptions` input instead.\n *\n * ```html\n * <form>\n *   <my-custom-form-control name=\"Nancy\" ngModel [ngModelOptions]=\"{name: 'user'}\">\n *   </my-custom-form-control>\n * </form>\n * <!-- form value: {user: ''} -->\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgModel extends NgControl {\n    constructor(parent, validators, asyncValidators, valueAccessors) {\n        super();\n        this.control = new FormControl();\n        /** @internal */\n        this._registered = false;\n        /**\n         * @description\n         * Event emitter for producing the `ngModelChange` event after\n         * the view model updates.\n         */\n        this.update = new EventEmitter();\n        this._parent = parent;\n        this._setValidators(validators);\n        this._setAsyncValidators(asyncValidators);\n        this.valueAccessor = selectValueAccessor(this, valueAccessors);\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        this._checkForErrors();\n        if (!this._registered)\n            this._setUpControl();\n        if ('isDisabled' in changes) {\n            this._updateDisabled(changes);\n        }\n        if (isPropertyUpdated(changes, this.viewModel)) {\n            this._updateValue(this.model);\n            this.viewModel = this.model;\n        }\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        this.formDirective && this.formDirective.removeControl(this);\n    }\n    /**\n     * @description\n     * Returns an array that represents the path from the top-level form to this control.\n     * Each index is the string name of the control on that level.\n     */\n    get path() {\n        return this._parent ? controlPath(this.name, this._parent) : [this.name];\n    }\n    /**\n     * @description\n     * The top-level directive for this control if present, otherwise null.\n     */\n    get formDirective() {\n        return this._parent ? this._parent.formDirective : null;\n    }\n    /**\n     * @description\n     * Sets the new value for the view model and emits an `ngModelChange` event.\n     *\n     * @param newValue The new value emitted by `ngModelChange`.\n     */\n    viewToModelUpdate(newValue) {\n        this.viewModel = newValue;\n        this.update.emit(newValue);\n    }\n    _setUpControl() {\n        this._setUpdateStrategy();\n        this._isStandalone() ? this._setUpStandalone() : this.formDirective.addControl(this);\n        this._registered = true;\n    }\n    _setUpdateStrategy() {\n        if (this.options && this.options.updateOn != null) {\n            this.control._updateOn = this.options.updateOn;\n        }\n    }\n    _isStandalone() {\n        return !this._parent || !!(this.options && this.options.standalone);\n    }\n    _setUpStandalone() {\n        setUpControl(this.control, this);\n        this.control.updateValueAndValidity({ emitEvent: false });\n    }\n    _checkForErrors() {\n        if (!this._isStandalone()) {\n            this._checkParentType();\n        }\n        this._checkName();\n    }\n    _checkParentType() {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (!(this._parent instanceof NgModelGroup) &&\n                this._parent instanceof AbstractFormGroupDirective) {\n                throw formGroupNameException();\n            }\n            else if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n                throw modelParentException();\n            }\n        }\n    }\n    _checkName() {\n        if (this.options && this.options.name)\n            this.name = this.options.name;\n        if (!this._isStandalone() && !this.name && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw missingNameException();\n        }\n    }\n    _updateValue(value) {\n        resolvedPromise$1.then(() => {\n            this.control.setValue(value, { emitViewToModelChange: false });\n        });\n    }\n    _updateDisabled(changes) {\n        const disabledValue = changes['isDisabled'].currentValue;\n        const isDisabled = disabledValue === '' || (disabledValue && disabledValue !== 'false');\n        resolvedPromise$1.then(() => {\n            if (isDisabled && !this.control.disabled) {\n                this.control.disable();\n            }\n            else if (!isDisabled && this.control.disabled) {\n                this.control.enable();\n            }\n        });\n    }\n}\nNgModel.ɵfac = function NgModel_Factory(t) { return new (t || NgModel)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 9), ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_VALUE_ACCESSOR, 10)); };\nNgModel.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgModel, selectors: [[\"\", \"ngModel\", \"\", 3, \"formControlName\", \"\", 3, \"formControl\", \"\"]], inputs: { name: \"name\", isDisabled: [\"disabled\", \"isDisabled\"], model: [\"ngModel\", \"model\"], options: [\"ngModelOptions\", \"options\"] }, outputs: { update: \"ngModelChange\" }, exportAs: [\"ngModel\"], features: [ɵngcc0.ɵɵProvidersFeature([formControlBinding]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature] });\nNgModel.ctorParameters = () => [\n    { type: ControlContainer, decorators: [{ type: Optional }, { type: Host }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALUE_ACCESSOR,] }] }\n];\nNgModel.propDecorators = {\n    name: [{ type: Input }],\n    isDisabled: [{ type: Input, args: ['disabled',] }],\n    model: [{ type: Input, args: ['ngModel',] }],\n    options: [{ type: Input, args: ['ngModelOptions',] }],\n    update: [{ type: Output, args: ['ngModelChange',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgModel, [{\n        type: Directive,\n        args: [{\n                selector: '[ngModel]:not([formControlName]):not([formControl])',\n                providers: [formControlBinding],\n                exportAs: 'ngModel'\n            }]\n    }], function () { return [{ type: ControlContainer, decorators: [{\n                type: Optional\n            }, {\n                type: Host\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_VALIDATORS]\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_ASYNC_VALIDATORS]\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_VALUE_ACCESSOR]\n            }] }]; }, { update: [{\n            type: Output,\n            args: ['ngModelChange']\n        }], name: [{\n            type: Input\n        }], isDisabled: [{\n            type: Input,\n            args: ['disabled']\n        }], model: [{\n            type: Input,\n            args: ['ngModel']\n        }], options: [{\n            type: Input,\n            args: ['ngModelOptions']\n        }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * Adds `novalidate` attribute to all forms by default.\n *\n * `novalidate` is used to disable browser's native form validation.\n *\n * If you want to use native validation with Angular forms, just add `ngNativeValidate` attribute:\n *\n * ```\n * <form ngNativeValidate></form>\n * ```\n *\n * @publicApi\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n */\nclass ɵNgNoValidate {\n}\nɵNgNoValidate.ɵfac = function ɵNgNoValidate_Factory(t) { return new (t || ɵNgNoValidate)(); };\nɵNgNoValidate.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: ɵNgNoValidate, selectors: [[\"form\", 3, \"ngNoForm\", \"\", 3, \"ngNativeValidate\", \"\"]], hostAttrs: [\"novalidate\", \"\"] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ɵNgNoValidate, [{\n        type: Directive,\n        args: [{\n                selector: 'form:not([ngNoForm]):not([ngNativeValidate])',\n                host: { 'novalidate': '' }\n            }]\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NUMBER_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => NumberValueAccessor),\n    multi: true\n};\n/**\n * @description\n * The `ControlValueAccessor` for writing a number value and listening to number input changes.\n * The value accessor is used by the `FormControlDirective`, `FormControlName`, and `NgModel`\n * directives.\n *\n * @usageNotes\n *\n * ### Using a number input with a reactive form.\n *\n * The following example shows how to use a number input with a reactive form.\n *\n * ```ts\n * const totalCountControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"number\" [formControl]=\"totalCountControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass NumberValueAccessor extends BuiltInControlValueAccessor {\n    /**\n     * Sets the \"value\" property on the input element.\n     * @nodoc\n     */\n    writeValue(value) {\n        // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n        const normalizedValue = value == null ? '' : value;\n        this.setProperty('value', normalizedValue);\n    }\n    /**\n     * Registers a function called when the control value changes.\n     * @nodoc\n     */\n    registerOnChange(fn) {\n        this.onChange = (value) => {\n            fn(value == '' ? null : parseFloat(value));\n        };\n    }\n}\nNumberValueAccessor.ɵfac = /*@__PURE__*/ function () { let ɵNumberValueAccessor_BaseFactory; return function NumberValueAccessor_Factory(t) { return (ɵNumberValueAccessor_BaseFactory || (ɵNumberValueAccessor_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NumberValueAccessor)))(t || NumberValueAccessor); }; }();\nNumberValueAccessor.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NumberValueAccessor, selectors: [[\"input\", \"type\", \"number\", \"formControlName\", \"\"], [\"input\", \"type\", \"number\", \"formControl\", \"\"], [\"input\", \"type\", \"number\", \"ngModel\", \"\"]], hostBindings: function NumberValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"input\", function NumberValueAccessor_input_HostBindingHandler($event) { return ctx.onChange($event.target.value); })(\"blur\", function NumberValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });\n    } }, features: [ɵngcc0.ɵɵProvidersFeature([NUMBER_VALUE_ACCESSOR]), ɵngcc0.ɵɵInheritDefinitionFeature] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NumberValueAccessor, [{\n        type: Directive,\n        args: [{\n                selector: 'input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]',\n                host: { '(input)': 'onChange($event.target.value)', '(blur)': 'onTouched()' },\n                providers: [NUMBER_VALUE_ACCESSOR]\n            }]\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst RADIO_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => RadioControlValueAccessor),\n    multi: true\n};\nfunction throwNameError() {\n    throw new Error(`\n      If you define both a name and a formControlName attribute on your radio button, their values\n      must match. Ex: <input type=\"radio\" formControlName=\"food\" name=\"food\">\n    `);\n}\n/**\n * Internal-only NgModule that works as a host for the `RadioControlRegistry` tree-shakable\n * provider. Note: the `InternalFormsSharedModule` can not be used here directly, since it's\n * declared *after* the `RadioControlRegistry` class and the `providedIn` doesn't support\n * `forwardRef` logic.\n */\nclass RadioControlRegistryModule {\n}\nRadioControlRegistryModule.ɵfac = function RadioControlRegistryModule_Factory(t) { return new (t || RadioControlRegistryModule)(); };\nRadioControlRegistryModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: RadioControlRegistryModule });\nRadioControlRegistryModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({});\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(RadioControlRegistryModule, [{\n        type: NgModule\n    }], null, null); })();\n/**\n * @description\n * Class used by Angular to track radio buttons. For internal use only.\n */\nclass RadioControlRegistry {\n    constructor() {\n        this._accessors = [];\n    }\n    /**\n     * @description\n     * Adds a control to the internal registry. For internal use only.\n     */\n    add(control, accessor) {\n        this._accessors.push([control, accessor]);\n    }\n    /**\n     * @description\n     * Removes a control from the internal registry. For internal use only.\n     */\n    remove(accessor) {\n        for (let i = this._accessors.length - 1; i >= 0; --i) {\n            if (this._accessors[i][1] === accessor) {\n                this._accessors.splice(i, 1);\n                return;\n            }\n        }\n    }\n    /**\n     * @description\n     * Selects a radio button. For internal use only.\n     */\n    select(accessor) {\n        this._accessors.forEach((c) => {\n            if (this._isSameGroup(c, accessor) && c[1] !== accessor) {\n                c[1].fireUncheck(accessor.value);\n            }\n        });\n    }\n    _isSameGroup(controlPair, accessor) {\n        if (!controlPair[0].control)\n            return false;\n        return controlPair[0]._parent === accessor._control._parent &&\n            controlPair[1].name === accessor.name;\n    }\n}\nRadioControlRegistry.ɵfac = function RadioControlRegistry_Factory(t) { return new (t || RadioControlRegistry)(); };\nRadioControlRegistry.ɵprov = ɵɵdefineInjectable({ factory: function RadioControlRegistry_Factory() { return new RadioControlRegistry(); }, token: RadioControlRegistry, providedIn: RadioControlRegistryModule });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(RadioControlRegistry, [{\n        type: Injectable,\n        args: [{ providedIn: RadioControlRegistryModule }]\n    }], function () { return []; }, null); })();\n/**\n * @description\n * The `ControlValueAccessor` for writing radio control values and listening to radio control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using radio buttons with reactive form directives\n *\n * The follow example shows how to use radio buttons in a reactive form. When using radio buttons in\n * a reactive form, radio buttons in the same group should have the same `formControlName`.\n * Providing a `name` attribute is optional.\n *\n * {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass RadioControlValueAccessor extends BuiltInControlValueAccessor {\n    constructor(renderer, elementRef, _registry, _injector) {\n        super(renderer, elementRef);\n        this._registry = _registry;\n        this._injector = _injector;\n        /**\n         * The registered callback function called when a change event occurs on the input element.\n         * Note: we declare `onChange` here (also used as host listener) as a function with no arguments\n         * to override the `onChange` function (which expects 1 argument) in the parent\n         * `BaseControlValueAccessor` class.\n         * @nodoc\n         */\n        this.onChange = () => { };\n    }\n    /** @nodoc */\n    ngOnInit() {\n        this._control = this._injector.get(NgControl);\n        this._checkName();\n        this._registry.add(this._control, this);\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        this._registry.remove(this);\n    }\n    /**\n     * Sets the \"checked\" property value on the radio input element.\n     * @nodoc\n     */\n    writeValue(value) {\n        this._state = value === this.value;\n        this.setProperty('checked', this._state);\n    }\n    /**\n     * Registers a function called when the control value changes.\n     * @nodoc\n     */\n    registerOnChange(fn) {\n        this._fn = fn;\n        this.onChange = () => {\n            fn(this.value);\n            this._registry.select(this);\n        };\n    }\n    /**\n     * Sets the \"value\" on the radio input element and unchecks it.\n     *\n     * @param value\n     */\n    fireUncheck(value) {\n        this.writeValue(value);\n    }\n    _checkName() {\n        if (this.name && this.formControlName && this.name !== this.formControlName &&\n            (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throwNameError();\n        }\n        if (!this.name && this.formControlName)\n            this.name = this.formControlName;\n    }\n}\nRadioControlValueAccessor.ɵfac = function RadioControlValueAccessor_Factory(t) { return new (t || RadioControlValueAccessor)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(RadioControlRegistry), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Injector)); };\nRadioControlValueAccessor.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: RadioControlValueAccessor, selectors: [[\"input\", \"type\", \"radio\", \"formControlName\", \"\"], [\"input\", \"type\", \"radio\", \"formControl\", \"\"], [\"input\", \"type\", \"radio\", \"ngModel\", \"\"]], hostBindings: function RadioControlValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"change\", function RadioControlValueAccessor_change_HostBindingHandler() { return ctx.onChange(); })(\"blur\", function RadioControlValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });\n    } }, inputs: { name: \"name\", formControlName: \"formControlName\", value: \"value\" }, features: [ɵngcc0.ɵɵProvidersFeature([RADIO_VALUE_ACCESSOR]), ɵngcc0.ɵɵInheritDefinitionFeature] });\nRadioControlValueAccessor.ctorParameters = () => [\n    { type: Renderer2 },\n    { type: ElementRef },\n    { type: RadioControlRegistry },\n    { type: Injector }\n];\nRadioControlValueAccessor.propDecorators = {\n    name: [{ type: Input }],\n    formControlName: [{ type: Input }],\n    value: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(RadioControlValueAccessor, [{\n        type: Directive,\n        args: [{\n                selector: 'input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]',\n                host: { '(change)': 'onChange()', '(blur)': 'onTouched()' },\n                providers: [RADIO_VALUE_ACCESSOR]\n            }]\n    }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }, { type: RadioControlRegistry }, { type: ɵngcc0.Injector }]; }, { name: [{\n            type: Input\n        }], formControlName: [{\n            type: Input\n        }], value: [{\n            type: Input\n        }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst RANGE_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => RangeValueAccessor),\n    multi: true\n};\n/**\n * @description\n * The `ControlValueAccessor` for writing a range value and listening to range input changes.\n * The value accessor is used by the `FormControlDirective`, `FormControlName`, and  `NgModel`\n * directives.\n *\n * @usageNotes\n *\n * ### Using a range input with a reactive form\n *\n * The following example shows how to use a range input with a reactive form.\n *\n * ```ts\n * const ageControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"range\" [formControl]=\"ageControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass RangeValueAccessor extends BuiltInControlValueAccessor {\n    /**\n     * Sets the \"value\" property on the input element.\n     * @nodoc\n     */\n    writeValue(value) {\n        this.setProperty('value', parseFloat(value));\n    }\n    /**\n     * Registers a function called when the control value changes.\n     * @nodoc\n     */\n    registerOnChange(fn) {\n        this.onChange = (value) => {\n            fn(value == '' ? null : parseFloat(value));\n        };\n    }\n}\nRangeValueAccessor.ɵfac = /*@__PURE__*/ function () { let ɵRangeValueAccessor_BaseFactory; return function RangeValueAccessor_Factory(t) { return (ɵRangeValueAccessor_BaseFactory || (ɵRangeValueAccessor_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(RangeValueAccessor)))(t || RangeValueAccessor); }; }();\nRangeValueAccessor.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: RangeValueAccessor, selectors: [[\"input\", \"type\", \"range\", \"formControlName\", \"\"], [\"input\", \"type\", \"range\", \"formControl\", \"\"], [\"input\", \"type\", \"range\", \"ngModel\", \"\"]], hostBindings: function RangeValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"change\", function RangeValueAccessor_change_HostBindingHandler($event) { return ctx.onChange($event.target.value); })(\"input\", function RangeValueAccessor_input_HostBindingHandler($event) { return ctx.onChange($event.target.value); })(\"blur\", function RangeValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });\n    } }, features: [ɵngcc0.ɵɵProvidersFeature([RANGE_VALUE_ACCESSOR]), ɵngcc0.ɵɵInheritDefinitionFeature] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(RangeValueAccessor, [{\n        type: Directive,\n        args: [{\n                selector: 'input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]',\n                host: {\n                    '(change)': 'onChange($event.target.value)',\n                    '(input)': 'onChange($event.target.value)',\n                    '(blur)': 'onTouched()'\n                },\n                providers: [RANGE_VALUE_ACCESSOR]\n            }]\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Token to provide to turn off the ngModel warning on formControl and formControlName.\n */\nconst NG_MODEL_WITH_FORM_CONTROL_WARNING = new InjectionToken('NgModelWithFormControlWarning');\nconst formControlBinding$1 = {\n    provide: NgControl,\n    useExisting: forwardRef(() => FormControlDirective)\n};\n/**\n * @description\n * Synchronizes a standalone `FormControl` instance to a form control element.\n *\n * Note that support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives was deprecated in Angular v6 and is scheduled for removal in\n * a future version of Angular.\n * For details, see [Deprecated features](guide/deprecations#ngmodel-with-reactive-forms).\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `FormControl`\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * The following example shows how to register a standalone control and set its value.\n *\n * {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormControlDirective extends NgControl {\n    constructor(validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {\n        super();\n        this._ngModelWarningConfig = _ngModelWarningConfig;\n        /** @deprecated as of v6 */\n        this.update = new EventEmitter();\n        /**\n         * @description\n         * Instance property used to track whether an ngModel warning has been sent out for this\n         * particular `FormControlDirective` instance. Used to support warning config of \"always\".\n         *\n         * @internal\n         */\n        this._ngModelWarningSent = false;\n        this._setValidators(validators);\n        this._setAsyncValidators(asyncValidators);\n        this.valueAccessor = selectValueAccessor(this, valueAccessors);\n    }\n    /**\n     * @description\n     * Triggers a warning in dev mode that this input should not be used with reactive forms.\n     */\n    set isDisabled(isDisabled) {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            console.warn(disabledAttrWarning);\n        }\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        if (this._isControlChanged(changes)) {\n            const previousForm = changes['form'].previousValue;\n            if (previousForm) {\n                cleanUpControl(previousForm, this, /* validateControlPresenceOnChange */ false);\n            }\n            setUpControl(this.form, this);\n            if (this.control.disabled && this.valueAccessor.setDisabledState) {\n                this.valueAccessor.setDisabledState(true);\n            }\n            this.form.updateValueAndValidity({ emitEvent: false });\n        }\n        if (isPropertyUpdated(changes, this.viewModel)) {\n            if (typeof ngDevMode === 'undefined' || ngDevMode) {\n                _ngModelWarning('formControl', FormControlDirective, this, this._ngModelWarningConfig);\n            }\n            this.form.setValue(this.model);\n            this.viewModel = this.model;\n        }\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        if (this.form) {\n            cleanUpControl(this.form, this, /* validateControlPresenceOnChange */ false);\n        }\n    }\n    /**\n     * @description\n     * Returns an array that represents the path from the top-level form to this control.\n     * Each index is the string name of the control on that level.\n     */\n    get path() {\n        return [];\n    }\n    /**\n     * @description\n     * The `FormControl` bound to this directive.\n     */\n    get control() {\n        return this.form;\n    }\n    /**\n     * @description\n     * Sets the new value for the view model and emits an `ngModelChange` event.\n     *\n     * @param newValue The new value for the view model.\n     */\n    viewToModelUpdate(newValue) {\n        this.viewModel = newValue;\n        this.update.emit(newValue);\n    }\n    _isControlChanged(changes) {\n        return changes.hasOwnProperty('form');\n    }\n}\nFormControlDirective.ɵfac = function FormControlDirective_Factory(t) { return new (t || FormControlDirective)(ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_VALUE_ACCESSOR, 10), ɵngcc0.ɵɵdirectiveInject(NG_MODEL_WITH_FORM_CONTROL_WARNING, 8)); };\nFormControlDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: FormControlDirective, selectors: [[\"\", \"formControl\", \"\"]], inputs: { isDisabled: [\"disabled\", \"isDisabled\"], form: [\"formControl\", \"form\"], model: [\"ngModel\", \"model\"] }, outputs: { update: \"ngModelChange\" }, exportAs: [\"ngForm\"], features: [ɵngcc0.ɵɵProvidersFeature([formControlBinding$1]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature] });\n/**\n * @description\n * Static property used to track whether any ngModel warnings have been sent across\n * all instances of FormControlDirective. Used to support warning config of \"once\".\n *\n * @internal\n */\nFormControlDirective._ngModelWarningSentOnce = false;\nFormControlDirective.ctorParameters = () => [\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALUE_ACCESSOR,] }] },\n    { type: String, decorators: [{ type: Optional }, { type: Inject, args: [NG_MODEL_WITH_FORM_CONTROL_WARNING,] }] }\n];\nFormControlDirective.propDecorators = {\n    form: [{ type: Input, args: ['formControl',] }],\n    isDisabled: [{ type: Input, args: ['disabled',] }],\n    model: [{ type: Input, args: ['ngModel',] }],\n    update: [{ type: Output, args: ['ngModelChange',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormControlDirective, [{\n        type: Directive,\n        args: [{ selector: '[formControl]', providers: [formControlBinding$1], exportAs: 'ngForm' }]\n    }], function () { return [{ type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_VALIDATORS]\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_ASYNC_VALIDATORS]\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_VALUE_ACCESSOR]\n            }] }, { type: String, decorators: [{\n                type: Optional\n            }, {\n                type: Inject,\n                args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]\n            }] }]; }, { update: [{\n            type: Output,\n            args: ['ngModelChange']\n        }], isDisabled: [{\n            type: Input,\n            args: ['disabled']\n        }], form: [{\n            type: Input,\n            args: ['formControl']\n        }], model: [{\n            type: Input,\n            args: ['ngModel']\n        }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst formDirectiveProvider$1 = {\n    provide: ControlContainer,\n    useExisting: forwardRef(() => FormGroupDirective)\n};\n/**\n * @description\n *\n * Binds an existing `FormGroup` to a DOM element.\n *\n * This directive accepts an existing `FormGroup` instance. It will then use this\n * `FormGroup` instance to match any child `FormControl`, `FormGroup`,\n * and `FormArray` instances to child `FormControlName`, `FormGroupName`,\n * and `FormArrayName` directives.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `AbstractControl`\n *\n * @usageNotes\n * ### Register Form Group\n *\n * The following example registers a `FormGroup` with first name and last name controls,\n * and listens for the *ngSubmit* event when the button is clicked.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormGroupDirective extends ControlContainer {\n    constructor(validators, asyncValidators) {\n        super();\n        this.validators = validators;\n        this.asyncValidators = asyncValidators;\n        /**\n         * @description\n         * Reports whether the form submission has been triggered.\n         */\n        this.submitted = false;\n        /**\n         * Callback that should be invoked when controls in FormGroup or FormArray collection change\n         * (added or removed). This callback triggers corresponding DOM updates.\n         */\n        this._onCollectionChange = () => this._updateDomValue();\n        /**\n         * @description\n         * Tracks the list of added `FormControlName` instances\n         */\n        this.directives = [];\n        /**\n         * @description\n         * Tracks the `FormGroup` bound to this directive.\n         */\n        this.form = null;\n        /**\n         * @description\n         * Emits an event when the form submission has been triggered.\n         */\n        this.ngSubmit = new EventEmitter();\n        this._setValidators(validators);\n        this._setAsyncValidators(asyncValidators);\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        this._checkFormPresent();\n        if (changes.hasOwnProperty('form')) {\n            this._updateValidators();\n            this._updateDomValue();\n            this._updateRegistrations();\n            this._oldForm = this.form;\n        }\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        if (this.form) {\n            cleanUpValidators(this.form, this);\n            // Currently the `onCollectionChange` callback is rewritten each time the\n            // `_registerOnCollectionChange` function is invoked. The implication is that cleanup should\n            // happen *only* when the `onCollectionChange` callback was set by this directive instance.\n            // Otherwise it might cause overriding a callback of some other directive instances. We should\n            // consider updating this logic later to make it similar to how `onChange` callbacks are\n            // handled, see https://github.com/angular/angular/issues/39732 for additional info.\n            if (this.form._onCollectionChange === this._onCollectionChange) {\n                this.form._registerOnCollectionChange(() => { });\n            }\n        }\n    }\n    /**\n     * @description\n     * Returns this directive's instance.\n     */\n    get formDirective() {\n        return this;\n    }\n    /**\n     * @description\n     * Returns the `FormGroup` bound to this directive.\n     */\n    get control() {\n        return this.form;\n    }\n    /**\n     * @description\n     * Returns an array representing the path to this group. Because this directive\n     * always lives at the top level of a form, it always an empty array.\n     */\n    get path() {\n        return [];\n    }\n    /**\n     * @description\n     * Method that sets up the control directive in this group, re-calculates its value\n     * and validity, and adds the instance to the internal list of directives.\n     *\n     * @param dir The `FormControlName` directive instance.\n     */\n    addControl(dir) {\n        const ctrl = this.form.get(dir.path);\n        setUpControl(ctrl, dir);\n        ctrl.updateValueAndValidity({ emitEvent: false });\n        this.directives.push(dir);\n        return ctrl;\n    }\n    /**\n     * @description\n     * Retrieves the `FormControl` instance from the provided `FormControlName` directive\n     *\n     * @param dir The `FormControlName` directive instance.\n     */\n    getControl(dir) {\n        return this.form.get(dir.path);\n    }\n    /**\n     * @description\n     * Removes the `FormControlName` instance from the internal list of directives\n     *\n     * @param dir The `FormControlName` directive instance.\n     */\n    removeControl(dir) {\n        cleanUpControl(dir.control || null, dir, /* validateControlPresenceOnChange */ false);\n        removeListItem(this.directives, dir);\n    }\n    /**\n     * Adds a new `FormGroupName` directive instance to the form.\n     *\n     * @param dir The `FormGroupName` directive instance.\n     */\n    addFormGroup(dir) {\n        this._setUpFormContainer(dir);\n    }\n    /**\n     * Performs the necessary cleanup when a `FormGroupName` directive instance is removed from the\n     * view.\n     *\n     * @param dir The `FormGroupName` directive instance.\n     */\n    removeFormGroup(dir) {\n        this._cleanUpFormContainer(dir);\n    }\n    /**\n     * @description\n     * Retrieves the `FormGroup` for a provided `FormGroupName` directive instance\n     *\n     * @param dir The `FormGroupName` directive instance.\n     */\n    getFormGroup(dir) {\n        return this.form.get(dir.path);\n    }\n    /**\n     * Performs the necessary setup when a `FormArrayName` directive instance is added to the view.\n     *\n     * @param dir The `FormArrayName` directive instance.\n     */\n    addFormArray(dir) {\n        this._setUpFormContainer(dir);\n    }\n    /**\n     * Performs the necessary cleanup when a `FormArrayName` directive instance is removed from the\n     * view.\n     *\n     * @param dir The `FormArrayName` directive instance.\n     */\n    removeFormArray(dir) {\n        this._cleanUpFormContainer(dir);\n    }\n    /**\n     * @description\n     * Retrieves the `FormArray` for a provided `FormArrayName` directive instance.\n     *\n     * @param dir The `FormArrayName` directive instance.\n     */\n    getFormArray(dir) {\n        return this.form.get(dir.path);\n    }\n    /**\n     * Sets the new value for the provided `FormControlName` directive.\n     *\n     * @param dir The `FormControlName` directive instance.\n     * @param value The new value for the directive's control.\n     */\n    updateModel(dir, value) {\n        const ctrl = this.form.get(dir.path);\n        ctrl.setValue(value);\n    }\n    /**\n     * @description\n     * Method called with the \"submit\" event is triggered on the form.\n     * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n     *\n     * @param $event The \"submit\" event object\n     */\n    onSubmit($event) {\n        this.submitted = true;\n        syncPendingControls(this.form, this.directives);\n        this.ngSubmit.emit($event);\n        return false;\n    }\n    /**\n     * @description\n     * Method called when the \"reset\" event is triggered on the form.\n     */\n    onReset() {\n        this.resetForm();\n    }\n    /**\n     * @description\n     * Resets the form to an initial value and resets its submitted status.\n     *\n     * @param value The new value for the form.\n     */\n    resetForm(value = undefined) {\n        this.form.reset(value);\n        this.submitted = false;\n    }\n    /** @internal */\n    _updateDomValue() {\n        this.directives.forEach(dir => {\n            const oldCtrl = dir.control;\n            const newCtrl = this.form.get(dir.path);\n            if (oldCtrl !== newCtrl) {\n                // Note: the value of the `dir.control` may not be defined, for example when it's a first\n                // `FormControl` that is added to a `FormGroup` instance (via `addControl` call).\n                cleanUpControl(oldCtrl || null, dir);\n                // Check whether new control at the same location inside the corresponding `FormGroup` is an\n                // instance of `FormControl` and perform control setup only if that's the case.\n                // Note: we don't need to clear the list of directives (`this.directives`) here, it would be\n                // taken care of in the `removeControl` method invoked when corresponding `formControlName`\n                // directive instance is being removed (invoked from `FormControlName.ngOnDestroy`).\n                if (newCtrl instanceof FormControl) {\n                    setUpControl(newCtrl, dir);\n                    dir.control = newCtrl;\n                }\n            }\n        });\n        this.form._updateTreeValidity({ emitEvent: false });\n    }\n    _setUpFormContainer(dir) {\n        const ctrl = this.form.get(dir.path);\n        setUpFormContainer(ctrl, dir);\n        // NOTE: this operation looks unnecessary in case no new validators were added in\n        // `setUpFormContainer` call. Consider updating this code to match the logic in\n        // `_cleanUpFormContainer` function.\n        ctrl.updateValueAndValidity({ emitEvent: false });\n    }\n    _cleanUpFormContainer(dir) {\n        if (this.form) {\n            const ctrl = this.form.get(dir.path);\n            if (ctrl) {\n                const isControlUpdated = cleanUpFormContainer(ctrl, dir);\n                if (isControlUpdated) {\n                    // Run validity check only in case a control was updated (i.e. view validators were\n                    // removed) as removing view validators might cause validity to change.\n                    ctrl.updateValueAndValidity({ emitEvent: false });\n                }\n            }\n        }\n    }\n    _updateRegistrations() {\n        this.form._registerOnCollectionChange(this._onCollectionChange);\n        if (this._oldForm) {\n            this._oldForm._registerOnCollectionChange(() => { });\n        }\n    }\n    _updateValidators() {\n        setUpValidators(this.form, this);\n        if (this._oldForm) {\n            cleanUpValidators(this._oldForm, this);\n        }\n    }\n    _checkFormPresent() {\n        if (!this.form && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw missingFormException();\n        }\n    }\n}\nFormGroupDirective.ɵfac = function FormGroupDirective_Factory(t) { return new (t || FormGroupDirective)(ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10)); };\nFormGroupDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: FormGroupDirective, selectors: [[\"\", \"formGroup\", \"\"]], hostBindings: function FormGroupDirective_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"submit\", function FormGroupDirective_submit_HostBindingHandler($event) { return ctx.onSubmit($event); })(\"reset\", function FormGroupDirective_reset_HostBindingHandler() { return ctx.onReset(); });\n    } }, inputs: { form: [\"formGroup\", \"form\"] }, outputs: { ngSubmit: \"ngSubmit\" }, exportAs: [\"ngForm\"], features: [ɵngcc0.ɵɵProvidersFeature([formDirectiveProvider$1]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature] });\nFormGroupDirective.ctorParameters = () => [\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] }] }\n];\nFormGroupDirective.propDecorators = {\n    form: [{ type: Input, args: ['formGroup',] }],\n    ngSubmit: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormGroupDirective, [{\n        type: Directive,\n        args: [{\n                selector: '[formGroup]',\n                providers: [formDirectiveProvider$1],\n                host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },\n                exportAs: 'ngForm'\n            }]\n    }], function () { return [{ type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_VALIDATORS]\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_ASYNC_VALIDATORS]\n            }] }]; }, { form: [{\n            type: Input,\n            args: ['formGroup']\n        }], ngSubmit: [{\n            type: Output\n        }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst formGroupNameProvider = {\n    provide: ControlContainer,\n    useExisting: forwardRef(() => FormGroupName)\n};\n/**\n * @description\n *\n * Syncs a nested `FormGroup` to a DOM element.\n *\n * This directive can only be used with a parent `FormGroupDirective`.\n *\n * It accepts the string name of the nested `FormGroup` to link, and\n * looks for a `FormGroup` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n *\n * Use nested form groups to validate a sub-group of a\n * form separately from the rest or to group the values of certain\n * controls into their own nested object.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n *\n * @usageNotes\n *\n * ### Access the group by name\n *\n * The following example uses the {@link AbstractControl#get get} method to access the\n * associated `FormGroup`\n *\n * ```ts\n *   this.form.get('name');\n * ```\n *\n * ### Access individual controls in the group\n *\n * The following example uses the {@link AbstractControl#get get} method to access\n * individual controls within the group using dot syntax.\n *\n * ```ts\n *   this.form.get('name.first');\n * ```\n *\n * ### Register a nested `FormGroup`.\n *\n * The following example registers a nested *name* `FormGroup` within an existing `FormGroup`,\n * and provides methods to retrieve the nested `FormGroup` and individual controls.\n *\n * {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormGroupName extends AbstractFormGroupDirective {\n    constructor(parent, validators, asyncValidators) {\n        super();\n        this._parent = parent;\n        this._setValidators(validators);\n        this._setAsyncValidators(asyncValidators);\n    }\n    /** @internal */\n    _checkParentType() {\n        if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw groupParentException();\n        }\n    }\n}\nFormGroupName.ɵfac = function FormGroupName_Factory(t) { return new (t || FormGroupName)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 13), ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10)); };\nFormGroupName.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: FormGroupName, selectors: [[\"\", \"formGroupName\", \"\"]], inputs: { name: [\"formGroupName\", \"name\"] }, features: [ɵngcc0.ɵɵProvidersFeature([formGroupNameProvider]), ɵngcc0.ɵɵInheritDefinitionFeature] });\nFormGroupName.ctorParameters = () => [\n    { type: ControlContainer, decorators: [{ type: Optional }, { type: Host }, { type: SkipSelf }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] }] }\n];\nFormGroupName.propDecorators = {\n    name: [{ type: Input, args: ['formGroupName',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormGroupName, [{\n        type: Directive,\n        args: [{ selector: '[formGroupName]', providers: [formGroupNameProvider] }]\n    }], function () { return [{ type: ControlContainer, decorators: [{\n                type: Optional\n            }, {\n                type: Host\n            }, {\n                type: SkipSelf\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_VALIDATORS]\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_ASYNC_VALIDATORS]\n            }] }]; }, { name: [{\n            type: Input,\n            args: ['formGroupName']\n        }] }); })();\nconst formArrayNameProvider = {\n    provide: ControlContainer,\n    useExisting: forwardRef(() => FormArrayName)\n};\n/**\n * @description\n *\n * Syncs a nested `FormArray` to a DOM element.\n *\n * This directive is designed to be used with a parent `FormGroupDirective` (selector:\n * `[formGroup]`).\n *\n * It accepts the string name of the nested `FormArray` you want to link, and\n * will look for a `FormArray` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormArrayName extends ControlContainer {\n    constructor(parent, validators, asyncValidators) {\n        super();\n        this._parent = parent;\n        this._setValidators(validators);\n        this._setAsyncValidators(asyncValidators);\n    }\n    /**\n     * A lifecycle method called when the directive's inputs are initialized. For internal use only.\n     * @throws If the directive does not have a valid parent.\n     * @nodoc\n     */\n    ngOnInit() {\n        this._checkParentType();\n        this.formDirective.addFormArray(this);\n    }\n    /**\n     * A lifecycle method called before the directive's instance is destroyed. For internal use only.\n     * @nodoc\n     */\n    ngOnDestroy() {\n        if (this.formDirective) {\n            this.formDirective.removeFormArray(this);\n        }\n    }\n    /**\n     * @description\n     * The `FormArray` bound to this directive.\n     */\n    get control() {\n        return this.formDirective.getFormArray(this);\n    }\n    /**\n     * @description\n     * The top-level directive for this group if present, otherwise null.\n     */\n    get formDirective() {\n        return this._parent ? this._parent.formDirective : null;\n    }\n    /**\n     * @description\n     * Returns an array that represents the path from the top-level form to this control.\n     * Each index is the string name of the control on that level.\n     */\n    get path() {\n        return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n    }\n    _checkParentType() {\n        if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw arrayParentException();\n        }\n    }\n}\nFormArrayName.ɵfac = function FormArrayName_Factory(t) { return new (t || FormArrayName)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 13), ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10)); };\nFormArrayName.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: FormArrayName, selectors: [[\"\", \"formArrayName\", \"\"]], inputs: { name: [\"formArrayName\", \"name\"] }, features: [ɵngcc0.ɵɵProvidersFeature([formArrayNameProvider]), ɵngcc0.ɵɵInheritDefinitionFeature] });\nFormArrayName.ctorParameters = () => [\n    { type: ControlContainer, decorators: [{ type: Optional }, { type: Host }, { type: SkipSelf }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] }] }\n];\nFormArrayName.propDecorators = {\n    name: [{ type: Input, args: ['formArrayName',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormArrayName, [{\n        type: Directive,\n        args: [{ selector: '[formArrayName]', providers: [formArrayNameProvider] }]\n    }], function () { return [{ type: ControlContainer, decorators: [{\n                type: Optional\n            }, {\n                type: Host\n            }, {\n                type: SkipSelf\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_VALIDATORS]\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_ASYNC_VALIDATORS]\n            }] }]; }, { name: [{\n            type: Input,\n            args: ['formArrayName']\n        }] }); })();\nfunction _hasInvalidParent(parent) {\n    return !(parent instanceof FormGroupName) && !(parent instanceof FormGroupDirective) &&\n        !(parent instanceof FormArrayName);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst controlNameBinding = {\n    provide: NgControl,\n    useExisting: forwardRef(() => FormControlName)\n};\n/**\n * @description\n * Syncs a `FormControl` in an existing `FormGroup` to a form control\n * element by name.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `FormControl`\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * ### Register `FormControl` within a group\n *\n * The following example shows how to register multiple form controls within a form group\n * and set their value.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * To see `formControlName` examples with different form control types, see:\n *\n * * Radio buttons: `RadioControlValueAccessor`\n * * Selects: `SelectControlValueAccessor`\n *\n * ### Use with ngModel is deprecated\n *\n * Support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives has been deprecated in Angular v6 and is scheduled for removal in\n * a future version of Angular.\n *\n * For details, see [Deprecated features](guide/deprecations#ngmodel-with-reactive-forms).\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormControlName extends NgControl {\n    constructor(parent, validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {\n        super();\n        this._ngModelWarningConfig = _ngModelWarningConfig;\n        this._added = false;\n        /** @deprecated as of v6 */\n        this.update = new EventEmitter();\n        /**\n         * @description\n         * Instance property used to track whether an ngModel warning has been sent out for this\n         * particular FormControlName instance. Used to support warning config of \"always\".\n         *\n         * @internal\n         */\n        this._ngModelWarningSent = false;\n        this._parent = parent;\n        this._setValidators(validators);\n        this._setAsyncValidators(asyncValidators);\n        this.valueAccessor = selectValueAccessor(this, valueAccessors);\n    }\n    /**\n     * @description\n     * Triggers a warning in dev mode that this input should not be used with reactive forms.\n     */\n    set isDisabled(isDisabled) {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            console.warn(disabledAttrWarning);\n        }\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        if (!this._added)\n            this._setUpControl();\n        if (isPropertyUpdated(changes, this.viewModel)) {\n            if (typeof ngDevMode === 'undefined' || ngDevMode) {\n                _ngModelWarning('formControlName', FormControlName, this, this._ngModelWarningConfig);\n            }\n            this.viewModel = this.model;\n            this.formDirective.updateModel(this, this.model);\n        }\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        if (this.formDirective) {\n            this.formDirective.removeControl(this);\n        }\n    }\n    /**\n     * @description\n     * Sets the new value for the view model and emits an `ngModelChange` event.\n     *\n     * @param newValue The new value for the view model.\n     */\n    viewToModelUpdate(newValue) {\n        this.viewModel = newValue;\n        this.update.emit(newValue);\n    }\n    /**\n     * @description\n     * Returns an array that represents the path from the top-level form to this control.\n     * Each index is the string name of the control on that level.\n     */\n    get path() {\n        return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n    }\n    /**\n     * @description\n     * The top-level directive for this group if present, otherwise null.\n     */\n    get formDirective() {\n        return this._parent ? this._parent.formDirective : null;\n    }\n    _checkParentType() {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (!(this._parent instanceof FormGroupName) &&\n                this._parent instanceof AbstractFormGroupDirective) {\n                throw ngModelGroupException();\n            }\n            else if (!(this._parent instanceof FormGroupName) &&\n                !(this._parent instanceof FormGroupDirective) &&\n                !(this._parent instanceof FormArrayName)) {\n                throw controlParentException();\n            }\n        }\n    }\n    _setUpControl() {\n        this._checkParentType();\n        this.control = this.formDirective.addControl(this);\n        if (this.control.disabled && this.valueAccessor.setDisabledState) {\n            this.valueAccessor.setDisabledState(true);\n        }\n        this._added = true;\n    }\n}\nFormControlName.ɵfac = function FormControlName_Factory(t) { return new (t || FormControlName)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 13), ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_VALUE_ACCESSOR, 10), ɵngcc0.ɵɵdirectiveInject(NG_MODEL_WITH_FORM_CONTROL_WARNING, 8)); };\nFormControlName.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: FormControlName, selectors: [[\"\", \"formControlName\", \"\"]], inputs: { isDisabled: [\"disabled\", \"isDisabled\"], name: [\"formControlName\", \"name\"], model: [\"ngModel\", \"model\"] }, outputs: { update: \"ngModelChange\" }, features: [ɵngcc0.ɵɵProvidersFeature([controlNameBinding]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature] });\n/**\n * @description\n * Static property used to track whether any ngModel warnings have been sent across\n * all instances of FormControlName. Used to support warning config of \"once\".\n *\n * @internal\n */\nFormControlName._ngModelWarningSentOnce = false;\nFormControlName.ctorParameters = () => [\n    { type: ControlContainer, decorators: [{ type: Optional }, { type: Host }, { type: SkipSelf }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] }] },\n    { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALUE_ACCESSOR,] }] },\n    { type: String, decorators: [{ type: Optional }, { type: Inject, args: [NG_MODEL_WITH_FORM_CONTROL_WARNING,] }] }\n];\nFormControlName.propDecorators = {\n    name: [{ type: Input, args: ['formControlName',] }],\n    isDisabled: [{ type: Input, args: ['disabled',] }],\n    model: [{ type: Input, args: ['ngModel',] }],\n    update: [{ type: Output, args: ['ngModelChange',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormControlName, [{\n        type: Directive,\n        args: [{ selector: '[formControlName]', providers: [controlNameBinding] }]\n    }], function () { return [{ type: ControlContainer, decorators: [{\n                type: Optional\n            }, {\n                type: Host\n            }, {\n                type: SkipSelf\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_VALIDATORS]\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_ASYNC_VALIDATORS]\n            }] }, { type: Array, decorators: [{\n                type: Optional\n            }, {\n                type: Self\n            }, {\n                type: Inject,\n                args: [NG_VALUE_ACCESSOR]\n            }] }, { type: String, decorators: [{\n                type: Optional\n            }, {\n                type: Inject,\n                args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]\n            }] }]; }, { update: [{\n            type: Output,\n            args: ['ngModelChange']\n        }], isDisabled: [{\n            type: Input,\n            args: ['disabled']\n        }], name: [{\n            type: Input,\n            args: ['formControlName']\n        }], model: [{\n            type: Input,\n            args: ['ngModel']\n        }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SELECT_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => SelectControlValueAccessor),\n    multi: true\n};\nfunction _buildValueString(id, value) {\n    if (id == null)\n        return `${value}`;\n    if (value && typeof value === 'object')\n        value = 'Object';\n    return `${id}: ${value}`.slice(0, 50);\n}\nfunction _extractId(valueString) {\n    return valueString.split(':')[0];\n}\n/**\n * @description\n * The `ControlValueAccessor` for writing select control values and listening to select control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using select controls in a reactive form\n *\n * The following examples show how to use a select control in a reactive form.\n *\n * {@example forms/ts/reactiveSelectControl/reactive_select_control_example.ts region='Component'}\n *\n * ### Using select controls in a template-driven form\n *\n * To use a select in a template-driven form, simply add an `ngModel` and a `name`\n * attribute to the main `<select>` tag.\n *\n * {@example forms/ts/selectControl/select_control_example.ts region='Component'}\n *\n * ### Customizing option selection\n *\n * Angular uses object identity to select option. It's possible for the identities of items\n * to change while the data does not. This can happen, for example, if the items are produced\n * from an RPC to the server, and that RPC is re-run. Even if the data hasn't changed, the\n * second response will produce objects with different identities.\n *\n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * `compareWith` takes a **function** which has two arguments: `option1` and `option2`.\n * If `compareWith` is given, Angular selects option by the return value of the function.\n *\n * ```ts\n * const selectedCountriesControl = new FormControl();\n * ```\n *\n * ```\n * <select [compareWith]=\"compareFn\"  [formControl]=\"selectedCountriesControl\">\n *     <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n *         {{country.name}}\n *     </option>\n * </select>\n *\n * compareFn(c1: Country, c2: Country): boolean {\n *     return c1 && c2 ? c1.id === c2.id : c1 === c2;\n * }\n * ```\n *\n * **Note:** We listen to the 'change' event because 'input' events aren't fired\n * for selects in IE, see:\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event#browser_compatibility\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass SelectControlValueAccessor extends BuiltInControlValueAccessor {\n    constructor() {\n        super(...arguments);\n        /** @internal */\n        this._optionMap = new Map();\n        /** @internal */\n        this._idCounter = 0;\n        this._compareWith = Object.is;\n    }\n    /**\n     * @description\n     * Tracks the option comparison algorithm for tracking identities when\n     * checking for changes.\n     */\n    set compareWith(fn) {\n        if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw new Error(`compareWith must be a function, but received ${JSON.stringify(fn)}`);\n        }\n        this._compareWith = fn;\n    }\n    /**\n     * Sets the \"value\" property on the input element. The \"selectedIndex\"\n     * property is also set if an ID is provided on the option element.\n     * @nodoc\n     */\n    writeValue(value) {\n        this.value = value;\n        const id = this._getOptionId(value);\n        if (id == null) {\n            this.setProperty('selectedIndex', -1);\n        }\n        const valueString = _buildValueString(id, value);\n        this.setProperty('value', valueString);\n    }\n    /**\n     * Registers a function called when the control value changes.\n     * @nodoc\n     */\n    registerOnChange(fn) {\n        this.onChange = (valueString) => {\n            this.value = this._getOptionValue(valueString);\n            fn(this.value);\n        };\n    }\n    /** @internal */\n    _registerOption() {\n        return (this._idCounter++).toString();\n    }\n    /** @internal */\n    _getOptionId(value) {\n        for (const id of Array.from(this._optionMap.keys())) {\n            if (this._compareWith(this._optionMap.get(id), value))\n                return id;\n        }\n        return null;\n    }\n    /** @internal */\n    _getOptionValue(valueString) {\n        const id = _extractId(valueString);\n        return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;\n    }\n}\nSelectControlValueAccessor.ɵfac = /*@__PURE__*/ function () { let ɵSelectControlValueAccessor_BaseFactory; return function SelectControlValueAccessor_Factory(t) { return (ɵSelectControlValueAccessor_BaseFactory || (ɵSelectControlValueAccessor_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(SelectControlValueAccessor)))(t || SelectControlValueAccessor); }; }();\nSelectControlValueAccessor.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: SelectControlValueAccessor, selectors: [[\"select\", \"formControlName\", \"\", 3, \"multiple\", \"\"], [\"select\", \"formControl\", \"\", 3, \"multiple\", \"\"], [\"select\", \"ngModel\", \"\", 3, \"multiple\", \"\"]], hostBindings: function SelectControlValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"change\", function SelectControlValueAccessor_change_HostBindingHandler($event) { return ctx.onChange($event.target.value); })(\"blur\", function SelectControlValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });\n    } }, inputs: { compareWith: \"compareWith\" }, features: [ɵngcc0.ɵɵProvidersFeature([SELECT_VALUE_ACCESSOR]), ɵngcc0.ɵɵInheritDefinitionFeature] });\nSelectControlValueAccessor.propDecorators = {\n    compareWith: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(SelectControlValueAccessor, [{\n        type: Directive,\n        args: [{\n                selector: 'select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]',\n                host: { '(change)': 'onChange($event.target.value)', '(blur)': 'onTouched()' },\n                providers: [SELECT_VALUE_ACCESSOR]\n            }]\n    }], null, { compareWith: [{\n            type: Input\n        }] }); })();\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see `SelectControlValueAccessor`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgSelectOption {\n    constructor(_element, _renderer, _select) {\n        this._element = _element;\n        this._renderer = _renderer;\n        this._select = _select;\n        if (this._select)\n            this.id = this._select._registerOption();\n    }\n    /**\n     * @description\n     * Tracks the value bound to the option element. Unlike the value binding,\n     * ngValue supports binding to objects.\n     */\n    set ngValue(value) {\n        if (this._select == null)\n            return;\n        this._select._optionMap.set(this.id, value);\n        this._setElementValue(_buildValueString(this.id, value));\n        this._select.writeValue(this._select.value);\n    }\n    /**\n     * @description\n     * Tracks simple string values bound to the option element.\n     * For objects, use the `ngValue` input binding.\n     */\n    set value(value) {\n        this._setElementValue(value);\n        if (this._select)\n            this._select.writeValue(this._select.value);\n    }\n    /** @internal */\n    _setElementValue(value) {\n        this._renderer.setProperty(this._element.nativeElement, 'value', value);\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        if (this._select) {\n            this._select._optionMap.delete(this.id);\n            this._select.writeValue(this._select.value);\n        }\n    }\n}\nNgSelectOption.ɵfac = function NgSelectOption_Factory(t) { return new (t || NgSelectOption)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(SelectControlValueAccessor, 9)); };\nNgSelectOption.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgSelectOption, selectors: [[\"option\"]], inputs: { ngValue: \"ngValue\", value: \"value\" } });\nNgSelectOption.ctorParameters = () => [\n    { type: ElementRef },\n    { type: Renderer2 },\n    { type: SelectControlValueAccessor, decorators: [{ type: Optional }, { type: Host }] }\n];\nNgSelectOption.propDecorators = {\n    ngValue: [{ type: Input, args: ['ngValue',] }],\n    value: [{ type: Input, args: ['value',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgSelectOption, [{\n        type: Directive,\n        args: [{ selector: 'option' }]\n    }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: SelectControlValueAccessor, decorators: [{\n                type: Optional\n            }, {\n                type: Host\n            }] }]; }, { ngValue: [{\n            type: Input,\n            args: ['ngValue']\n        }], value: [{\n            type: Input,\n            args: ['value']\n        }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SELECT_MULTIPLE_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => SelectMultipleControlValueAccessor),\n    multi: true\n};\nfunction _buildValueString$1(id, value) {\n    if (id == null)\n        return `${value}`;\n    if (typeof value === 'string')\n        value = `'${value}'`;\n    if (value && typeof value === 'object')\n        value = 'Object';\n    return `${id}: ${value}`.slice(0, 50);\n}\nfunction _extractId$1(valueString) {\n    return valueString.split(':')[0];\n}\n/** Mock interface for HTMLCollection */\nclass HTMLCollection {\n}\n/**\n * @description\n * The `ControlValueAccessor` for writing multi-select control values and listening to multi-select\n * control changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @see `SelectControlValueAccessor`\n *\n * @usageNotes\n *\n * ### Using a multi-select control\n *\n * The follow example shows you how to use a multi-select control with a reactive form.\n *\n * ```ts\n * const countryControl = new FormControl();\n * ```\n *\n * ```\n * <select multiple name=\"countries\" [formControl]=\"countryControl\">\n *   <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n *     {{ country.name }}\n *   </option>\n * </select>\n * ```\n *\n * ### Customizing option selection\n *\n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * See the `SelectControlValueAccessor` for usage.\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass SelectMultipleControlValueAccessor extends BuiltInControlValueAccessor {\n    constructor() {\n        super(...arguments);\n        /** @internal */\n        this._optionMap = new Map();\n        /** @internal */\n        this._idCounter = 0;\n        this._compareWith = Object.is;\n    }\n    /**\n     * @description\n     * Tracks the option comparison algorithm for tracking identities when\n     * checking for changes.\n     */\n    set compareWith(fn) {\n        if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw new Error(`compareWith must be a function, but received ${JSON.stringify(fn)}`);\n        }\n        this._compareWith = fn;\n    }\n    /**\n     * Sets the \"value\" property on one or of more of the select's options.\n     * @nodoc\n     */\n    writeValue(value) {\n        this.value = value;\n        let optionSelectedStateSetter;\n        if (Array.isArray(value)) {\n            // convert values to ids\n            const ids = value.map((v) => this._getOptionId(v));\n            optionSelectedStateSetter = (opt, o) => {\n                opt._setSelected(ids.indexOf(o.toString()) > -1);\n            };\n        }\n        else {\n            optionSelectedStateSetter = (opt, o) => {\n                opt._setSelected(false);\n            };\n        }\n        this._optionMap.forEach(optionSelectedStateSetter);\n    }\n    /**\n     * Registers a function called when the control value changes\n     * and writes an array of the selected options.\n     * @nodoc\n     */\n    registerOnChange(fn) {\n        this.onChange = (_) => {\n            const selected = [];\n            if (_.selectedOptions !== undefined) {\n                const options = _.selectedOptions;\n                for (let i = 0; i < options.length; i++) {\n                    const opt = options.item(i);\n                    const val = this._getOptionValue(opt.value);\n                    selected.push(val);\n                }\n            }\n            // Degrade on IE\n            else {\n                const options = _.options;\n                for (let i = 0; i < options.length; i++) {\n                    const opt = options.item(i);\n                    if (opt.selected) {\n                        const val = this._getOptionValue(opt.value);\n                        selected.push(val);\n                    }\n                }\n            }\n            this.value = selected;\n            fn(selected);\n        };\n    }\n    /** @internal */\n    _registerOption(value) {\n        const id = (this._idCounter++).toString();\n        this._optionMap.set(id, value);\n        return id;\n    }\n    /** @internal */\n    _getOptionId(value) {\n        for (const id of Array.from(this._optionMap.keys())) {\n            if (this._compareWith(this._optionMap.get(id)._value, value))\n                return id;\n        }\n        return null;\n    }\n    /** @internal */\n    _getOptionValue(valueString) {\n        const id = _extractId$1(valueString);\n        return this._optionMap.has(id) ? this._optionMap.get(id)._value : valueString;\n    }\n}\nSelectMultipleControlValueAccessor.ɵfac = /*@__PURE__*/ function () { let ɵSelectMultipleControlValueAccessor_BaseFactory; return function SelectMultipleControlValueAccessor_Factory(t) { return (ɵSelectMultipleControlValueAccessor_BaseFactory || (ɵSelectMultipleControlValueAccessor_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(SelectMultipleControlValueAccessor)))(t || SelectMultipleControlValueAccessor); }; }();\nSelectMultipleControlValueAccessor.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: SelectMultipleControlValueAccessor, selectors: [[\"select\", \"multiple\", \"\", \"formControlName\", \"\"], [\"select\", \"multiple\", \"\", \"formControl\", \"\"], [\"select\", \"multiple\", \"\", \"ngModel\", \"\"]], hostBindings: function SelectMultipleControlValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"change\", function SelectMultipleControlValueAccessor_change_HostBindingHandler($event) { return ctx.onChange($event.target); })(\"blur\", function SelectMultipleControlValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });\n    } }, inputs: { compareWith: \"compareWith\" }, features: [ɵngcc0.ɵɵProvidersFeature([SELECT_MULTIPLE_VALUE_ACCESSOR]), ɵngcc0.ɵɵInheritDefinitionFeature] });\nSelectMultipleControlValueAccessor.propDecorators = {\n    compareWith: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(SelectMultipleControlValueAccessor, [{\n        type: Directive,\n        args: [{\n                selector: 'select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]',\n                host: { '(change)': 'onChange($event.target)', '(blur)': 'onTouched()' },\n                providers: [SELECT_MULTIPLE_VALUE_ACCESSOR]\n            }]\n    }], null, { compareWith: [{\n            type: Input\n        }] }); })();\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see `SelectMultipleControlValueAccessor`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass ɵNgSelectMultipleOption {\n    constructor(_element, _renderer, _select) {\n        this._element = _element;\n        this._renderer = _renderer;\n        this._select = _select;\n        if (this._select) {\n            this.id = this._select._registerOption(this);\n        }\n    }\n    /**\n     * @description\n     * Tracks the value bound to the option element. Unlike the value binding,\n     * ngValue supports binding to objects.\n     */\n    set ngValue(value) {\n        if (this._select == null)\n            return;\n        this._value = value;\n        this._setElementValue(_buildValueString$1(this.id, value));\n        this._select.writeValue(this._select.value);\n    }\n    /**\n     * @description\n     * Tracks simple string values bound to the option element.\n     * For objects, use the `ngValue` input binding.\n     */\n    set value(value) {\n        if (this._select) {\n            this._value = value;\n            this._setElementValue(_buildValueString$1(this.id, value));\n            this._select.writeValue(this._select.value);\n        }\n        else {\n            this._setElementValue(value);\n        }\n    }\n    /** @internal */\n    _setElementValue(value) {\n        this._renderer.setProperty(this._element.nativeElement, 'value', value);\n    }\n    /** @internal */\n    _setSelected(selected) {\n        this._renderer.setProperty(this._element.nativeElement, 'selected', selected);\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        if (this._select) {\n            this._select._optionMap.delete(this.id);\n            this._select.writeValue(this._select.value);\n        }\n    }\n}\nɵNgSelectMultipleOption.ɵfac = function ɵNgSelectMultipleOption_Factory(t) { return new (t || ɵNgSelectMultipleOption)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(SelectMultipleControlValueAccessor, 9)); };\nɵNgSelectMultipleOption.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: ɵNgSelectMultipleOption, selectors: [[\"option\"]], inputs: { ngValue: \"ngValue\", value: \"value\" } });\nɵNgSelectMultipleOption.ctorParameters = () => [\n    { type: ElementRef },\n    { type: Renderer2 },\n    { type: SelectMultipleControlValueAccessor, decorators: [{ type: Optional }, { type: Host }] }\n];\nɵNgSelectMultipleOption.propDecorators = {\n    ngValue: [{ type: Input, args: ['ngValue',] }],\n    value: [{ type: Input, args: ['value',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ɵNgSelectMultipleOption, [{\n        type: Directive,\n        args: [{ selector: 'option' }]\n    }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: SelectMultipleControlValueAccessor, decorators: [{\n                type: Optional\n            }, {\n                type: Host\n            }] }]; }, { ngValue: [{\n            type: Input,\n            args: ['ngValue']\n        }], value: [{\n            type: Input,\n            args: ['value']\n        }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n * Method that updates string to integer if not alread a number\n *\n * @param value The value to convert to integer\n * @returns value of parameter in number or integer.\n */\nfunction toNumber(value) {\n    return typeof value === 'number' ? value : parseInt(value, 10);\n}\n/**\n * A base class for Validator-based Directives. The class contains common logic shared across such\n * Directives.\n *\n * For internal use only, this class is not intended for use outside of the Forms package.\n */\nclass AbstractValidatorDirective {\n    constructor() {\n        this._validator = nullValidator;\n    }\n    /**\n     * Helper function invoked from child classes to process changes (from `ngOnChanges` hook).\n     * @nodoc\n     */\n    handleChanges(changes) {\n        if (this.inputName in changes) {\n            const input = this.normalizeInput(changes[this.inputName].currentValue);\n            this._validator = this.createValidator(input);\n            if (this._onChange) {\n                this._onChange();\n            }\n        }\n    }\n    /** @nodoc */\n    validate(control) {\n        return this._validator(control);\n    }\n    /** @nodoc */\n    registerOnValidatorChange(fn) {\n        this._onChange = fn;\n    }\n}\nAbstractValidatorDirective.ɵfac = function AbstractValidatorDirective_Factory(t) { return new (t || AbstractValidatorDirective)(); };\nAbstractValidatorDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: AbstractValidatorDirective });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(AbstractValidatorDirective, [{\n        type: Directive\n    }], function () { return []; }, null); })();\n/**\n * @description\n * Provider which adds `MaxValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MAX_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => MaxValidator),\n    multi: true\n};\n/**\n * A directive which installs the {@link MaxValidator} for any `formControlName`,\n * `formControl`, or control with `ngModel` that also has a `max` attribute.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a max validator\n *\n * The following example shows how to add a max validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input type=\"number\" ngModel max=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass MaxValidator extends AbstractValidatorDirective {\n    constructor() {\n        super(...arguments);\n        /** @internal */\n        this.inputName = 'max';\n        /** @internal */\n        this.normalizeInput = (input) => parseFloat(input);\n        /** @internal */\n        this.createValidator = (max) => maxValidator(max);\n    }\n    /**\n     * Declare `ngOnChanges` lifecycle hook at the main directive level (vs keeping it in base class)\n     * to avoid differences in handling inheritance of lifecycle hooks between Ivy and ViewEngine in\n     * AOT mode. This could be refactored once ViewEngine is removed.\n     * @nodoc\n     */\n    ngOnChanges(changes) {\n        this.handleChanges(changes);\n    }\n}\nMaxValidator.ɵfac = /*@__PURE__*/ function () { let ɵMaxValidator_BaseFactory; return function MaxValidator_Factory(t) { return (ɵMaxValidator_BaseFactory || (ɵMaxValidator_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(MaxValidator)))(t || MaxValidator); }; }();\nMaxValidator.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: MaxValidator, selectors: [[\"input\", \"type\", \"number\", \"max\", \"\", \"formControlName\", \"\"], [\"input\", \"type\", \"number\", \"max\", \"\", \"formControl\", \"\"], [\"input\", \"type\", \"number\", \"max\", \"\", \"ngModel\", \"\"]], hostVars: 1, hostBindings: function MaxValidator_HostBindings(rf, ctx) { if (rf & 2) {\n        let tmp_b_0;\n        ɵngcc0.ɵɵattribute(\"max\", (tmp_b_0 = ctx.max) !== null && tmp_b_0 !== undefined ? tmp_b_0 : null);\n    } }, inputs: { max: \"max\" }, features: [ɵngcc0.ɵɵProvidersFeature([MAX_VALIDATOR]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature] });\nMaxValidator.propDecorators = {\n    max: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(MaxValidator, [{\n        type: Directive,\n        args: [{\n                selector: 'input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]',\n                providers: [MAX_VALIDATOR],\n                host: { '[attr.max]': 'max ?? null' }\n            }]\n    }], null, { max: [{\n            type: Input\n        }] }); })();\n/**\n * @description\n * Provider which adds `MinValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MIN_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => MinValidator),\n    multi: true\n};\n/**\n * A directive which installs the {@link MinValidator} for any `formControlName`,\n * `formControl`, or control with `ngModel` that also has a `min` attribute.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a min validator\n *\n * The following example shows how to add a min validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input type=\"number\" ngModel min=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass MinValidator extends AbstractValidatorDirective {\n    constructor() {\n        super(...arguments);\n        /** @internal */\n        this.inputName = 'min';\n        /** @internal */\n        this.normalizeInput = (input) => parseFloat(input);\n        /** @internal */\n        this.createValidator = (min) => minValidator(min);\n    }\n    /**\n     * Declare `ngOnChanges` lifecycle hook at the main directive level (vs keeping it in base class)\n     * to avoid differences in handling inheritance of lifecycle hooks between Ivy and ViewEngine in\n     * AOT mode. This could be refactored once ViewEngine is removed.\n     * @nodoc\n     */\n    ngOnChanges(changes) {\n        this.handleChanges(changes);\n    }\n}\nMinValidator.ɵfac = /*@__PURE__*/ function () { let ɵMinValidator_BaseFactory; return function MinValidator_Factory(t) { return (ɵMinValidator_BaseFactory || (ɵMinValidator_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(MinValidator)))(t || MinValidator); }; }();\nMinValidator.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: MinValidator, selectors: [[\"input\", \"type\", \"number\", \"min\", \"\", \"formControlName\", \"\"], [\"input\", \"type\", \"number\", \"min\", \"\", \"formControl\", \"\"], [\"input\", \"type\", \"number\", \"min\", \"\", \"ngModel\", \"\"]], hostVars: 1, hostBindings: function MinValidator_HostBindings(rf, ctx) { if (rf & 2) {\n        let tmp_b_0;\n        ɵngcc0.ɵɵattribute(\"min\", (tmp_b_0 = ctx.min) !== null && tmp_b_0 !== undefined ? tmp_b_0 : null);\n    } }, inputs: { min: \"min\" }, features: [ɵngcc0.ɵɵProvidersFeature([MIN_VALIDATOR]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature] });\nMinValidator.propDecorators = {\n    min: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(MinValidator, [{\n        type: Directive,\n        args: [{\n                selector: 'input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]',\n                providers: [MIN_VALIDATOR],\n                host: { '[attr.min]': 'min ?? null' }\n            }]\n    }], null, { min: [{\n            type: Input\n        }] }); })();\n/**\n * @description\n * Provider which adds `RequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst REQUIRED_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => RequiredValidator),\n    multi: true\n};\n/**\n * @description\n * Provider which adds `CheckboxRequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst CHECKBOX_REQUIRED_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => CheckboxRequiredValidator),\n    multi: true\n};\n/**\n * @description\n * A directive that adds the `required` validator to any controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a required validator using template-driven forms\n *\n * ```\n * <input name=\"fullName\" ngModel required>\n * ```\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass RequiredValidator {\n    constructor() {\n        this._required = false;\n    }\n    /**\n     * @description\n     * Tracks changes to the required attribute bound to this directive.\n     */\n    get required() {\n        return this._required;\n    }\n    set required(value) {\n        this._required = value != null && value !== false && `${value}` !== 'false';\n        if (this._onChange)\n            this._onChange();\n    }\n    /**\n     * Method that validates whether the control is empty.\n     * Returns the validation result if enabled, otherwise null.\n     * @nodoc\n     */\n    validate(control) {\n        return this.required ? requiredValidator(control) : null;\n    }\n    /**\n     * Registers a callback function to call when the validator inputs change.\n     * @nodoc\n     */\n    registerOnValidatorChange(fn) {\n        this._onChange = fn;\n    }\n}\nRequiredValidator.ɵfac = function RequiredValidator_Factory(t) { return new (t || RequiredValidator)(); };\nRequiredValidator.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: RequiredValidator, selectors: [[\"\", \"required\", \"\", \"formControlName\", \"\", 3, \"type\", \"checkbox\"], [\"\", \"required\", \"\", \"formControl\", \"\", 3, \"type\", \"checkbox\"], [\"\", \"required\", \"\", \"ngModel\", \"\", 3, \"type\", \"checkbox\"]], hostVars: 1, hostBindings: function RequiredValidator_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"required\", ctx.required ? \"\" : null);\n    } }, inputs: { required: \"required\" }, features: [ɵngcc0.ɵɵProvidersFeature([REQUIRED_VALIDATOR])] });\nRequiredValidator.propDecorators = {\n    required: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(RequiredValidator, [{\n        type: Directive,\n        args: [{\n                selector: ':not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]',\n                providers: [REQUIRED_VALIDATOR],\n                host: { '[attr.required]': 'required ? \"\" : null' }\n            }]\n    }], function () { return []; }, { required: [{\n            type: Input\n        }] }); })();\n/**\n * A Directive that adds the `required` validator to checkbox controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a required checkbox validator using template-driven forms\n *\n * The following example shows how to add a checkbox required validator to an input attached to an\n * ngModel binding.\n *\n * ```\n * <input type=\"checkbox\" name=\"active\" ngModel required>\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\nclass CheckboxRequiredValidator extends RequiredValidator {\n    /**\n     * Method that validates whether or not the checkbox has been checked.\n     * Returns the validation result if enabled, otherwise null.\n     * @nodoc\n     */\n    validate(control) {\n        return this.required ? requiredTrueValidator(control) : null;\n    }\n}\nCheckboxRequiredValidator.ɵfac = /*@__PURE__*/ function () { let ɵCheckboxRequiredValidator_BaseFactory; return function CheckboxRequiredValidator_Factory(t) { return (ɵCheckboxRequiredValidator_BaseFactory || (ɵCheckboxRequiredValidator_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(CheckboxRequiredValidator)))(t || CheckboxRequiredValidator); }; }();\nCheckboxRequiredValidator.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: CheckboxRequiredValidator, selectors: [[\"input\", \"type\", \"checkbox\", \"required\", \"\", \"formControlName\", \"\"], [\"input\", \"type\", \"checkbox\", \"required\", \"\", \"formControl\", \"\"], [\"input\", \"type\", \"checkbox\", \"required\", \"\", \"ngModel\", \"\"]], hostVars: 1, hostBindings: function CheckboxRequiredValidator_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"required\", ctx.required ? \"\" : null);\n    } }, features: [ɵngcc0.ɵɵProvidersFeature([CHECKBOX_REQUIRED_VALIDATOR]), ɵngcc0.ɵɵInheritDefinitionFeature] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(CheckboxRequiredValidator, [{\n        type: Directive,\n        args: [{\n                selector: 'input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]',\n                providers: [CHECKBOX_REQUIRED_VALIDATOR],\n                host: { '[attr.required]': 'required ? \"\" : null' }\n            }]\n    }], null, null); })();\n/**\n * @description\n * Provider which adds `EmailValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst EMAIL_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => EmailValidator),\n    multi: true\n};\n/**\n * A directive that adds the `email` validator to controls marked with the\n * `email` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding an email validator\n *\n * The following example shows how to add an email validator to an input attached to an ngModel\n * binding.\n *\n * ```\n * <input type=\"email\" name=\"email\" ngModel email>\n * <input type=\"email\" name=\"email\" ngModel email=\"true\">\n * <input type=\"email\" name=\"email\" ngModel [email]=\"true\">\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\nclass EmailValidator {\n    constructor() {\n        this._enabled = false;\n    }\n    /**\n     * @description\n     * Tracks changes to the email attribute bound to this directive.\n     */\n    set email(value) {\n        this._enabled = value === '' || value === true || value === 'true';\n        if (this._onChange)\n            this._onChange();\n    }\n    /**\n     * Method that validates whether an email address is valid.\n     * Returns the validation result if enabled, otherwise null.\n     * @nodoc\n     */\n    validate(control) {\n        return this._enabled ? emailValidator(control) : null;\n    }\n    /**\n     * Registers a callback function to call when the validator inputs change.\n     * @nodoc\n     */\n    registerOnValidatorChange(fn) {\n        this._onChange = fn;\n    }\n}\nEmailValidator.ɵfac = function EmailValidator_Factory(t) { return new (t || EmailValidator)(); };\nEmailValidator.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: EmailValidator, selectors: [[\"\", \"email\", \"\", \"formControlName\", \"\"], [\"\", \"email\", \"\", \"formControl\", \"\"], [\"\", \"email\", \"\", \"ngModel\", \"\"]], inputs: { email: \"email\" }, features: [ɵngcc0.ɵɵProvidersFeature([EMAIL_VALIDATOR])] });\nEmailValidator.propDecorators = {\n    email: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(EmailValidator, [{\n        type: Directive,\n        args: [{\n                selector: '[email][formControlName],[email][formControl],[email][ngModel]',\n                providers: [EMAIL_VALIDATOR]\n            }]\n    }], function () { return []; }, { email: [{\n            type: Input\n        }] }); })();\n/**\n * @description\n * Provider which adds `MinLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MIN_LENGTH_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => MinLengthValidator),\n    multi: true\n};\n/**\n * A directive that adds minimum length validation to controls marked with the\n * `minlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a minimum length validator\n *\n * The following example shows how to add a minimum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel minlength=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass MinLengthValidator {\n    constructor() {\n        this._validator = nullValidator;\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        if ('minlength' in changes) {\n            this._createValidator();\n            if (this._onChange)\n                this._onChange();\n        }\n    }\n    /**\n     * Method that validates whether the value meets a minimum length requirement.\n     * Returns the validation result if enabled, otherwise null.\n     * @nodoc\n     */\n    validate(control) {\n        return this.enabled() ? this._validator(control) : null;\n    }\n    /**\n     * Registers a callback function to call when the validator inputs change.\n     * @nodoc\n     */\n    registerOnValidatorChange(fn) {\n        this._onChange = fn;\n    }\n    _createValidator() {\n        this._validator =\n            this.enabled() ? minLengthValidator(toNumber(this.minlength)) : nullValidator;\n    }\n    /** @nodoc */\n    enabled() {\n        return this.minlength != null /* both `null` and `undefined` */;\n    }\n}\nMinLengthValidator.ɵfac = function MinLengthValidator_Factory(t) { return new (t || MinLengthValidator)(); };\nMinLengthValidator.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: MinLengthValidator, selectors: [[\"\", \"minlength\", \"\", \"formControlName\", \"\"], [\"\", \"minlength\", \"\", \"formControl\", \"\"], [\"\", \"minlength\", \"\", \"ngModel\", \"\"]], hostVars: 1, hostBindings: function MinLengthValidator_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"minlength\", ctx.enabled() ? ctx.minlength : null);\n    } }, inputs: { minlength: \"minlength\" }, features: [ɵngcc0.ɵɵProvidersFeature([MIN_LENGTH_VALIDATOR]), ɵngcc0.ɵɵNgOnChangesFeature] });\nMinLengthValidator.propDecorators = {\n    minlength: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(MinLengthValidator, [{\n        type: Directive,\n        args: [{\n                selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',\n                providers: [MIN_LENGTH_VALIDATOR],\n                host: { '[attr.minlength]': 'enabled() ? minlength : null' }\n            }]\n    }], function () { return []; }, { minlength: [{\n            type: Input\n        }] }); })();\n/**\n * @description\n * Provider which adds `MaxLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MAX_LENGTH_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => MaxLengthValidator),\n    multi: true\n};\n/**\n * A directive that adds max length validation to controls marked with the\n * `maxlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a maximum length validator\n *\n * The following example shows how to add a maximum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel maxlength=\"25\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass MaxLengthValidator {\n    constructor() {\n        this._validator = nullValidator;\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        if ('maxlength' in changes) {\n            this._createValidator();\n            if (this._onChange)\n                this._onChange();\n        }\n    }\n    /**\n     * Method that validates whether the value exceeds the maximum length requirement.\n     * @nodoc\n     */\n    validate(control) {\n        return this.enabled() ? this._validator(control) : null;\n    }\n    /**\n     * Registers a callback function to call when the validator inputs change.\n     * @nodoc\n     */\n    registerOnValidatorChange(fn) {\n        this._onChange = fn;\n    }\n    _createValidator() {\n        this._validator =\n            this.enabled() ? maxLengthValidator(toNumber(this.maxlength)) : nullValidator;\n    }\n    /** @nodoc */\n    enabled() {\n        return this.maxlength != null /* both `null` and `undefined` */;\n    }\n}\nMaxLengthValidator.ɵfac = function MaxLengthValidator_Factory(t) { return new (t || MaxLengthValidator)(); };\nMaxLengthValidator.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: MaxLengthValidator, selectors: [[\"\", \"maxlength\", \"\", \"formControlName\", \"\"], [\"\", \"maxlength\", \"\", \"formControl\", \"\"], [\"\", \"maxlength\", \"\", \"ngModel\", \"\"]], hostVars: 1, hostBindings: function MaxLengthValidator_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"maxlength\", ctx.enabled() ? ctx.maxlength : null);\n    } }, inputs: { maxlength: \"maxlength\" }, features: [ɵngcc0.ɵɵProvidersFeature([MAX_LENGTH_VALIDATOR]), ɵngcc0.ɵɵNgOnChangesFeature] });\nMaxLengthValidator.propDecorators = {\n    maxlength: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(MaxLengthValidator, [{\n        type: Directive,\n        args: [{\n                selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',\n                providers: [MAX_LENGTH_VALIDATOR],\n                host: { '[attr.maxlength]': 'enabled() ? maxlength : null' }\n            }]\n    }], function () { return []; }, { maxlength: [{\n            type: Input\n        }] }); })();\n/**\n * @description\n * Provider which adds `PatternValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst PATTERN_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => PatternValidator),\n    multi: true\n};\n/**\n * @description\n * A directive that adds regex pattern validation to controls marked with the\n * `pattern` attribute. The regex must match the entire control value.\n * The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a pattern validator\n *\n * The following example shows how to add a pattern validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel pattern=\"[a-zA-Z ]*\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass PatternValidator {\n    constructor() {\n        this._validator = nullValidator;\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        if ('pattern' in changes) {\n            this._createValidator();\n            if (this._onChange)\n                this._onChange();\n        }\n    }\n    /**\n     * Method that validates whether the value matches the pattern requirement.\n     * @nodoc\n     */\n    validate(control) {\n        return this._validator(control);\n    }\n    /**\n     * Registers a callback function to call when the validator inputs change.\n     * @nodoc\n     */\n    registerOnValidatorChange(fn) {\n        this._onChange = fn;\n    }\n    _createValidator() {\n        this._validator = patternValidator(this.pattern);\n    }\n}\nPatternValidator.ɵfac = function PatternValidator_Factory(t) { return new (t || PatternValidator)(); };\nPatternValidator.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: PatternValidator, selectors: [[\"\", \"pattern\", \"\", \"formControlName\", \"\"], [\"\", \"pattern\", \"\", \"formControl\", \"\"], [\"\", \"pattern\", \"\", \"ngModel\", \"\"]], hostVars: 1, hostBindings: function PatternValidator_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"pattern\", ctx.pattern ? ctx.pattern : null);\n    } }, inputs: { pattern: \"pattern\" }, features: [ɵngcc0.ɵɵProvidersFeature([PATTERN_VALIDATOR]), ɵngcc0.ɵɵNgOnChangesFeature] });\nPatternValidator.propDecorators = {\n    pattern: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(PatternValidator, [{\n        type: Directive,\n        args: [{\n                selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',\n                providers: [PATTERN_VALIDATOR],\n                host: { '[attr.pattern]': 'pattern ? pattern : null' }\n            }]\n    }], function () { return []; }, { pattern: [{\n            type: Input\n        }] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SHARED_FORM_DIRECTIVES = [\n    ɵNgNoValidate,\n    NgSelectOption,\n    ɵNgSelectMultipleOption,\n    DefaultValueAccessor,\n    NumberValueAccessor,\n    RangeValueAccessor,\n    CheckboxControlValueAccessor,\n    SelectControlValueAccessor,\n    SelectMultipleControlValueAccessor,\n    RadioControlValueAccessor,\n    NgControlStatus,\n    NgControlStatusGroup,\n    RequiredValidator,\n    MinLengthValidator,\n    MaxLengthValidator,\n    PatternValidator,\n    CheckboxRequiredValidator,\n    EmailValidator,\n    MinValidator,\n    MaxValidator,\n];\nconst TEMPLATE_DRIVEN_DIRECTIVES = [NgModel, NgModelGroup, NgForm];\nconst REACTIVE_DRIVEN_DIRECTIVES = [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName];\n/**\n * Internal module used for sharing directives between FormsModule and ReactiveFormsModule\n */\nclass ɵInternalFormsSharedModule {\n}\nɵInternalFormsSharedModule.ɵfac = function ɵInternalFormsSharedModule_Factory(t) { return new (t || ɵInternalFormsSharedModule)(); };\nɵInternalFormsSharedModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: ɵInternalFormsSharedModule });\nɵInternalFormsSharedModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [[RadioControlRegistryModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ɵInternalFormsSharedModule, [{\n        type: NgModule,\n        args: [{\n                declarations: SHARED_FORM_DIRECTIVES,\n                imports: [RadioControlRegistryModule],\n                exports: SHARED_FORM_DIRECTIVES\n            }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(ɵInternalFormsSharedModule, { declarations: [ɵNgNoValidate, NgSelectOption, ɵNgSelectMultipleOption, DefaultValueAccessor, NumberValueAccessor, RangeValueAccessor, CheckboxControlValueAccessor, SelectControlValueAccessor, SelectMultipleControlValueAccessor, RadioControlValueAccessor, NgControlStatus, NgControlStatusGroup, RequiredValidator, MinLengthValidator, MaxLengthValidator, PatternValidator, CheckboxRequiredValidator, EmailValidator, MinValidator, MaxValidator], imports: [RadioControlRegistryModule], exports: [ɵNgNoValidate, NgSelectOption, ɵNgSelectMultipleOption, DefaultValueAccessor, NumberValueAccessor, RangeValueAccessor, CheckboxControlValueAccessor, SelectControlValueAccessor, SelectMultipleControlValueAccessor, RadioControlValueAccessor, NgControlStatus, NgControlStatusGroup, RequiredValidator, MinLengthValidator, MaxLengthValidator, PatternValidator, CheckboxRequiredValidator, EmailValidator, MinValidator, MaxValidator] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Exports the required providers and directives for template-driven forms,\n * making them available for import by NgModules that import this module.\n *\n * Providers associated with this module:\n * * `RadioControlRegistry`\n *\n * @see [Forms Overview](/guide/forms-overview)\n * @see [Template-driven Forms Guide](/guide/forms)\n *\n * @publicApi\n */\nclass FormsModule {\n}\nFormsModule.ɵfac = function FormsModule_Factory(t) { return new (t || FormsModule)(); };\nFormsModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: FormsModule });\nFormsModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [ɵInternalFormsSharedModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormsModule, [{\n        type: NgModule,\n        args: [{\n                declarations: TEMPLATE_DRIVEN_DIRECTIVES,\n                exports: [ɵInternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]\n            }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(FormsModule, { declarations: [NgModel, NgModelGroup, NgForm], exports: [ɵInternalFormsSharedModule, NgModel, NgModelGroup, NgForm] }); })();\n/**\n * Exports the required infrastructure and directives for reactive forms,\n * making them available for import by NgModules that import this module.\n *\n * Providers associated with this module:\n * * `FormBuilder`\n * * `RadioControlRegistry`\n *\n * @see [Forms Overview](guide/forms-overview)\n * @see [Reactive Forms Guide](guide/reactive-forms)\n *\n * @publicApi\n */\nclass ReactiveFormsModule {\n    /**\n     * @description\n     * Provides options for configuring the reactive forms module.\n     *\n     * @param opts An object of configuration options\n     * * `warnOnNgModelWithFormControl` Configures when to emit a warning when an `ngModel`\n     * binding is used with reactive form directives.\n     */\n    static withConfig(opts) {\n        return {\n            ngModule: ReactiveFormsModule,\n            providers: [\n                { provide: NG_MODEL_WITH_FORM_CONTROL_WARNING, useValue: opts.warnOnNgModelWithFormControl }\n            ]\n        };\n    }\n}\nReactiveFormsModule.ɵfac = function ReactiveFormsModule_Factory(t) { return new (t || ReactiveFormsModule)(); };\nReactiveFormsModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: ReactiveFormsModule });\nReactiveFormsModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [ɵInternalFormsSharedModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ReactiveFormsModule, [{\n        type: NgModule,\n        args: [{\n                declarations: [REACTIVE_DRIVEN_DIRECTIVES],\n                exports: [ɵInternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]\n            }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(ReactiveFormsModule, { declarations: [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName], exports: [ɵInternalFormsSharedModule, FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName] }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction isAbstractControlOptions(options) {\n    return options.asyncValidators !== undefined ||\n        options.validators !== undefined ||\n        options.updateOn !== undefined;\n}\n/**\n * @description\n * Creates an `AbstractControl` from a user-specified configuration.\n *\n * The `FormBuilder` provides syntactic sugar that shortens creating instances of a `FormControl`,\n * `FormGroup`, or `FormArray`. It reduces the amount of boilerplate needed to build complex\n * forms.\n *\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n *\n * @publicApi\n */\nclass FormBuilder {\n    group(controlsConfig, options = null) {\n        const controls = this._reduceControls(controlsConfig);\n        let validators = null;\n        let asyncValidators = null;\n        let updateOn = undefined;\n        if (options != null) {\n            if (isAbstractControlOptions(options)) {\n                // `options` are `AbstractControlOptions`\n                validators = options.validators != null ? options.validators : null;\n                asyncValidators = options.asyncValidators != null ? options.asyncValidators : null;\n                updateOn = options.updateOn != null ? options.updateOn : undefined;\n            }\n            else {\n                // `options` are legacy form group options\n                validators = options['validator'] != null ? options['validator'] : null;\n                asyncValidators = options['asyncValidator'] != null ? options['asyncValidator'] : null;\n            }\n        }\n        return new FormGroup(controls, { asyncValidators, updateOn, validators });\n    }\n    /**\n     * @description\n     * Construct a new `FormControl` with the given state, validators and options.\n     *\n     * @param formState Initializes the control with an initial state value, or\n     * with an object that contains both a value and a disabled status.\n     *\n     * @param validatorOrOpts A synchronous validator function, or an array of\n     * such functions, or an `AbstractControlOptions` object that contains\n     * validation functions and a validation trigger.\n     *\n     * @param asyncValidator A single async validator or array of async validator\n     * functions.\n     *\n     * @usageNotes\n     *\n     * ### Initialize a control as disabled\n     *\n     * The following example returns a control with an initial value in a disabled state.\n     *\n     * <code-example path=\"forms/ts/formBuilder/form_builder_example.ts\" region=\"disabled-control\">\n     * </code-example>\n     */\n    control(formState, validatorOrOpts, asyncValidator) {\n        return new FormControl(formState, validatorOrOpts, asyncValidator);\n    }\n    /**\n     * Constructs a new `FormArray` from the given array of configurations,\n     * validators and options.\n     *\n     * @param controlsConfig An array of child controls or control configs. Each\n     * child control is given an index when it is registered.\n     *\n     * @param validatorOrOpts A synchronous validator function, or an array of\n     * such functions, or an `AbstractControlOptions` object that contains\n     * validation functions and a validation trigger.\n     *\n     * @param asyncValidator A single async validator or array of async validator\n     * functions.\n     */\n    array(controlsConfig, validatorOrOpts, asyncValidator) {\n        const controls = controlsConfig.map(c => this._createControl(c));\n        return new FormArray(controls, validatorOrOpts, asyncValidator);\n    }\n    /** @internal */\n    _reduceControls(controlsConfig) {\n        const controls = {};\n        Object.keys(controlsConfig).forEach(controlName => {\n            controls[controlName] = this._createControl(controlsConfig[controlName]);\n        });\n        return controls;\n    }\n    /** @internal */\n    _createControl(controlConfig) {\n        if (controlConfig instanceof FormControl || controlConfig instanceof FormGroup ||\n            controlConfig instanceof FormArray) {\n            return controlConfig;\n        }\n        else if (Array.isArray(controlConfig)) {\n            const value = controlConfig[0];\n            const validator = controlConfig.length > 1 ? controlConfig[1] : null;\n            const asyncValidator = controlConfig.length > 2 ? controlConfig[2] : null;\n            return this.control(value, validator, asyncValidator);\n        }\n        else {\n            return this.control(controlConfig);\n        }\n    }\n}\nFormBuilder.ɵfac = function FormBuilder_Factory(t) { return new (t || FormBuilder)(); };\nFormBuilder.ɵprov = ɵɵdefineInjectable({ factory: function FormBuilder_Factory() { return new FormBuilder(); }, token: FormBuilder, providedIn: ReactiveFormsModule });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(FormBuilder, [{\n        type: Injectable,\n        args: [{ providedIn: ReactiveFormsModule }]\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('12.2.5');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AbstractControl, AbstractControlDirective, AbstractFormGroupDirective, COMPOSITION_BUFFER_MODE, CheckboxControlValueAccessor, CheckboxRequiredValidator, ControlContainer, DefaultValueAccessor, EmailValidator, FormArray, FormArrayName, FormBuilder, FormControl, FormControlDirective, FormControlName, FormGroup, FormGroupDirective, FormGroupName, FormsModule, MaxLengthValidator, MaxValidator, MinLengthValidator, MinValidator, NG_ASYNC_VALIDATORS, NG_VALIDATORS, NG_VALUE_ACCESSOR, NgControl, NgControlStatus, NgControlStatusGroup, NgForm, NgModel, NgModelGroup, NgSelectOption, NumberValueAccessor, PatternValidator, RadioControlValueAccessor, RangeValueAccessor, ReactiveFormsModule, RequiredValidator, SelectControlValueAccessor, SelectMultipleControlValueAccessor, VERSION, Validators, ɵInternalFormsSharedModule, ɵNgNoValidate, ɵNgSelectMultipleOption, SHARED_FORM_DIRECTIVES as ɵangular_packages_forms_forms_a, TEMPLATE_DRIVEN_DIRECTIVES as ɵangular_packages_forms_forms_b, SELECT_MULTIPLE_VALUE_ACCESSOR as ɵangular_packages_forms_forms_ba, ɵNgSelectMultipleOption as ɵangular_packages_forms_forms_bb, ɵNgNoValidate as ɵangular_packages_forms_forms_bc, MAX_VALIDATOR as ɵangular_packages_forms_forms_bd, MIN_VALIDATOR as ɵangular_packages_forms_forms_be, REQUIRED_VALIDATOR as ɵangular_packages_forms_forms_bf, CHECKBOX_REQUIRED_VALIDATOR as ɵangular_packages_forms_forms_bg, EMAIL_VALIDATOR as ɵangular_packages_forms_forms_bh, MIN_LENGTH_VALIDATOR as ɵangular_packages_forms_forms_bi, MAX_LENGTH_VALIDATOR as ɵangular_packages_forms_forms_bj, PATTERN_VALIDATOR as ɵangular_packages_forms_forms_bk, minValidator as ɵangular_packages_forms_forms_bl, maxValidator as ɵangular_packages_forms_forms_bm, requiredValidator as ɵangular_packages_forms_forms_bn, requiredTrueValidator as ɵangular_packages_forms_forms_bo, emailValidator as ɵangular_packages_forms_forms_bp, minLengthValidator as ɵangular_packages_forms_forms_bq, maxLengthValidator as ɵangular_packages_forms_forms_br, patternValidator as ɵangular_packages_forms_forms_bs, nullValidator as ɵangular_packages_forms_forms_bt, REACTIVE_DRIVEN_DIRECTIVES as ɵangular_packages_forms_forms_c, ɵInternalFormsSharedModule as ɵangular_packages_forms_forms_d, CHECKBOX_VALUE_ACCESSOR as ɵangular_packages_forms_forms_e, BaseControlValueAccessor as ɵangular_packages_forms_forms_f, BuiltInControlValueAccessor as ɵangular_packages_forms_forms_g, DEFAULT_VALUE_ACCESSOR as ɵangular_packages_forms_forms_h, AbstractControlStatus as ɵangular_packages_forms_forms_i, ngControlStatusHost as ɵangular_packages_forms_forms_j, ngGroupStatusHost as ɵangular_packages_forms_forms_k, formDirectiveProvider as ɵangular_packages_forms_forms_l, formControlBinding as ɵangular_packages_forms_forms_m, modelGroupProvider as ɵangular_packages_forms_forms_n, NUMBER_VALUE_ACCESSOR as ɵangular_packages_forms_forms_o, RADIO_VALUE_ACCESSOR as ɵangular_packages_forms_forms_p, RadioControlRegistryModule as ɵangular_packages_forms_forms_q, RadioControlRegistry as ɵangular_packages_forms_forms_r, RANGE_VALUE_ACCESSOR as ɵangular_packages_forms_forms_s, NG_MODEL_WITH_FORM_CONTROL_WARNING as ɵangular_packages_forms_forms_t, formControlBinding$1 as ɵangular_packages_forms_forms_u, controlNameBinding as ɵangular_packages_forms_forms_v, formDirectiveProvider$1 as ɵangular_packages_forms_forms_w, formGroupNameProvider as ɵangular_packages_forms_forms_x, formArrayNameProvider as ɵangular_packages_forms_forms_y, SELECT_VALUE_ACCESSOR as ɵangular_packages_forms_forms_z };\n\n","import { isArray } from './isArray';\nexport function isNumeric(val) {\n    return !isArray(val) && (val - parseFloat(val) + 1) >= 0;\n}\n","import { Observable } from '../Observable';\nimport { async } from '../scheduler/async';\nimport { isNumeric } from '../util/isNumeric';\nimport { isScheduler } from '../util/isScheduler';\nexport function timer(dueTime = 0, periodOrScheduler, scheduler) {\n    let period = -1;\n    if (isNumeric(periodOrScheduler)) {\n        period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);\n    }\n    else if (isScheduler(periodOrScheduler)) {\n        scheduler = periodOrScheduler;\n    }\n    if (!isScheduler(scheduler)) {\n        scheduler = async;\n    }\n    return new Observable(subscriber => {\n        const due = isNumeric(dueTime)\n            ? dueTime\n            : (+dueTime - scheduler.now());\n        return scheduler.schedule(dispatch, due, {\n            index: 0, period, subscriber\n        });\n    });\n}\nfunction dispatch(state) {\n    const { index, period, subscriber } = state;\n    subscriber.next(index);\n    if (subscriber.closed) {\n        return;\n    }\n    else if (period === -1) {\n        return subscriber.complete();\n    }\n    state.index = index + 1;\n    this.schedule(state, period);\n}\n","import { isArray } from '../util/isArray';\nimport { fromArray } from './fromArray';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function race(...observables) {\n    if (observables.length === 1) {\n        if (isArray(observables[0])) {\n            observables = observables[0];\n        }\n        else {\n            return observables[0];\n        }\n    }\n    return fromArray(observables, undefined).lift(new RaceOperator());\n}\nexport class RaceOperator {\n    call(subscriber, source) {\n        return source.subscribe(new RaceSubscriber(subscriber));\n    }\n}\nexport class RaceSubscriber extends OuterSubscriber {\n    constructor(destination) {\n        super(destination);\n        this.hasFirst = false;\n        this.observables = [];\n        this.subscriptions = [];\n    }\n    _next(observable) {\n        this.observables.push(observable);\n    }\n    _complete() {\n        const observables = this.observables;\n        const len = observables.length;\n        if (len === 0) {\n            this.destination.complete();\n        }\n        else {\n            for (let i = 0; i < len && !this.hasFirst; i++) {\n                const observable = observables[i];\n                const subscription = subscribeToResult(this, observable, undefined, i);\n                if (this.subscriptions) {\n                    this.subscriptions.push(subscription);\n                }\n                this.add(subscription);\n            }\n            this.observables = null;\n        }\n    }\n    notifyNext(_outerValue, innerValue, outerIndex) {\n        if (!this.hasFirst) {\n            this.hasFirst = true;\n            for (let i = 0; i < this.subscriptions.length; i++) {\n                if (i !== outerIndex) {\n                    let subscription = this.subscriptions[i];\n                    subscription.unsubscribe();\n                    this.remove(subscription);\n                }\n            }\n            this.subscriptions = null;\n        }\n        this.destination.next(innerValue);\n    }\n}\n","import { fromArray } from './fromArray';\nimport { isArray } from '../util/isArray';\nimport { Subscriber } from '../Subscriber';\nimport { iterator as Symbol_iterator } from '../../internal/symbol/iterator';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function zip(...observables) {\n    const resultSelector = observables[observables.length - 1];\n    if (typeof resultSelector === 'function') {\n        observables.pop();\n    }\n    return fromArray(observables, undefined).lift(new ZipOperator(resultSelector));\n}\nexport class ZipOperator {\n    constructor(resultSelector) {\n        this.resultSelector = resultSelector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));\n    }\n}\nexport class ZipSubscriber extends Subscriber {\n    constructor(destination, resultSelector, values = Object.create(null)) {\n        super(destination);\n        this.resultSelector = resultSelector;\n        this.iterators = [];\n        this.active = 0;\n        this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : undefined;\n    }\n    _next(value) {\n        const iterators = this.iterators;\n        if (isArray(value)) {\n            iterators.push(new StaticArrayIterator(value));\n        }\n        else if (typeof value[Symbol_iterator] === 'function') {\n            iterators.push(new StaticIterator(value[Symbol_iterator]()));\n        }\n        else {\n            iterators.push(new ZipBufferIterator(this.destination, this, value));\n        }\n    }\n    _complete() {\n        const iterators = this.iterators;\n        const len = iterators.length;\n        this.unsubscribe();\n        if (len === 0) {\n            this.destination.complete();\n            return;\n        }\n        this.active = len;\n        for (let i = 0; i < len; i++) {\n            let iterator = iterators[i];\n            if (iterator.stillUnsubscribed) {\n                const destination = this.destination;\n                destination.add(iterator.subscribe());\n            }\n            else {\n                this.active--;\n            }\n        }\n    }\n    notifyInactive() {\n        this.active--;\n        if (this.active === 0) {\n            this.destination.complete();\n        }\n    }\n    checkIterators() {\n        const iterators = this.iterators;\n        const len = iterators.length;\n        const destination = this.destination;\n        for (let i = 0; i < len; i++) {\n            let iterator = iterators[i];\n            if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {\n                return;\n            }\n        }\n        let shouldComplete = false;\n        const args = [];\n        for (let i = 0; i < len; i++) {\n            let iterator = iterators[i];\n            let result = iterator.next();\n            if (iterator.hasCompleted()) {\n                shouldComplete = true;\n            }\n            if (result.done) {\n                destination.complete();\n                return;\n            }\n            args.push(result.value);\n        }\n        if (this.resultSelector) {\n            this._tryresultSelector(args);\n        }\n        else {\n            destination.next(args);\n        }\n        if (shouldComplete) {\n            destination.complete();\n        }\n    }\n    _tryresultSelector(args) {\n        let result;\n        try {\n            result = this.resultSelector.apply(this, args);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.next(result);\n    }\n}\nclass StaticIterator {\n    constructor(iterator) {\n        this.iterator = iterator;\n        this.nextResult = iterator.next();\n    }\n    hasValue() {\n        return true;\n    }\n    next() {\n        const result = this.nextResult;\n        this.nextResult = this.iterator.next();\n        return result;\n    }\n    hasCompleted() {\n        const nextResult = this.nextResult;\n        return Boolean(nextResult && nextResult.done);\n    }\n}\nclass StaticArrayIterator {\n    constructor(array) {\n        this.array = array;\n        this.index = 0;\n        this.length = 0;\n        this.length = array.length;\n    }\n    [Symbol_iterator]() {\n        return this;\n    }\n    next(value) {\n        const i = this.index++;\n        const array = this.array;\n        return i < this.length ? { value: array[i], done: false } : { value: null, done: true };\n    }\n    hasValue() {\n        return this.array.length > this.index;\n    }\n    hasCompleted() {\n        return this.array.length === this.index;\n    }\n}\nclass ZipBufferIterator extends SimpleOuterSubscriber {\n    constructor(destination, parent, observable) {\n        super(destination);\n        this.parent = parent;\n        this.observable = observable;\n        this.stillUnsubscribed = true;\n        this.buffer = [];\n        this.isComplete = false;\n    }\n    [Symbol_iterator]() {\n        return this;\n    }\n    next() {\n        const buffer = this.buffer;\n        if (buffer.length === 0 && this.isComplete) {\n            return { value: null, done: true };\n        }\n        else {\n            return { value: buffer.shift(), done: false };\n        }\n    }\n    hasValue() {\n        return this.buffer.length > 0;\n    }\n    hasCompleted() {\n        return this.buffer.length === 0 && this.isComplete;\n    }\n    notifyComplete() {\n        if (this.buffer.length > 0) {\n            this.isComplete = true;\n            this.parent.notifyInactive();\n        }\n        else {\n            this.destination.complete();\n        }\n    }\n    notifyNext(innerValue) {\n        this.buffer.push(innerValue);\n        this.parent.checkIterators();\n    }\n    subscribe() {\n        return innerSubscribe(this.observable, new SimpleInnerSubscriber(this));\n    }\n}\n","import { innerSubscribe, SimpleInnerSubscriber, SimpleOuterSubscriber } from '../innerSubscribe';\nexport function takeUntil(notifier) {\n    return (source) => source.lift(new TakeUntilOperator(notifier));\n}\nclass TakeUntilOperator {\n    constructor(notifier) {\n        this.notifier = notifier;\n    }\n    call(subscriber, source) {\n        const takeUntilSubscriber = new TakeUntilSubscriber(subscriber);\n        const notifierSubscription = innerSubscribe(this.notifier, new SimpleInnerSubscriber(takeUntilSubscriber));\n        if (notifierSubscription && !takeUntilSubscriber.seenValue) {\n            takeUntilSubscriber.add(notifierSubscription);\n            return source.subscribe(takeUntilSubscriber);\n        }\n        return takeUntilSubscriber;\n    }\n}\nclass TakeUntilSubscriber extends SimpleOuterSubscriber {\n    constructor(destination) {\n        super(destination);\n        this.seenValue = false;\n    }\n    notifyNext() {\n        this.seenValue = true;\n        this.complete();\n    }\n    notifyComplete() {\n    }\n}\n","import { Subscriber } from '../Subscriber';\nexport function distinctUntilChanged(compare, keySelector) {\n    return (source) => source.lift(new DistinctUntilChangedOperator(compare, keySelector));\n}\nclass DistinctUntilChangedOperator {\n    constructor(compare, keySelector) {\n        this.compare = compare;\n        this.keySelector = keySelector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));\n    }\n}\nclass DistinctUntilChangedSubscriber extends Subscriber {\n    constructor(destination, compare, keySelector) {\n        super(destination);\n        this.keySelector = keySelector;\n        this.hasKey = false;\n        if (typeof compare === 'function') {\n            this.compare = compare;\n        }\n    }\n    compare(x, y) {\n        return x === y;\n    }\n    _next(value) {\n        let key;\n        try {\n            const { keySelector } = this;\n            key = keySelector ? keySelector(value) : value;\n        }\n        catch (err) {\n            return this.destination.error(err);\n        }\n        let result = false;\n        if (this.hasKey) {\n            try {\n                const { compare } = this;\n                result = compare(this.key, key);\n            }\n            catch (err) {\n                return this.destination.error(err);\n            }\n        }\n        else {\n            this.hasKey = true;\n        }\n        if (!result) {\n            this.key = key;\n            this.destination.next(value);\n        }\n    }\n}\n","import { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function withLatestFrom(...args) {\n    return (source) => {\n        let project;\n        if (typeof args[args.length - 1] === 'function') {\n            project = args.pop();\n        }\n        const observables = args;\n        return source.lift(new WithLatestFromOperator(observables, project));\n    };\n}\nclass WithLatestFromOperator {\n    constructor(observables, project) {\n        this.observables = observables;\n        this.project = project;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));\n    }\n}\nclass WithLatestFromSubscriber extends OuterSubscriber {\n    constructor(destination, observables, project) {\n        super(destination);\n        this.observables = observables;\n        this.project = project;\n        this.toRespond = [];\n        const len = observables.length;\n        this.values = new Array(len);\n        for (let i = 0; i < len; i++) {\n            this.toRespond.push(i);\n        }\n        for (let i = 0; i < len; i++) {\n            let observable = observables[i];\n            this.add(subscribeToResult(this, observable, undefined, i));\n        }\n    }\n    notifyNext(_outerValue, innerValue, outerIndex) {\n        this.values[outerIndex] = innerValue;\n        const toRespond = this.toRespond;\n        if (toRespond.length > 0) {\n            const found = toRespond.indexOf(outerIndex);\n            if (found !== -1) {\n                toRespond.splice(found, 1);\n            }\n        }\n    }\n    notifyComplete() {\n    }\n    _next(value) {\n        if (this.toRespond.length === 0) {\n            const args = [value, ...this.values];\n            if (this.project) {\n                this._tryProject(args);\n            }\n            else {\n                this.destination.next(args);\n            }\n        }\n    }\n    _tryProject(args) {\n        let result;\n        try {\n            result = this.project.apply(this, args);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.next(result);\n    }\n}\n","import * as i0 from '@angular/core';\nimport { Injectable, Directive, TemplateRef, EventEmitter, Input, Output, ContentChildren, Component, ViewEncapsulation, ElementRef, NgZone, ChangeDetectorRef, Optional, Host, NgModule, ChangeDetectionStrategy, Renderer2, forwardRef, Inject, PLATFORM_ID, LOCALE_ID, ViewChild, ContentChild, ViewContainerRef, ComponentFactoryResolver, Injector, ApplicationRef, RendererFactory2, Attribute, ViewChildren, HostBinding, InjectionToken } from '@angular/core';\nimport * as i1 from '@angular/common';\nimport { CommonModule, isPlatformBrowser, getLocaleMonthNames, FormStyle, TranslationWidth, getLocaleDayNames, formatDate, DOCUMENT, getLocaleDayPeriods } from '@angular/common';\nimport { Observable, EMPTY, of, Subject, fromEvent, timer, race, BehaviorSubject, combineLatest, NEVER, zip, merge } from 'rxjs';\nimport { endWith, takeUntil, filter, take, map, startWith, distinctUntilChanged, switchMap, tap, withLatestFrom, delay, mergeMap, skip, share } from 'rxjs/operators';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule } from '@angular/forms';\n\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/common';\nimport * as ɵngcc2 from '@angular/forms';\n\nfunction NgbAccordion_ng_template_0_ng_template_2_Template(rf, ctx) { }\nfunction NgbAccordion_ng_template_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"button\", 3);\n    ɵngcc0.ɵɵtext(1);\n    ɵngcc0.ɵɵtemplate(2, NgbAccordion_ng_template_0_ng_template_2_Template, 0, 0, \"ng-template\", 4);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const panel_r3 = ctx.$implicit;\n    ɵngcc0.ɵɵproperty(\"ngbPanelToggle\", panel_r3);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵtextInterpolate1(\" \", panel_r3.title, \"\");\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", panel_r3.titleTpl == null ? null : panel_r3.titleTpl.templateRef);\n} }\nfunction NgbAccordion_ng_template_2_ng_template_2_Template(rf, ctx) { }\nfunction NgbAccordion_ng_template_2_div_3_ng_template_2_Template(rf, ctx) { }\nfunction NgbAccordion_ng_template_2_div_3_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"div\", 8);\n    ɵngcc0.ɵɵelementStart(1, \"div\", 9);\n    ɵngcc0.ɵɵtemplate(2, NgbAccordion_ng_template_2_div_3_ng_template_2_Template, 0, 0, \"ng-template\", 4);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const panel_r5 = ɵngcc0.ɵɵnextContext().$implicit;\n    ɵngcc0.ɵɵpropertyInterpolate(\"id\", panel_r5.id);\n    ɵngcc0.ɵɵattribute(\"aria-labelledby\", panel_r5.id + \"-header\");\n    ɵngcc0.ɵɵadvance(2);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", (panel_r5.contentTpl == null ? null : panel_r5.contentTpl.templateRef) || null);\n} }\nconst _c0 = function (a0, a1) { return { $implicit: a0, opened: a1 }; };\nfunction NgbAccordion_ng_template_2_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"div\");\n    ɵngcc0.ɵɵelementStart(1, \"div\", 5);\n    ɵngcc0.ɵɵtemplate(2, NgbAccordion_ng_template_2_ng_template_2_Template, 0, 0, \"ng-template\", 6);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵtemplate(3, NgbAccordion_ng_template_2_div_3_Template, 3, 3, \"div\", 7);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const panel_r5 = ctx.$implicit;\n    const ctx_r2 = ɵngcc0.ɵɵnextContext();\n    const _r0 = ɵngcc0.ɵɵreference(1);\n    ɵngcc0.ɵɵclassMap(\"card \" + (panel_r5.cardClass || \"\"));\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵclassMap(\"card-header \" + (panel_r5.type ? \"bg-\" + panel_r5.type : ctx_r2.type ? \"bg-\" + ctx_r2.type : \"\"));\n    ɵngcc0.ɵɵpropertyInterpolate1(\"id\", \"\", panel_r5.id, \"-header\");\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", (panel_r5.headerTpl == null ? null : panel_r5.headerTpl.templateRef) || _r0)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction2(8, _c0, panel_r5, panel_r5.isOpen));\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngIf\", !ctx_r2.destroyOnHide || panel_r5.isOpen || panel_r5.transitionRunning);\n} }\nfunction NgbAlert_button_1_Template(rf, ctx) { if (rf & 1) {\n    const _r2 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"button\", 1);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbAlert_button_1_Template_button_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r2); const ctx_r1 = ɵngcc0.ɵɵnextContext(); return ctx_r1.close(); });\n    ɵngcc0.ɵɵelementStart(1, \"span\", 2);\n    ɵngcc0.ɵɵtext(2, \"\\u00D7\");\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} }\nconst _c3 = [\"*\"];\nfunction NgbCarousel_li_1_Template(rf, ctx) { if (rf & 1) {\n    const _r6 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"li\", 6);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbCarousel_li_1_Template_li_click_0_listener() { const restoredCtx = ɵngcc0.ɵɵrestoreView(_r6); const slide_r4 = restoredCtx.$implicit; const ctx_r5 = ɵngcc0.ɵɵnextContext(); ctx_r5.focus(); return ctx_r5.select(slide_r4.id, ctx_r5.NgbSlideEventSource.INDICATOR); });\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const slide_r4 = ctx.$implicit;\n    const ctx_r0 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵclassProp(\"active\", slide_r4.id === ctx_r0.activeId);\n    ɵngcc0.ɵɵattribute(\"aria-labelledby\", \"slide-\" + slide_r4.id)(\"aria-controls\", \"slide-\" + slide_r4.id)(\"aria-selected\", slide_r4.id === ctx_r0.activeId);\n} }\nfunction NgbCarousel_div_3_ng_template_3_Template(rf, ctx) { }\nfunction NgbCarousel_div_3_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"div\", 7);\n    ɵngcc0.ɵɵelementStart(1, \"span\", 8);\n    ɵngcc0.ɵɵi18n(2, 9);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵtemplate(3, NgbCarousel_div_3_ng_template_3_Template, 0, 0, \"ng-template\", 10);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const slide_r7 = ctx.$implicit;\n    const i_r8 = ctx.index;\n    const c_r9 = ctx.count;\n    ɵngcc0.ɵɵproperty(\"id\", \"slide-\" + slide_r7.id);\n    ɵngcc0.ɵɵadvance(2);\n    ɵngcc0.ɵɵi18nExp(i_r8 + 1)(c_r9);\n    ɵngcc0.ɵɵi18nApply(2);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", slide_r7.tplRef);\n} }\nfunction NgbCarousel_a_4_Template(rf, ctx) { if (rf & 1) {\n    const _r12 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"a\", 11);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbCarousel_a_4_Template_a_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r12); const ctx_r11 = ɵngcc0.ɵɵnextContext(); return ctx_r11.arrowLeft(); });\n    ɵngcc0.ɵɵelement(1, \"span\", 12);\n    ɵngcc0.ɵɵelementStart(2, \"span\", 8);\n    ɵngcc0.ɵɵi18n(3, 13);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} }\nfunction NgbCarousel_a_5_Template(rf, ctx) { if (rf & 1) {\n    const _r14 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"a\", 14);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbCarousel_a_5_Template_a_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r14); const ctx_r13 = ɵngcc0.ɵɵnextContext(); return ctx_r13.arrowRight(); });\n    ɵngcc0.ɵɵelement(1, \"span\", 15);\n    ɵngcc0.ɵɵelementStart(2, \"span\", 8);\n    ɵngcc0.ɵɵi18n(3, 16);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} }\nconst _c10 = [\"defaultDayTemplate\"];\nconst _c11 = [\"content\"];\nfunction NgbDatepicker_ng_template_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelement(0, \"div\", 7);\n} if (rf & 2) {\n    const date_r8 = ctx.date;\n    const currentMonth_r9 = ctx.currentMonth;\n    const selected_r10 = ctx.selected;\n    const disabled_r11 = ctx.disabled;\n    const focused_r12 = ctx.focused;\n    ɵngcc0.ɵɵproperty(\"date\", date_r8)(\"currentMonth\", currentMonth_r9)(\"selected\", selected_r10)(\"disabled\", disabled_r11)(\"focused\", focused_r12);\n} }\nfunction NgbDatepicker_ng_template_2_div_0_div_1_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"div\", 12);\n    ɵngcc0.ɵɵtext(1);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const month_r14 = ɵngcc0.ɵɵnextContext().$implicit;\n    const ctx_r16 = ɵngcc0.ɵɵnextContext(2);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵtextInterpolate1(\" \", ctx_r16.i18n.getMonthLabel(month_r14.firstDate), \" \");\n} }\nfunction NgbDatepicker_ng_template_2_div_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"div\", 9);\n    ɵngcc0.ɵɵtemplate(1, NgbDatepicker_ng_template_2_div_0_div_1_Template, 2, 1, \"div\", 10);\n    ɵngcc0.ɵɵelement(2, \"ngb-datepicker-month\", 11);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const month_r14 = ctx.$implicit;\n    const ctx_r13 = ɵngcc0.ɵɵnextContext(2);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r13.navigation === \"none\" || ctx_r13.displayMonths > 1 && ctx_r13.navigation === \"select\");\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"month\", month_r14.firstDate);\n} }\nfunction NgbDatepicker_ng_template_2_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵtemplate(0, NgbDatepicker_ng_template_2_div_0_Template, 3, 2, \"div\", 8);\n} if (rf & 2) {\n    const ctx_r3 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵproperty(\"ngForOf\", ctx_r3.model.months);\n} }\nfunction NgbDatepicker_ngb_datepicker_navigation_5_Template(rf, ctx) { if (rf & 1) {\n    const _r19 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"ngb-datepicker-navigation\", 13);\n    ɵngcc0.ɵɵlistener(\"navigate\", function NgbDatepicker_ngb_datepicker_navigation_5_Template_ngb_datepicker_navigation_navigate_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r19); const ctx_r18 = ɵngcc0.ɵɵnextContext(); return ctx_r18.onNavigateEvent($event); })(\"select\", function NgbDatepicker_ngb_datepicker_navigation_5_Template_ngb_datepicker_navigation_select_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r19); const ctx_r20 = ɵngcc0.ɵɵnextContext(); return ctx_r20.onNavigateDateSelect($event); });\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r4 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵproperty(\"date\", ctx_r4.model.firstDate)(\"months\", ctx_r4.model.months)(\"disabled\", ctx_r4.model.disabled)(\"showSelect\", ctx_r4.model.navigation === \"select\")(\"prevDisabled\", ctx_r4.model.prevDisabled)(\"nextDisabled\", ctx_r4.model.nextDisabled)(\"selectBoxes\", ctx_r4.model.selectBoxes);\n} }\nfunction NgbDatepicker_ng_template_8_Template(rf, ctx) { }\nfunction NgbDatepicker_ng_template_9_Template(rf, ctx) { }\nfunction NgbDatepickerMonth_div_0_div_1_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"div\", 5);\n    ɵngcc0.ɵɵtext(1);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r2 = ɵngcc0.ɵɵnextContext(2);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵtextInterpolate(ctx_r2.i18n.getWeekLabel());\n} }\nfunction NgbDatepickerMonth_div_0_div_2_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"div\", 6);\n    ɵngcc0.ɵɵtext(1);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const weekday_r4 = ctx.$implicit;\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵtextInterpolate(weekday_r4);\n} }\nfunction NgbDatepickerMonth_div_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"div\", 2);\n    ɵngcc0.ɵɵtemplate(1, NgbDatepickerMonth_div_0_div_1_Template, 2, 1, \"div\", 3);\n    ɵngcc0.ɵɵtemplate(2, NgbDatepickerMonth_div_0_div_2_Template, 2, 1, \"div\", 4);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r0 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r0.datepicker.showWeekNumbers);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngForOf\", ctx_r0.viewModel.weekdays);\n} }\nfunction NgbDatepickerMonth_ng_template_1_div_0_div_1_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"div\", 11);\n    ɵngcc0.ɵɵtext(1);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const week_r5 = ɵngcc0.ɵɵnextContext(2).$implicit;\n    const ctx_r7 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵtextInterpolate(ctx_r7.i18n.getWeekNumerals(week_r5.number));\n} }\nfunction NgbDatepickerMonth_ng_template_1_div_0_div_2_ng_template_1_ng_template_0_Template(rf, ctx) { }\nfunction NgbDatepickerMonth_ng_template_1_div_0_div_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵtemplate(0, NgbDatepickerMonth_ng_template_1_div_0_div_2_ng_template_1_ng_template_0_Template, 0, 0, \"ng-template\", 14);\n} if (rf & 2) {\n    const day_r10 = ɵngcc0.ɵɵnextContext().$implicit;\n    const ctx_r11 = ɵngcc0.ɵɵnextContext(3);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r11.datepicker.dayTemplate)(\"ngTemplateOutletContext\", day_r10.context);\n} }\nfunction NgbDatepickerMonth_ng_template_1_div_0_div_2_Template(rf, ctx) { if (rf & 1) {\n    const _r15 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"div\", 12);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbDatepickerMonth_ng_template_1_div_0_div_2_Template_div_click_0_listener($event) { const restoredCtx = ɵngcc0.ɵɵrestoreView(_r15); const day_r10 = restoredCtx.$implicit; const ctx_r14 = ɵngcc0.ɵɵnextContext(3); ctx_r14.doSelect(day_r10); return $event.preventDefault(); });\n    ɵngcc0.ɵɵtemplate(1, NgbDatepickerMonth_ng_template_1_div_0_div_2_ng_template_1_Template, 1, 2, \"ng-template\", 13);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const day_r10 = ctx.$implicit;\n    ɵngcc0.ɵɵclassProp(\"disabled\", day_r10.context.disabled)(\"hidden\", day_r10.hidden)(\"ngb-dp-today\", day_r10.context.today);\n    ɵngcc0.ɵɵproperty(\"tabindex\", day_r10.tabindex);\n    ɵngcc0.ɵɵattribute(\"aria-label\", day_r10.ariaLabel);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngIf\", !day_r10.hidden);\n} }\nfunction NgbDatepickerMonth_ng_template_1_div_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"div\", 8);\n    ɵngcc0.ɵɵtemplate(1, NgbDatepickerMonth_ng_template_1_div_0_div_1_Template, 2, 1, \"div\", 9);\n    ɵngcc0.ɵɵtemplate(2, NgbDatepickerMonth_ng_template_1_div_0_div_2_Template, 2, 9, \"div\", 10);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const week_r5 = ɵngcc0.ɵɵnextContext().$implicit;\n    const ctx_r6 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r6.datepicker.showWeekNumbers);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngForOf\", week_r5.days);\n} }\nfunction NgbDatepickerMonth_ng_template_1_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵtemplate(0, NgbDatepickerMonth_ng_template_1_div_0_Template, 3, 2, \"div\", 7);\n} if (rf & 2) {\n    const week_r5 = ctx.$implicit;\n    ɵngcc0.ɵɵproperty(\"ngIf\", !week_r5.collapsed);\n} }\nfunction NgbDatepickerNavigation_ngb_datepicker_navigation_select_3_Template(rf, ctx) { if (rf & 1) {\n    const _r3 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"ngb-datepicker-navigation-select\", 7);\n    ɵngcc0.ɵɵlistener(\"select\", function NgbDatepickerNavigation_ngb_datepicker_navigation_select_3_Template_ngb_datepicker_navigation_select_select_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r3); const ctx_r2 = ɵngcc0.ɵɵnextContext(); return ctx_r2.select.emit($event); });\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r0 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵproperty(\"date\", ctx_r0.date)(\"disabled\", ctx_r0.disabled)(\"months\", ctx_r0.selectBoxes.months)(\"years\", ctx_r0.selectBoxes.years);\n} }\nfunction NgbDatepickerNavigation_4_ng_template_0_div_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelement(0, \"div\", 0);\n} }\nfunction NgbDatepickerNavigation_4_ng_template_0_div_3_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelement(0, \"div\", 0);\n} }\nfunction NgbDatepickerNavigation_4_ng_template_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵtemplate(0, NgbDatepickerNavigation_4_ng_template_0_div_0_Template, 1, 0, \"div\", 9);\n    ɵngcc0.ɵɵelementStart(1, \"div\", 10);\n    ɵngcc0.ɵɵtext(2);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵtemplate(3, NgbDatepickerNavigation_4_ng_template_0_div_3_Template, 1, 0, \"div\", 9);\n} if (rf & 2) {\n    const month_r5 = ctx.$implicit;\n    const i_r6 = ctx.index;\n    const ctx_r4 = ɵngcc0.ɵɵnextContext(2);\n    ɵngcc0.ɵɵproperty(\"ngIf\", i_r6 > 0);\n    ɵngcc0.ɵɵadvance(2);\n    ɵngcc0.ɵɵtextInterpolate1(\" \", ctx_r4.i18n.getMonthLabel(month_r5.firstDate), \" \");\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngIf\", i_r6 !== ctx_r4.months.length - 1);\n} }\nfunction NgbDatepickerNavigation_4_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵtemplate(0, NgbDatepickerNavigation_4_ng_template_0_Template, 4, 3, \"ng-template\", 8);\n} if (rf & 2) {\n    const ctx_r1 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵproperty(\"ngForOf\", ctx_r1.months);\n} }\nconst _c20 = [\"ngbDatepickerDayView\", \"\"];\nconst _c21 = [\"month\"];\nconst _c22 = [\"year\"];\nfunction NgbDatepickerNavigationSelect_option_2_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"option\", 5);\n    ɵngcc0.ɵɵtext(1);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const m_r4 = ctx.$implicit;\n    const ctx_r1 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵproperty(\"value\", m_r4);\n    ɵngcc0.ɵɵattribute(\"aria-label\", ctx_r1.i18n.getMonthFullName(m_r4, ctx_r1.date == null ? null : ctx_r1.date.year));\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵtextInterpolate(ctx_r1.i18n.getMonthShortName(m_r4, ctx_r1.date == null ? null : ctx_r1.date.year));\n} }\nfunction NgbDatepickerNavigationSelect_option_5_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"option\", 5);\n    ɵngcc0.ɵɵtext(1);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const y_r5 = ctx.$implicit;\n    const ctx_r3 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵproperty(\"value\", y_r5);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵtextInterpolate(ctx_r3.i18n.getYearNumerals(y_r5));\n} }\nconst _c31 = [\"dialog\"];\nconst _c32 = [\"ngbNavOutlet\", \"\"];\nfunction NgbNavOutlet_ng_template_0_div_0_ng_template_1_Template(rf, ctx) { }\nconst _c33 = function (a0) { return { $implicit: a0 }; };\nfunction NgbNavOutlet_ng_template_0_div_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"div\", 2);\n    ɵngcc0.ɵɵtemplate(1, NgbNavOutlet_ng_template_0_div_0_ng_template_1_Template, 0, 0, \"ng-template\", 3);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const item_r1 = ɵngcc0.ɵɵnextContext().$implicit;\n    const ctx_r2 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵproperty(\"item\", item_r1)(\"nav\", ctx_r2.nav)(\"role\", ctx_r2.paneRole);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", (item_r1.contentTpl == null ? null : item_r1.contentTpl.templateRef) || null)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction1(5, _c33, item_r1.active || ctx_r2.isPanelTransitioning(item_r1)));\n} }\nfunction NgbNavOutlet_ng_template_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵtemplate(0, NgbNavOutlet_ng_template_0_div_0_Template, 2, 7, \"div\", 1);\n} if (rf & 2) {\n    const item_r1 = ctx.$implicit;\n    const ctx_r0 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵproperty(\"ngIf\", item_r1.isPanelInDom() || ctx_r0.isPanelTransitioning(item_r1));\n} }\nfunction NgbPagination_ng_template_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"span\", 9);\n    ɵngcc0.ɵɵi18n(1, 10);\n    ɵngcc0.ɵɵelementEnd();\n} }\nfunction NgbPagination_ng_template_2_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"span\", 9);\n    ɵngcc0.ɵɵi18n(1, 11);\n    ɵngcc0.ɵɵelementEnd();\n} }\nfunction NgbPagination_ng_template_4_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"span\", 9);\n    ɵngcc0.ɵɵi18n(1, 12);\n    ɵngcc0.ɵɵelementEnd();\n} }\nfunction NgbPagination_ng_template_6_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"span\", 9);\n    ɵngcc0.ɵɵi18n(1, 13);\n    ɵngcc0.ɵɵelementEnd();\n} }\nfunction NgbPagination_ng_template_8_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵtext(0, \"...\");\n} }\nfunction NgbPagination_ng_template_10_span_1_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"span\", 15);\n    ɵngcc0.ɵɵtext(1, \"(current)\");\n    ɵngcc0.ɵɵelementEnd();\n} }\nfunction NgbPagination_ng_template_10_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵtext(0);\n    ɵngcc0.ɵɵtemplate(1, NgbPagination_ng_template_10_span_1_Template, 2, 0, \"span\", 14);\n} if (rf & 2) {\n    const page_r19 = ctx.$implicit;\n    const currentPage_r20 = ctx.currentPage;\n    ɵngcc0.ɵɵtextInterpolate1(\" \", page_r19, \" \");\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngIf\", page_r19 === currentPage_r20);\n} }\nfunction NgbPagination_ng_template_12_li_0_a_1_ng_template_1_Template(rf, ctx) { }\nconst _c42 = function (a1) { return { disabled: true, currentPage: a1 }; };\nfunction NgbPagination_ng_template_12_li_0_a_1_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"a\", 20);\n    ɵngcc0.ɵɵtemplate(1, NgbPagination_ng_template_12_li_0_a_1_ng_template_1_Template, 0, 0, \"ng-template\", 8);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const page_r22 = ɵngcc0.ɵɵnextContext(2).$implicit;\n    const ctx_r27 = ɵngcc0.ɵɵnextContext();\n    const _r8 = ɵngcc0.ɵɵreference(9);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", (ctx_r27.tplEllipsis == null ? null : ctx_r27.tplEllipsis.templateRef) || _r8)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction1(2, _c42, page_r22));\n} }\nfunction NgbPagination_ng_template_12_li_0_a_2_ng_template_1_Template(rf, ctx) { }\nconst _c43 = function (a0, a1, a2) { return { disabled: a0, $implicit: a1, currentPage: a2 }; };\nfunction NgbPagination_ng_template_12_li_0_a_2_Template(rf, ctx) { if (rf & 1) {\n    const _r34 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"a\", 21);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbPagination_ng_template_12_li_0_a_2_Template_a_click_0_listener($event) { ɵngcc0.ɵɵrestoreView(_r34); const pageNumber_r26 = ɵngcc0.ɵɵnextContext().$implicit; const ctx_r32 = ɵngcc0.ɵɵnextContext(2); ctx_r32.selectPage(pageNumber_r26); return $event.preventDefault(); });\n    ɵngcc0.ɵɵtemplate(1, NgbPagination_ng_template_12_li_0_a_2_ng_template_1_Template, 0, 0, \"ng-template\", 8);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const pageNumber_r26 = ɵngcc0.ɵɵnextContext().$implicit;\n    const ctx_r35 = ɵngcc0.ɵɵnextContext();\n    const disabled_r24 = ctx_r35.disabled;\n    const page_r22 = ctx_r35.$implicit;\n    const ctx_r28 = ɵngcc0.ɵɵnextContext();\n    const _r10 = ɵngcc0.ɵɵreference(11);\n    ɵngcc0.ɵɵattribute(\"tabindex\", disabled_r24 ? \"-1\" : null)(\"aria-disabled\", disabled_r24 ? \"true\" : null);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", (ctx_r28.tplNumber == null ? null : ctx_r28.tplNumber.templateRef) || _r10)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction3(4, _c43, disabled_r24, pageNumber_r26, page_r22));\n} }\nfunction NgbPagination_ng_template_12_li_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"li\", 17);\n    ɵngcc0.ɵɵtemplate(1, NgbPagination_ng_template_12_li_0_a_1_Template, 2, 4, \"a\", 18);\n    ɵngcc0.ɵɵtemplate(2, NgbPagination_ng_template_12_li_0_a_2_Template, 2, 8, \"a\", 19);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const pageNumber_r26 = ctx.$implicit;\n    const ctx_r37 = ɵngcc0.ɵɵnextContext();\n    const page_r22 = ctx_r37.$implicit;\n    const disabled_r24 = ctx_r37.disabled;\n    const ctx_r25 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵclassProp(\"active\", pageNumber_r26 === page_r22)(\"disabled\", ctx_r25.isEllipsis(pageNumber_r26) || disabled_r24);\n    ɵngcc0.ɵɵattribute(\"aria-current\", pageNumber_r26 === page_r22 ? \"page\" : null);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r25.isEllipsis(pageNumber_r26));\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngIf\", !ctx_r25.isEllipsis(pageNumber_r26));\n} }\nfunction NgbPagination_ng_template_12_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵtemplate(0, NgbPagination_ng_template_12_li_0_Template, 3, 7, \"li\", 16);\n} if (rf & 2) {\n    const pages_r23 = ctx.pages;\n    ɵngcc0.ɵɵproperty(\"ngForOf\", pages_r23);\n} }\nfunction NgbPagination_li_15_ng_template_2_Template(rf, ctx) { }\nconst _c46 = function (a0, a1) { return { disabled: a0, currentPage: a1 }; };\nfunction NgbPagination_li_15_Template(rf, ctx) { if (rf & 1) {\n    const _r40 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"li\", 17);\n    ɵngcc0.ɵɵelementStart(1, \"a\", 22);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbPagination_li_15_Template_a_click_1_listener($event) { ɵngcc0.ɵɵrestoreView(_r40); const ctx_r39 = ɵngcc0.ɵɵnextContext(); ctx_r39.selectPage(1); return $event.preventDefault(); });\n    ɵngcc0.ɵɵtemplate(2, NgbPagination_li_15_ng_template_2_Template, 0, 0, \"ng-template\", 8);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r14 = ɵngcc0.ɵɵnextContext();\n    const _r0 = ɵngcc0.ɵɵreference(1);\n    ɵngcc0.ɵɵclassProp(\"disabled\", ctx_r14.previousDisabled());\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵattribute(\"tabindex\", ctx_r14.previousDisabled() ? \"-1\" : null)(\"aria-disabled\", ctx_r14.previousDisabled() ? \"true\" : null);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", (ctx_r14.tplFirst == null ? null : ctx_r14.tplFirst.templateRef) || _r0)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction2(6, _c46, ctx_r14.previousDisabled(), ctx_r14.page));\n} }\nfunction NgbPagination_li_16_ng_template_2_Template(rf, ctx) { }\nconst _c49 = function (a0) { return { disabled: a0 }; };\nfunction NgbPagination_li_16_Template(rf, ctx) { if (rf & 1) {\n    const _r43 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"li\", 17);\n    ɵngcc0.ɵɵelementStart(1, \"a\", 23);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbPagination_li_16_Template_a_click_1_listener($event) { ɵngcc0.ɵɵrestoreView(_r43); const ctx_r42 = ɵngcc0.ɵɵnextContext(); ctx_r42.selectPage(ctx_r42.page - 1); return $event.preventDefault(); });\n    ɵngcc0.ɵɵtemplate(2, NgbPagination_li_16_ng_template_2_Template, 0, 0, \"ng-template\", 8);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r15 = ɵngcc0.ɵɵnextContext();\n    const _r2 = ɵngcc0.ɵɵreference(3);\n    ɵngcc0.ɵɵclassProp(\"disabled\", ctx_r15.previousDisabled());\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵattribute(\"tabindex\", ctx_r15.previousDisabled() ? \"-1\" : null)(\"aria-disabled\", ctx_r15.previousDisabled() ? \"true\" : null);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", (ctx_r15.tplPrevious == null ? null : ctx_r15.tplPrevious.templateRef) || _r2)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction1(6, _c49, ctx_r15.previousDisabled()));\n} }\nfunction NgbPagination_ng_template_17_Template(rf, ctx) { }\nfunction NgbPagination_li_18_ng_template_2_Template(rf, ctx) { }\nfunction NgbPagination_li_18_Template(rf, ctx) { if (rf & 1) {\n    const _r46 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"li\", 17);\n    ɵngcc0.ɵɵelementStart(1, \"a\", 24);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbPagination_li_18_Template_a_click_1_listener($event) { ɵngcc0.ɵɵrestoreView(_r46); const ctx_r45 = ɵngcc0.ɵɵnextContext(); ctx_r45.selectPage(ctx_r45.page + 1); return $event.preventDefault(); });\n    ɵngcc0.ɵɵtemplate(2, NgbPagination_li_18_ng_template_2_Template, 0, 0, \"ng-template\", 8);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r17 = ɵngcc0.ɵɵnextContext();\n    const _r4 = ɵngcc0.ɵɵreference(5);\n    ɵngcc0.ɵɵclassProp(\"disabled\", ctx_r17.nextDisabled());\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵattribute(\"tabindex\", ctx_r17.nextDisabled() ? \"-1\" : null)(\"aria-disabled\", ctx_r17.nextDisabled() ? \"true\" : null);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", (ctx_r17.tplNext == null ? null : ctx_r17.tplNext.templateRef) || _r4)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction2(6, _c46, ctx_r17.nextDisabled(), ctx_r17.page));\n} }\nfunction NgbPagination_li_19_ng_template_2_Template(rf, ctx) { }\nfunction NgbPagination_li_19_Template(rf, ctx) { if (rf & 1) {\n    const _r49 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"li\", 17);\n    ɵngcc0.ɵɵelementStart(1, \"a\", 25);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbPagination_li_19_Template_a_click_1_listener($event) { ɵngcc0.ɵɵrestoreView(_r49); const ctx_r48 = ɵngcc0.ɵɵnextContext(); ctx_r48.selectPage(ctx_r48.pageCount); return $event.preventDefault(); });\n    ɵngcc0.ɵɵtemplate(2, NgbPagination_li_19_ng_template_2_Template, 0, 0, \"ng-template\", 8);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r18 = ɵngcc0.ɵɵnextContext();\n    const _r6 = ɵngcc0.ɵɵreference(7);\n    ɵngcc0.ɵɵclassProp(\"disabled\", ctx_r18.nextDisabled());\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵattribute(\"tabindex\", ctx_r18.nextDisabled() ? \"-1\" : null)(\"aria-disabled\", ctx_r18.nextDisabled() ? \"true\" : null);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", (ctx_r18.tplLast == null ? null : ctx_r18.tplLast.templateRef) || _r6)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction2(6, _c46, ctx_r18.nextDisabled(), ctx_r18.page));\n} }\nconst _c54 = function (a0, a1, a2) { return { $implicit: a0, pages: a1, disabled: a2 }; };\nfunction NgbPopoverWindow_h3_1_ng_template_1_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵtext(0);\n} if (rf & 2) {\n    const ctx_r2 = ɵngcc0.ɵɵnextContext(2);\n    ɵngcc0.ɵɵtextInterpolate(ctx_r2.title);\n} }\nfunction NgbPopoverWindow_h3_1_ng_template_3_Template(rf, ctx) { }\nfunction NgbPopoverWindow_h3_1_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"h3\", 3);\n    ɵngcc0.ɵɵtemplate(1, NgbPopoverWindow_h3_1_ng_template_1_Template, 1, 1, \"ng-template\", null, 4, ɵngcc0.ɵɵtemplateRefExtractor);\n    ɵngcc0.ɵɵtemplate(3, NgbPopoverWindow_h3_1_ng_template_3_Template, 0, 0, \"ng-template\", 5);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const _r1 = ɵngcc0.ɵɵreference(2);\n    const ctx_r0 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵadvance(3);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r0.isTitleTemplate() ? ctx_r0.title : _r1)(\"ngTemplateOutletContext\", ctx_r0.context);\n} }\nfunction NgbProgressbar_span_1_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"span\");\n    ɵngcc0.ɵɵi18n(1, 2);\n    ɵngcc0.ɵɵpipe(2, \"percent\");\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r0 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵadvance(2);\n    ɵngcc0.ɵɵi18nExp(ɵngcc0.ɵɵpipeBind1(2, 1, ctx_r0.getValue() / ctx_r0.max));\n    ɵngcc0.ɵɵi18nApply(1);\n} }\nfunction NgbRating_ng_template_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵtext(0);\n} if (rf & 2) {\n    const fill_r3 = ctx.fill;\n    ɵngcc0.ɵɵtextInterpolate(fill_r3 === 100 ? \"\\u2605\" : \"\\u2606\");\n} }\nfunction NgbRating_ng_template_2_ng_template_3_Template(rf, ctx) { }\nfunction NgbRating_ng_template_2_Template(rf, ctx) { if (rf & 1) {\n    const _r7 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"span\", 2);\n    ɵngcc0.ɵɵtext(1);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementStart(2, \"span\", 3);\n    ɵngcc0.ɵɵlistener(\"mouseenter\", function NgbRating_ng_template_2_Template_span_mouseenter_2_listener() { const restoredCtx = ɵngcc0.ɵɵrestoreView(_r7); const index_r4 = restoredCtx.index; const ctx_r6 = ɵngcc0.ɵɵnextContext(); return ctx_r6.enter(index_r4 + 1); })(\"click\", function NgbRating_ng_template_2_Template_span_click_2_listener() { const restoredCtx = ɵngcc0.ɵɵrestoreView(_r7); const index_r4 = restoredCtx.index; const ctx_r8 = ɵngcc0.ɵɵnextContext(); return ctx_r8.handleClick(index_r4 + 1); });\n    ɵngcc0.ɵɵtemplate(3, NgbRating_ng_template_2_ng_template_3_Template, 0, 0, \"ng-template\", 4);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const index_r4 = ctx.index;\n    const ctx_r2 = ɵngcc0.ɵɵnextContext();\n    const _r0 = ɵngcc0.ɵɵreference(1);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵtextInterpolate1(\"(\", index_r4 < ctx_r2.nextRate ? \"*\" : \" \", \")\");\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵstyleProp(\"cursor\", ctx_r2.isInteractive() ? \"pointer\" : \"default\");\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r2.starTemplate || ctx_r2.starTemplateFromContent || _r0)(\"ngTemplateOutletContext\", ctx_r2.contexts[index_r4]);\n} }\nfunction NgbTimepicker_button_3_Template(rf, ctx) { if (rf & 1) {\n    const _r9 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"button\", 11);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbTimepicker_button_3_Template_button_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r9); const ctx_r8 = ɵngcc0.ɵɵnextContext(); return ctx_r8.changeHour(ctx_r8.hourStep); });\n    ɵngcc0.ɵɵelement(1, \"span\", 12);\n    ɵngcc0.ɵɵelementStart(2, \"span\", 13);\n    ɵngcc0.ɵɵi18n(3, 14);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r0 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵclassProp(\"btn-sm\", ctx_r0.isSmallSize)(\"btn-lg\", ctx_r0.isLargeSize)(\"disabled\", ctx_r0.disabled);\n    ɵngcc0.ɵɵproperty(\"disabled\", ctx_r0.disabled);\n} }\nfunction NgbTimepicker_button_5_Template(rf, ctx) { if (rf & 1) {\n    const _r11 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"button\", 11);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbTimepicker_button_5_Template_button_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r11); const ctx_r10 = ɵngcc0.ɵɵnextContext(); return ctx_r10.changeHour(-ctx_r10.hourStep); });\n    ɵngcc0.ɵɵelement(1, \"span\", 15);\n    ɵngcc0.ɵɵelementStart(2, \"span\", 13);\n    ɵngcc0.ɵɵi18n(3, 16);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r1 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵclassProp(\"btn-sm\", ctx_r1.isSmallSize)(\"btn-lg\", ctx_r1.isLargeSize)(\"disabled\", ctx_r1.disabled);\n    ɵngcc0.ɵɵproperty(\"disabled\", ctx_r1.disabled);\n} }\nfunction NgbTimepicker_button_9_Template(rf, ctx) { if (rf & 1) {\n    const _r13 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"button\", 11);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbTimepicker_button_9_Template_button_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r13); const ctx_r12 = ɵngcc0.ɵɵnextContext(); return ctx_r12.changeMinute(ctx_r12.minuteStep); });\n    ɵngcc0.ɵɵelement(1, \"span\", 12);\n    ɵngcc0.ɵɵelementStart(2, \"span\", 13);\n    ɵngcc0.ɵɵi18n(3, 17);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r2 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵclassProp(\"btn-sm\", ctx_r2.isSmallSize)(\"btn-lg\", ctx_r2.isLargeSize)(\"disabled\", ctx_r2.disabled);\n    ɵngcc0.ɵɵproperty(\"disabled\", ctx_r2.disabled);\n} }\nfunction NgbTimepicker_button_11_Template(rf, ctx) { if (rf & 1) {\n    const _r15 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"button\", 11);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbTimepicker_button_11_Template_button_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r15); const ctx_r14 = ɵngcc0.ɵɵnextContext(); return ctx_r14.changeMinute(-ctx_r14.minuteStep); });\n    ɵngcc0.ɵɵelement(1, \"span\", 15);\n    ɵngcc0.ɵɵelementStart(2, \"span\", 13);\n    ɵngcc0.ɵɵi18n(3, 18);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r3 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵclassProp(\"btn-sm\", ctx_r3.isSmallSize)(\"btn-lg\", ctx_r3.isLargeSize)(\"disabled\", ctx_r3.disabled);\n    ɵngcc0.ɵɵproperty(\"disabled\", ctx_r3.disabled);\n} }\nfunction NgbTimepicker_div_12_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"div\", 5);\n    ɵngcc0.ɵɵtext(1, \":\");\n    ɵngcc0.ɵɵelementEnd();\n} }\nfunction NgbTimepicker_div_13_button_1_Template(rf, ctx) { if (rf & 1) {\n    const _r19 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"button\", 11);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbTimepicker_div_13_button_1_Template_button_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r19); const ctx_r18 = ɵngcc0.ɵɵnextContext(2); return ctx_r18.changeSecond(ctx_r18.secondStep); });\n    ɵngcc0.ɵɵelement(1, \"span\", 12);\n    ɵngcc0.ɵɵelementStart(2, \"span\", 13);\n    ɵngcc0.ɵɵi18n(3, 21);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r16 = ɵngcc0.ɵɵnextContext(2);\n    ɵngcc0.ɵɵclassProp(\"btn-sm\", ctx_r16.isSmallSize)(\"btn-lg\", ctx_r16.isLargeSize)(\"disabled\", ctx_r16.disabled);\n    ɵngcc0.ɵɵproperty(\"disabled\", ctx_r16.disabled);\n} }\nfunction NgbTimepicker_div_13_button_3_Template(rf, ctx) { if (rf & 1) {\n    const _r21 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"button\", 11);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbTimepicker_div_13_button_3_Template_button_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r21); const ctx_r20 = ɵngcc0.ɵɵnextContext(2); return ctx_r20.changeSecond(-ctx_r20.secondStep); });\n    ɵngcc0.ɵɵelement(1, \"span\", 15);\n    ɵngcc0.ɵɵelementStart(2, \"span\", 13);\n    ɵngcc0.ɵɵi18n(3, 22);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r17 = ɵngcc0.ɵɵnextContext(2);\n    ɵngcc0.ɵɵclassProp(\"btn-sm\", ctx_r17.isSmallSize)(\"btn-lg\", ctx_r17.isLargeSize)(\"disabled\", ctx_r17.disabled);\n    ɵngcc0.ɵɵproperty(\"disabled\", ctx_r17.disabled);\n} }\nfunction NgbTimepicker_div_13_Template(rf, ctx) { if (rf & 1) {\n    const _r23 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"div\", 19);\n    ɵngcc0.ɵɵtemplate(1, NgbTimepicker_div_13_button_1_Template, 4, 7, \"button\", 3);\n    ɵngcc0.ɵɵelementStart(2, \"input\", 20);\n    ɵngcc0.ɵɵlistener(\"change\", function NgbTimepicker_div_13_Template_input_change_2_listener($event) { ɵngcc0.ɵɵrestoreView(_r23); const ctx_r22 = ɵngcc0.ɵɵnextContext(); return ctx_r22.updateSecond($event.target.value); })(\"blur\", function NgbTimepicker_div_13_Template_input_blur_2_listener() { ɵngcc0.ɵɵrestoreView(_r23); const ctx_r24 = ɵngcc0.ɵɵnextContext(); return ctx_r24.handleBlur(); })(\"input\", function NgbTimepicker_div_13_Template_input_input_2_listener($event) { ɵngcc0.ɵɵrestoreView(_r23); const ctx_r25 = ɵngcc0.ɵɵnextContext(); return ctx_r25.formatInput($event.target); })(\"keydown.ArrowUp\", function NgbTimepicker_div_13_Template_input_keydown_ArrowUp_2_listener($event) { ɵngcc0.ɵɵrestoreView(_r23); const ctx_r26 = ɵngcc0.ɵɵnextContext(); ctx_r26.changeSecond(ctx_r26.secondStep); return $event.preventDefault(); })(\"keydown.ArrowDown\", function NgbTimepicker_div_13_Template_input_keydown_ArrowDown_2_listener($event) { ɵngcc0.ɵɵrestoreView(_r23); const ctx_r27 = ɵngcc0.ɵɵnextContext(); ctx_r27.changeSecond(-ctx_r27.secondStep); return $event.preventDefault(); });\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵtemplate(3, NgbTimepicker_div_13_button_3_Template, 4, 7, \"button\", 3);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r5 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r5.spinners);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵclassProp(\"form-control-sm\", ctx_r5.isSmallSize)(\"form-control-lg\", ctx_r5.isLargeSize);\n    ɵngcc0.ɵɵproperty(\"value\", ctx_r5.formatMinSec(ctx_r5.model == null ? null : ctx_r5.model.second))(\"readOnly\", ctx_r5.readonlyInputs)(\"disabled\", ctx_r5.disabled);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r5.spinners);\n} }\nfunction NgbTimepicker_div_14_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelement(0, \"div\", 5);\n} }\nfunction NgbTimepicker_div_15_ng_container_2_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementContainerStart(0);\n    ɵngcc0.ɵɵi18n(1, 27);\n    ɵngcc0.ɵɵelementContainerEnd();\n} if (rf & 2) {\n    const ctx_r28 = ɵngcc0.ɵɵnextContext(2);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵi18nExp(ctx_r28.i18n.getAfternoonPeriod());\n    ɵngcc0.ɵɵi18nApply(1);\n} }\nfunction NgbTimepicker_div_15_ng_template_3_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵi18n(0, 28);\n} if (rf & 2) {\n    const ctx_r30 = ɵngcc0.ɵɵnextContext(2);\n    ɵngcc0.ɵɵi18nExp(ctx_r30.i18n.getMorningPeriod());\n    ɵngcc0.ɵɵi18nApply(0);\n} }\nfunction NgbTimepicker_div_15_Template(rf, ctx) { if (rf & 1) {\n    const _r32 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"div\", 23);\n    ɵngcc0.ɵɵelementStart(1, \"button\", 24);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbTimepicker_div_15_Template_button_click_1_listener() { ɵngcc0.ɵɵrestoreView(_r32); const ctx_r31 = ɵngcc0.ɵɵnextContext(); return ctx_r31.toggleMeridian(); });\n    ɵngcc0.ɵɵtemplate(2, NgbTimepicker_div_15_ng_container_2_Template, 2, 1, \"ng-container\", 25);\n    ɵngcc0.ɵɵtemplate(3, NgbTimepicker_div_15_ng_template_3_Template, 1, 1, \"ng-template\", null, 26, ɵngcc0.ɵɵtemplateRefExtractor);\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const _r29 = ɵngcc0.ɵɵreference(4);\n    const ctx_r7 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵclassProp(\"btn-sm\", ctx_r7.isSmallSize)(\"btn-lg\", ctx_r7.isLargeSize)(\"disabled\", ctx_r7.disabled);\n    ɵngcc0.ɵɵproperty(\"disabled\", ctx_r7.disabled);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngIf\", ctx_r7.model && ctx_r7.model.hour >= 12)(\"ngIfElse\", _r29);\n} }\nfunction NgbToast_ng_template_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"strong\", 3);\n    ɵngcc0.ɵɵtext(1);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r1 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵtextInterpolate(ctx_r1.header);\n} }\nfunction NgbToast_ng_template_2_ng_template_1_Template(rf, ctx) { }\nfunction NgbToast_ng_template_2_Template(rf, ctx) { if (rf & 1) {\n    const _r5 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"div\", 4);\n    ɵngcc0.ɵɵtemplate(1, NgbToast_ng_template_2_ng_template_1_Template, 0, 0, \"ng-template\", 5);\n    ɵngcc0.ɵɵelementStart(2, \"button\", 6);\n    ɵngcc0.ɵɵlistener(\"click\", function NgbToast_ng_template_2_Template_button_click_2_listener() { ɵngcc0.ɵɵrestoreView(_r5); const ctx_r4 = ɵngcc0.ɵɵnextContext(); return ctx_r4.hide(); });\n    ɵngcc0.ɵɵelementStart(3, \"span\", 7);\n    ɵngcc0.ɵɵtext(4, \"\\u00D7\");\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const ctx_r2 = ɵngcc0.ɵɵnextContext();\n    const _r0 = ɵngcc0.ɵɵreference(1);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r2.contentHeaderTpl || _r0);\n} }\nfunction NgbHighlight_ng_template_0_span_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelementStart(0, \"span\");\n    ɵngcc0.ɵɵtext(1);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const part_r1 = ɵngcc0.ɵɵnextContext().$implicit;\n    const ctx_r3 = ɵngcc0.ɵɵnextContext();\n    ɵngcc0.ɵɵclassMap(ctx_r3.highlightClass);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵtextInterpolate(part_r1);\n} }\nfunction NgbHighlight_ng_template_0_ng_template_1_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵtext(0);\n} if (rf & 2) {\n    const part_r1 = ɵngcc0.ɵɵnextContext().$implicit;\n    ɵngcc0.ɵɵtextInterpolate(part_r1);\n} }\nfunction NgbHighlight_ng_template_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵtemplate(0, NgbHighlight_ng_template_0_span_0_Template, 2, 3, \"span\", 1);\n    ɵngcc0.ɵɵtemplate(1, NgbHighlight_ng_template_0_ng_template_1_Template, 1, 1, \"ng-template\", null, 2, ɵngcc0.ɵɵtemplateRefExtractor);\n} if (rf & 2) {\n    const isOdd_r2 = ctx.odd;\n    const _r4 = ɵngcc0.ɵɵreference(2);\n    ɵngcc0.ɵɵproperty(\"ngIf\", isOdd_r2)(\"ngIfElse\", _r4);\n} }\nfunction NgbTypeaheadWindow_ng_template_0_Template(rf, ctx) { if (rf & 1) {\n    ɵngcc0.ɵɵelement(0, \"ngb-highlight\", 2);\n} if (rf & 2) {\n    const result_r3 = ctx.result;\n    const term_r4 = ctx.term;\n    const formatter_r5 = ctx.formatter;\n    ɵngcc0.ɵɵproperty(\"result\", formatter_r5(result_r3))(\"term\", term_r4);\n} }\nfunction NgbTypeaheadWindow_ng_template_2_ng_template_1_Template(rf, ctx) { }\nconst _c87 = function (a0, a1, a2) { return { result: a0, term: a1, formatter: a2 }; };\nfunction NgbTypeaheadWindow_ng_template_2_Template(rf, ctx) { if (rf & 1) {\n    const _r10 = ɵngcc0.ɵɵgetCurrentView();\n    ɵngcc0.ɵɵelementStart(0, \"button\", 3);\n    ɵngcc0.ɵɵlistener(\"mouseenter\", function NgbTypeaheadWindow_ng_template_2_Template_button_mouseenter_0_listener() { const restoredCtx = ɵngcc0.ɵɵrestoreView(_r10); const idx_r7 = restoredCtx.index; const ctx_r9 = ɵngcc0.ɵɵnextContext(); return ctx_r9.markActive(idx_r7); })(\"click\", function NgbTypeaheadWindow_ng_template_2_Template_button_click_0_listener() { const restoredCtx = ɵngcc0.ɵɵrestoreView(_r10); const result_r6 = restoredCtx.$implicit; const ctx_r11 = ɵngcc0.ɵɵnextContext(); return ctx_r11.select(result_r6); });\n    ɵngcc0.ɵɵtemplate(1, NgbTypeaheadWindow_ng_template_2_ng_template_1_Template, 0, 0, \"ng-template\", 4);\n    ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n    const result_r6 = ctx.$implicit;\n    const idx_r7 = ctx.index;\n    const ctx_r2 = ɵngcc0.ɵɵnextContext();\n    const _r0 = ɵngcc0.ɵɵreference(1);\n    ɵngcc0.ɵɵclassProp(\"active\", idx_r7 === ctx_r2.activeIdx);\n    ɵngcc0.ɵɵproperty(\"id\", ctx_r2.id + \"-\" + idx_r7);\n    ɵngcc0.ɵɵadvance(1);\n    ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r2.resultTemplate || _r0)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction3(5, _c87, result_r6, ctx_r2.term, ctx_r2.formatter));\n} }\nfunction toInteger(value) {\n    return parseInt(`${value}`, 10);\n}\nfunction toString(value) {\n    return (value !== undefined && value !== null) ? `${value}` : '';\n}\nfunction getValueInRange(value, max, min = 0) {\n    return Math.max(Math.min(value, max), min);\n}\nfunction isString(value) {\n    return typeof value === 'string';\n}\nfunction isNumber(value) {\n    return !isNaN(toInteger(value));\n}\nfunction isInteger(value) {\n    return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n}\nfunction isDefined(value) {\n    return value !== undefined && value !== null;\n}\nfunction padNumber(value) {\n    if (isNumber(value)) {\n        return `0${value}`.slice(-2);\n    }\n    else {\n        return '';\n    }\n}\nfunction regExpEscape(text) {\n    return text.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n}\nfunction hasClassName(element, className) {\n    return element && element.className && element.className.split &&\n        element.className.split(/\\s+/).indexOf(className) >= 0;\n}\nif (typeof Element !== 'undefined' && !Element.prototype.closest) {\n    // Polyfill for ie10+\n    if (!Element.prototype.matches) {\n        // IE uses the non-standard name: msMatchesSelector\n        Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\n    }\n    Element.prototype.closest = function (s) {\n        let el = this;\n        if (!document.documentElement.contains(el)) {\n            return null;\n        }\n        do {\n            if (el.matches(s)) {\n                return el;\n            }\n            el = el.parentElement || el.parentNode;\n        } while (el !== null && el.nodeType === 1);\n        return null;\n    };\n}\nfunction closest(element, selector) {\n    if (!selector) {\n        return null;\n    }\n    /*\n     * In certain browsers (e.g. Edge 44.18362.449.0) HTMLDocument does\n     * not support `Element.prototype.closest`. To emulate the correct behaviour\n     * we return null when the method is missing.\n     *\n     * Note that in evergreen browsers `closest(document.documentElement, 'html')`\n     * will return the document element whilst in Edge null will be returned. This\n     * compromise was deemed good enough.\n     */\n    if (typeof element.closest === 'undefined') {\n        return null;\n    }\n    return element.closest(selector);\n}\n/**\n * Force a browser reflow\n * @param element element where to apply the reflow\n */\nfunction reflow(element) {\n    return (element || document.body).getBoundingClientRect();\n}\n/**\n * Creates an observable where all callbacks are executed inside a given zone\n *\n * @param zone\n */\nfunction runInZone(zone) {\n    return (source) => {\n        return new Observable(observer => {\n            const onNext = (value) => zone.run(() => observer.next(value));\n            const onError = (e) => zone.run(() => observer.error(e));\n            const onComplete = () => zone.run(() => observer.complete());\n            return source.subscribe(onNext, onError, onComplete);\n        });\n    };\n}\nfunction removeAccents(str) {\n    return str.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\n}\n\nconst environment = {\n    animation: true,\n    transitionTimerDelayMs: 5,\n};\n\n/**\n * Global ng-bootstrap config\n *\n * @since 8.0.0\n */\nclass NgbConfig {\n    constructor() {\n        this.animation = environment.animation;\n    }\n}\nNgbConfig.ɵfac = function NgbConfig_Factory(t) { return new (t || NgbConfig)(); };\nNgbConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbConfig_Factory() { return new NgbConfig(); }, token: NgbConfig, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return []; }, null); })();\n\n/**\n * A configuration service for the [NgbAccordion](#/components/accordion/api#NgbAccordion) component.\n *\n * You can inject this service, typically in your root component, and customize its properties\n * to provide default values for all accordions used in the application.\n */\nclass NgbAccordionConfig {\n    constructor(_ngbConfig) {\n        this._ngbConfig = _ngbConfig;\n        this.closeOthers = false;\n    }\n    get animation() { return (this._animation === undefined) ? this._ngbConfig.animation : this._animation; }\n    set animation(animation) { this._animation = animation; }\n}\nNgbAccordionConfig.ɵfac = function NgbAccordionConfig_Factory(t) { return new (t || NgbAccordionConfig)(ɵngcc0.ɵɵinject(NgbConfig)); };\nNgbAccordionConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbAccordionConfig_Factory() { return new NgbAccordionConfig(i0.ɵɵinject(NgbConfig)); }, token: NgbAccordionConfig, providedIn: \"root\" });\nNgbAccordionConfig.ctorParameters = () => [\n    { type: NgbConfig }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbAccordionConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return [{ type: NgbConfig }]; }, null); })();\n\nfunction getTransitionDurationMs(element) {\n    const { transitionDelay, transitionDuration } = window.getComputedStyle(element);\n    const transitionDelaySec = parseFloat(transitionDelay);\n    const transitionDurationSec = parseFloat(transitionDuration);\n    return (transitionDelaySec + transitionDurationSec) * 1000;\n}\n\nconst noopFn = () => { };\nconst ɵ0$5 = noopFn;\nconst { transitionTimerDelayMs } = environment;\nconst runningTransitions = new Map();\nconst ngbRunTransition = (zone, element, startFn, options) => {\n    // Getting initial context from options\n    let context = options.context || {};\n    // Checking if there are already running transitions on the given element.\n    const running = runningTransitions.get(element);\n    if (running) {\n        switch (options.runningTransition) {\n            // If there is one running and we want for it to 'continue' to run, we have to cancel the new one.\n            // We're not emitting any values, but simply completing the observable (EMPTY).\n            case 'continue':\n                return EMPTY;\n            // If there is one running and we want for it to 'stop', we have to complete the running one.\n            // We're simply completing the running one and not emitting any values and merging newly provided context\n            // with the one coming from currently running transition.\n            case 'stop':\n                zone.run(() => running.transition$.complete());\n                context = Object.assign(running.context, context);\n                runningTransitions.delete(element);\n        }\n    }\n    // Running the start function\n    const endFn = startFn(element, options.animation, context) || noopFn;\n    // If 'prefer-reduced-motion' is enabled, the 'transition' will be set to 'none'.\n    // If animations are disabled, we have to emit a value and complete the observable\n    // In this case we have to call the end function, but can finish immediately by emitting a value,\n    // completing the observable and executing end functions synchronously.\n    if (!options.animation || window.getComputedStyle(element).transitionProperty === 'none') {\n        zone.run(() => endFn());\n        return of(undefined).pipe(runInZone(zone));\n    }\n    // Starting a new transition\n    const transition$ = new Subject();\n    const finishTransition$ = new Subject();\n    const stop$ = transition$.pipe(endWith(true));\n    runningTransitions.set(element, {\n        transition$,\n        complete: () => {\n            finishTransition$.next();\n            finishTransition$.complete();\n        },\n        context\n    });\n    const transitionDurationMs = getTransitionDurationMs(element);\n    // 1. We have to both listen for the 'transitionend' event and have a 'just-in-case' timer,\n    // because 'transitionend' event might not be fired in some browsers, if the transitioning\n    // element becomes invisible (ex. when scrolling, making browser tab inactive, etc.). The timer\n    // guarantees, that we'll release the DOM element and complete 'ngbRunTransition'.\n    // 2. We need to filter transition end events, because they might bubble from shorter transitions\n    // on inner DOM elements. We're only interested in the transition on the 'element' itself.\n    zone.runOutsideAngular(() => {\n        const transitionEnd$ = fromEvent(element, 'transitionend').pipe(takeUntil(stop$), filter(({ target }) => target === element));\n        const timer$ = timer(transitionDurationMs + transitionTimerDelayMs).pipe(takeUntil(stop$));\n        race(timer$, transitionEnd$, finishTransition$).pipe(takeUntil(stop$)).subscribe(() => {\n            runningTransitions.delete(element);\n            zone.run(() => {\n                endFn();\n                transition$.next();\n                transition$.complete();\n            });\n        });\n    });\n    return transition$.asObservable();\n};\nconst ngbCompleteTransition = (element) => {\n    var _a;\n    (_a = runningTransitions.get(element)) === null || _a === void 0 ? void 0 : _a.complete();\n};\n\nfunction measureCollapsingElementHeightPx(element) {\n    // SSR fix for without injecting the PlatformId\n    if (typeof navigator === 'undefined') {\n        return '0px';\n    }\n    const { classList } = element;\n    const hasShownClass = classList.contains('show');\n    if (!hasShownClass) {\n        classList.add('show');\n    }\n    element.style.height = '';\n    const height = element.getBoundingClientRect().height + 'px';\n    if (!hasShownClass) {\n        classList.remove('show');\n    }\n    return height;\n}\nconst ngbCollapsingTransition = (element, animation, context) => {\n    let { direction, maxHeight } = context;\n    const { classList } = element;\n    function setInitialClasses() {\n        classList.add('collapse');\n        if (direction === 'show') {\n            classList.add('show');\n        }\n        else {\n            classList.remove('show');\n        }\n    }\n    // without animations we just need to set initial classes\n    if (!animation) {\n        setInitialClasses();\n        return;\n    }\n    // No maxHeight -> running the transition for the first time\n    if (!maxHeight) {\n        maxHeight = measureCollapsingElementHeightPx(element);\n        context.maxHeight = maxHeight;\n        // Fix the height before starting the animation\n        element.style.height = direction !== 'show' ? maxHeight : '0px';\n        classList.remove('collapse');\n        classList.remove('collapsing');\n        classList.remove('show');\n        reflow(element);\n        // Start the animation\n        classList.add('collapsing');\n    }\n    // Start or revert the animation\n    element.style.height = direction === 'show' ? maxHeight : '0px';\n    return () => {\n        setInitialClasses();\n        classList.remove('collapsing');\n        element.style.height = '';\n    };\n};\n\nlet nextId$4 = 0;\n/**\n * A directive that wraps an accordion panel header with any HTML markup and a toggling button\n * marked with [`NgbPanelToggle`](#/components/accordion/api#NgbPanelToggle).\n * See the [header customization demo](#/components/accordion/examples#header) for more details.\n *\n * You can also use [`NgbPanelTitle`](#/components/accordion/api#NgbPanelTitle) to customize only the panel title.\n *\n * @since 4.1.0\n */\nclass NgbPanelHeader {\n    constructor(templateRef) {\n        this.templateRef = templateRef;\n    }\n}\nNgbPanelHeader.ɵfac = function NgbPanelHeader_Factory(t) { return new (t || NgbPanelHeader)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgbPanelHeader.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbPanelHeader, selectors: [[\"ng-template\", \"ngbPanelHeader\", \"\"]] });\nNgbPanelHeader.ctorParameters = () => [\n    { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPanelHeader, [{\n        type: Directive,\n        args: [{ selector: 'ng-template[ngbPanelHeader]' }]\n    }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\n/**\n * A directive that wraps only the panel title with HTML markup inside.\n *\n * You can also use [`NgbPanelHeader`](#/components/accordion/api#NgbPanelHeader) to customize the full panel header.\n */\nclass NgbPanelTitle {\n    constructor(templateRef) {\n        this.templateRef = templateRef;\n    }\n}\nNgbPanelTitle.ɵfac = function NgbPanelTitle_Factory(t) { return new (t || NgbPanelTitle)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgbPanelTitle.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbPanelTitle, selectors: [[\"ng-template\", \"ngbPanelTitle\", \"\"]] });\nNgbPanelTitle.ctorParameters = () => [\n    { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPanelTitle, [{\n        type: Directive,\n        args: [{ selector: 'ng-template[ngbPanelTitle]' }]\n    }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\n/**\n * A directive that wraps the accordion panel content.\n */\nclass NgbPanelContent {\n    constructor(templateRef) {\n        this.templateRef = templateRef;\n    }\n}\nNgbPanelContent.ɵfac = function NgbPanelContent_Factory(t) { return new (t || NgbPanelContent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgbPanelContent.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbPanelContent, selectors: [[\"ng-template\", \"ngbPanelContent\", \"\"]] });\nNgbPanelContent.ctorParameters = () => [\n    { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPanelContent, [{\n        type: Directive,\n        args: [{ selector: 'ng-template[ngbPanelContent]' }]\n    }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\n/**\n * A directive that wraps an individual accordion panel with title and collapsible content.\n */\nclass NgbPanel {\n    constructor() {\n        /**\n         *  If `true`, the panel is disabled an can't be toggled.\n         */\n        this.disabled = false;\n        /**\n         *  An optional id for the panel that must be unique on the page.\n         *\n         *  If not provided, it will be auto-generated in the `ngb-panel-xxx` format.\n         */\n        this.id = `ngb-panel-${nextId$4++}`;\n        this.isOpen = false;\n        /* A flag to specified that the transition panel classes have been initialized */\n        this.initClassDone = false;\n        /* A flag to specified if the panel is currently being animated, to ensure its presence in the dom */\n        this.transitionRunning = false;\n        /**\n         * An event emitted when the panel is shown, after the transition. It has no payload.\n         *\n         * @since 8.0.0\n         */\n        this.shown = new EventEmitter();\n        /**\n         * An event emitted when the panel is hidden, after the transition. It has no payload.\n         *\n         * @since 8.0.0\n         */\n        this.hidden = new EventEmitter();\n    }\n    ngAfterContentChecked() {\n        // We are using @ContentChildren instead of @ContentChild as in the Angular version being used\n        // only @ContentChildren allows us to specify the {descendants: false} option.\n        // Without {descendants: false} we are hitting bugs described in:\n        // https://github.com/ng-bootstrap/ng-bootstrap/issues/2240\n        this.titleTpl = this.titleTpls.first;\n        this.headerTpl = this.headerTpls.first;\n        this.contentTpl = this.contentTpls.first;\n    }\n}\nNgbPanel.ɵfac = function NgbPanel_Factory(t) { return new (t || NgbPanel)(); };\nNgbPanel.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbPanel, selectors: [[\"ngb-panel\"]], contentQueries: function NgbPanel_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbPanelTitle, 4);\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbPanelHeader, 4);\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbPanelContent, 4);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.titleTpls = _t);\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.headerTpls = _t);\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.contentTpls = _t);\n    } }, inputs: { disabled: \"disabled\", id: \"id\", title: \"title\", type: \"type\", cardClass: \"cardClass\" }, outputs: { shown: \"shown\", hidden: \"hidden\" } });\nNgbPanel.propDecorators = {\n    disabled: [{ type: Input }],\n    id: [{ type: Input }],\n    title: [{ type: Input }],\n    type: [{ type: Input }],\n    cardClass: [{ type: Input }],\n    shown: [{ type: Output }],\n    hidden: [{ type: Output }],\n    titleTpls: [{ type: ContentChildren, args: [NgbPanelTitle, { descendants: false },] }],\n    headerTpls: [{ type: ContentChildren, args: [NgbPanelHeader, { descendants: false },] }],\n    contentTpls: [{ type: ContentChildren, args: [NgbPanelContent, { descendants: false },] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPanel, [{\n        type: Directive,\n        args: [{ selector: 'ngb-panel' }]\n    }], function () { return []; }, { disabled: [{\n            type: Input\n        }], id: [{\n            type: Input\n        }], shown: [{\n            type: Output\n        }], hidden: [{\n            type: Output\n        }], title: [{\n            type: Input\n        }], type: [{\n            type: Input\n        }], cardClass: [{\n            type: Input\n        }], titleTpls: [{\n            type: ContentChildren,\n            args: [NgbPanelTitle, { descendants: false }]\n        }], headerTpls: [{\n            type: ContentChildren,\n            args: [NgbPanelHeader, { descendants: false }]\n        }], contentTpls: [{\n            type: ContentChildren,\n            args: [NgbPanelContent, { descendants: false }]\n        }] }); })();\n/**\n * Accordion is a collection of collapsible panels (bootstrap cards).\n *\n * It can ensure only one panel is opened at a time and allows to customize panel\n * headers.\n */\nclass NgbAccordion {\n    constructor(config, _element, _ngZone, _changeDetector) {\n        this._element = _element;\n        this._ngZone = _ngZone;\n        this._changeDetector = _changeDetector;\n        /**\n         * An array or comma separated strings of panel ids that should be opened **initially**.\n         *\n         * For subsequent changes use methods like `expand()`, `collapse()`, etc. and\n         * the `(panelChange)` event.\n         */\n        this.activeIds = [];\n        /**\n         * If `true`, panel content will be detached from DOM and not simply hidden when the panel is collapsed.\n         */\n        this.destroyOnHide = true;\n        /**\n         * Event emitted right before the panel toggle happens.\n         *\n         * See [NgbPanelChangeEvent](#/components/accordion/api#NgbPanelChangeEvent) for payload details.\n         */\n        this.panelChange = new EventEmitter();\n        /**\n         * An event emitted when the expanding animation is finished on the panel. The payload is the panel id.\n         *\n         * @since 8.0.0\n         */\n        this.shown = new EventEmitter();\n        /**\n         * An event emitted when the collapsing animation is finished on the panel, and before the panel element is removed.\n         * The payload is the panel id.\n         *\n         * @since 8.0.0\n         */\n        this.hidden = new EventEmitter();\n        this.animation = config.animation;\n        this.type = config.type;\n        this.closeOtherPanels = config.closeOthers;\n    }\n    /**\n     * Checks if a panel with a given id is expanded.\n     */\n    isExpanded(panelId) { return this.activeIds.indexOf(panelId) > -1; }\n    /**\n     * Expands a panel with a given id.\n     *\n     * Has no effect if the panel is already expanded or disabled.\n     */\n    expand(panelId) { this._changeOpenState(this._findPanelById(panelId), true); }\n    /**\n     * Expands all panels, if `[closeOthers]` is `false`.\n     *\n     * If `[closeOthers]` is `true`, it will expand the first panel, unless there is already a panel opened.\n     */\n    expandAll() {\n        if (this.closeOtherPanels) {\n            if (this.activeIds.length === 0 && this.panels.length) {\n                this._changeOpenState(this.panels.first, true);\n            }\n        }\n        else {\n            this.panels.forEach(panel => this._changeOpenState(panel, true));\n        }\n    }\n    /**\n     * Collapses a panel with the given id.\n     *\n     * Has no effect if the panel is already collapsed or disabled.\n     */\n    collapse(panelId) { this._changeOpenState(this._findPanelById(panelId), false); }\n    /**\n     * Collapses all opened panels.\n     */\n    collapseAll() {\n        this.panels.forEach((panel) => { this._changeOpenState(panel, false); });\n    }\n    /**\n     * Toggles a panel with the given id.\n     *\n     * Has no effect if the panel is disabled.\n     */\n    toggle(panelId) {\n        const panel = this._findPanelById(panelId);\n        if (panel) {\n            this._changeOpenState(panel, !panel.isOpen);\n        }\n    }\n    ngAfterContentChecked() {\n        // active id updates\n        if (isString(this.activeIds)) {\n            this.activeIds = this.activeIds.split(/\\s*,\\s*/);\n        }\n        // update panels open states\n        this.panels.forEach(panel => { panel.isOpen = !panel.disabled && this.activeIds.indexOf(panel.id) > -1; });\n        // closeOthers updates\n        if (this.activeIds.length > 1 && this.closeOtherPanels) {\n            this._closeOthers(this.activeIds[0], false);\n            this._updateActiveIds();\n        }\n        // Setup the initial classes here\n        this._ngZone.onStable.pipe(take(1)).subscribe(() => {\n            this.panels.forEach(panel => {\n                const panelElement = this._getPanelElement(panel.id);\n                if (panelElement) {\n                    if (!panel.initClassDone) {\n                        panel.initClassDone = true;\n                        ngbRunTransition(this._ngZone, panelElement, ngbCollapsingTransition, {\n                            animation: false,\n                            runningTransition: 'continue',\n                            context: { direction: panel.isOpen ? 'show' : 'hide' }\n                        });\n                    }\n                }\n                else {\n                    // Classes must be initialized next time it will be in the dom\n                    panel.initClassDone = false;\n                }\n            });\n        });\n    }\n    _changeOpenState(panel, nextState) {\n        if (panel != null && !panel.disabled && panel.isOpen !== nextState) {\n            let defaultPrevented = false;\n            this.panelChange.emit({ panelId: panel.id, nextState: nextState, preventDefault: () => { defaultPrevented = true; } });\n            if (!defaultPrevented) {\n                panel.isOpen = nextState;\n                panel.transitionRunning = true;\n                if (nextState && this.closeOtherPanels) {\n                    this._closeOthers(panel.id);\n                }\n                this._updateActiveIds();\n                this._runTransitions(this.animation);\n            }\n        }\n    }\n    _closeOthers(panelId, enableTransition = true) {\n        this.panels.forEach(panel => {\n            if (panel.id !== panelId && panel.isOpen) {\n                panel.isOpen = false;\n                panel.transitionRunning = enableTransition;\n            }\n        });\n    }\n    _findPanelById(panelId) { return this.panels.find(p => p.id === panelId) || null; }\n    _updateActiveIds() {\n        this.activeIds = this.panels.filter(panel => panel.isOpen && !panel.disabled).map(panel => panel.id);\n    }\n    _runTransitions(animation) {\n        // detectChanges is performed to ensure that all panels are in the dom (via transitionRunning = true)\n        // before starting the animation\n        this._changeDetector.detectChanges();\n        this.panels.forEach(panel => {\n            // When panel.transitionRunning is true, the transition needs to be started OR reversed,\n            // The direction (show or hide) is choosen by each panel.isOpen state\n            if (panel.transitionRunning) {\n                const panelElement = this._getPanelElement(panel.id);\n                ngbRunTransition(this._ngZone, panelElement, ngbCollapsingTransition, {\n                    animation,\n                    runningTransition: 'stop',\n                    context: { direction: panel.isOpen ? 'show' : 'hide' }\n                }).subscribe(() => {\n                    panel.transitionRunning = false;\n                    const { id } = panel;\n                    if (panel.isOpen) {\n                        panel.shown.emit();\n                        this.shown.emit(id);\n                    }\n                    else {\n                        panel.hidden.emit();\n                        this.hidden.emit(id);\n                    }\n                });\n            }\n        });\n    }\n    _getPanelElement(panelId) {\n        return this._element.nativeElement.querySelector('#' + panelId);\n    }\n}\nNgbAccordion.ɵfac = function NgbAccordion_Factory(t) { return new (t || NgbAccordion)(ɵngcc0.ɵɵdirectiveInject(NgbAccordionConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef)); };\nNgbAccordion.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbAccordion, selectors: [[\"ngb-accordion\"]], contentQueries: function NgbAccordion_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbPanel, 4);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.panels = _t);\n    } }, hostAttrs: [\"role\", \"tablist\", 1, \"accordion\"], hostVars: 1, hostBindings: function NgbAccordion_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"aria-multiselectable\", !ctx.closeOtherPanels);\n    } }, inputs: { activeIds: \"activeIds\", destroyOnHide: \"destroyOnHide\", animation: \"animation\", type: \"type\", closeOtherPanels: [\"closeOthers\", \"closeOtherPanels\"] }, outputs: { panelChange: \"panelChange\", shown: \"shown\", hidden: \"hidden\" }, exportAs: [\"ngbAccordion\"], decls: 3, vars: 1, consts: [[\"ngbPanelHeader\", \"\"], [\"t\", \"\"], [\"ngFor\", \"\", 3, \"ngForOf\"], [1, \"btn\", \"btn-link\", 3, \"ngbPanelToggle\"], [3, \"ngTemplateOutlet\"], [\"role\", \"tab\", 3, \"id\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [\"role\", \"tabpanel\", 3, \"id\", 4, \"ngIf\"], [\"role\", \"tabpanel\", 3, \"id\"], [1, \"card-body\"]], template: function NgbAccordion_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵtemplate(0, NgbAccordion_ng_template_0_Template, 3, 3, \"ng-template\", 0, 1, ɵngcc0.ɵɵtemplateRefExtractor);\n        ɵngcc0.ɵɵtemplate(2, NgbAccordion_ng_template_2_Template, 4, 11, \"ng-template\", 2);\n    } if (rf & 2) {\n        ɵngcc0.ɵɵadvance(2);\n        ɵngcc0.ɵɵproperty(\"ngForOf\", ctx.panels);\n    } }, directives: function () { return [NgbPanelHeader, ɵngcc1.NgForOf, NgbPanelToggle, ɵngcc1.NgTemplateOutlet, ɵngcc1.NgIf]; }, encapsulation: 2 });\nNgbAccordion.ctorParameters = () => [\n    { type: NgbAccordionConfig },\n    { type: ElementRef },\n    { type: NgZone },\n    { type: ChangeDetectorRef }\n];\nNgbAccordion.propDecorators = {\n    panels: [{ type: ContentChildren, args: [NgbPanel,] }],\n    animation: [{ type: Input }],\n    activeIds: [{ type: Input }],\n    closeOtherPanels: [{ type: Input, args: ['closeOthers',] }],\n    destroyOnHide: [{ type: Input }],\n    type: [{ type: Input }],\n    panelChange: [{ type: Output }],\n    shown: [{ type: Output }],\n    hidden: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbAccordion, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-accordion',\n                exportAs: 'ngbAccordion',\n                encapsulation: ViewEncapsulation.None,\n                host: { 'class': 'accordion', 'role': 'tablist', '[attr.aria-multiselectable]': '!closeOtherPanels' },\n                template: `\n    <ng-template #t ngbPanelHeader let-panel>\n      <button class=\"btn btn-link\" [ngbPanelToggle]=\"panel\">\n        {{panel.title}}<ng-template [ngTemplateOutlet]=\"panel.titleTpl?.templateRef\"></ng-template>\n      </button>\n    </ng-template>\n    <ng-template ngFor let-panel [ngForOf]=\"panels\">\n      <div [class]=\"'card ' + (panel.cardClass || '')\">\n        <div role=\"tab\" id=\"{{panel.id}}-header\" [class]=\"'card-header ' + (panel.type ? 'bg-'+panel.type: type ? 'bg-'+type : '')\">\n          <ng-template [ngTemplateOutlet]=\"panel.headerTpl?.templateRef || t\"\n                       [ngTemplateOutletContext]=\"{$implicit: panel, opened: panel.isOpen}\"></ng-template>\n        </div>\n        <div id=\"{{panel.id}}\" role=\"tabpanel\" [attr.aria-labelledby]=\"panel.id + '-header'\"\n             *ngIf=\"!destroyOnHide || panel.isOpen || panel.transitionRunning\">\n          <div class=\"card-body\">\n               <ng-template [ngTemplateOutlet]=\"panel.contentTpl?.templateRef || null\"></ng-template>\n          </div>\n        </div>\n      </div>\n    </ng-template>\n  `\n            }]\n    }], function () { return [{ type: NgbAccordionConfig }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.NgZone }, { type: ɵngcc0.ChangeDetectorRef }]; }, { activeIds: [{\n            type: Input\n        }], destroyOnHide: [{\n            type: Input\n        }], panelChange: [{\n            type: Output\n        }], shown: [{\n            type: Output\n        }], hidden: [{\n            type: Output\n        }], animation: [{\n            type: Input\n        }], type: [{\n            type: Input\n        }], closeOtherPanels: [{\n            type: Input,\n            args: ['closeOthers']\n        }], panels: [{\n            type: ContentChildren,\n            args: [NgbPanel]\n        }] }); })();\n/**\n * A directive to put on a button that toggles panel opening and closing.\n *\n * To be used inside the [`NgbPanelHeader`](#/components/accordion/api#NgbPanelHeader)\n *\n * @since 4.1.0\n */\nclass NgbPanelToggle {\n    constructor(accordion, panel) {\n        this.accordion = accordion;\n        this.panel = panel;\n    }\n    set ngbPanelToggle(panel) {\n        if (panel) {\n            this.panel = panel;\n        }\n    }\n}\nNgbPanelToggle.ɵfac = function NgbPanelToggle_Factory(t) { return new (t || NgbPanelToggle)(ɵngcc0.ɵɵdirectiveInject(NgbAccordion), ɵngcc0.ɵɵdirectiveInject(NgbPanel, 9)); };\nNgbPanelToggle.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbPanelToggle, selectors: [[\"button\", \"ngbPanelToggle\", \"\"]], hostAttrs: [\"type\", \"button\"], hostVars: 5, hostBindings: function NgbPanelToggle_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"click\", function NgbPanelToggle_click_HostBindingHandler() { return ctx.accordion.toggle(ctx.panel.id); });\n    } if (rf & 2) {\n        ɵngcc0.ɵɵhostProperty(\"disabled\", ctx.panel.disabled);\n        ɵngcc0.ɵɵattribute(\"aria-expanded\", ctx.panel.isOpen)(\"aria-controls\", ctx.panel.id);\n        ɵngcc0.ɵɵclassProp(\"collapsed\", !ctx.panel.isOpen);\n    } }, inputs: { ngbPanelToggle: \"ngbPanelToggle\" } });\nNgbPanelToggle.ctorParameters = () => [\n    { type: NgbAccordion },\n    { type: NgbPanel, decorators: [{ type: Optional }, { type: Host }] }\n];\nNgbPanelToggle.propDecorators = {\n    ngbPanelToggle: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPanelToggle, [{\n        type: Directive,\n        args: [{\n                selector: 'button[ngbPanelToggle]',\n                host: {\n                    'type': 'button',\n                    '[disabled]': 'panel.disabled',\n                    '[class.collapsed]': '!panel.isOpen',\n                    '[attr.aria-expanded]': 'panel.isOpen',\n                    '[attr.aria-controls]': 'panel.id',\n                    '(click)': 'accordion.toggle(panel.id)'\n                }\n            }]\n    }], function () { return [{ type: NgbAccordion }, { type: NgbPanel, decorators: [{\n                type: Optional\n            }, {\n                type: Host\n            }] }]; }, { ngbPanelToggle: [{\n            type: Input\n        }] }); })();\n\nconst NGB_ACCORDION_DIRECTIVES = [NgbAccordion, NgbPanel, NgbPanelTitle, NgbPanelContent, NgbPanelHeader, NgbPanelToggle];\nclass NgbAccordionModule {\n}\nNgbAccordionModule.ɵfac = function NgbAccordionModule_Factory(t) { return new (t || NgbAccordionModule)(); };\nNgbAccordionModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbAccordionModule });\nNgbAccordionModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [[CommonModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbAccordionModule, [{\n        type: NgModule,\n        args: [{ declarations: NGB_ACCORDION_DIRECTIVES, exports: NGB_ACCORDION_DIRECTIVES, imports: [CommonModule] }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbAccordionModule, { declarations: function () { return [NgbAccordion, NgbPanel, NgbPanelTitle, NgbPanelContent, NgbPanelHeader, NgbPanelToggle]; }, imports: function () { return [CommonModule]; }, exports: function () { return [NgbAccordion, NgbPanel, NgbPanelTitle, NgbPanelContent, NgbPanelHeader, NgbPanelToggle]; } }); })();\n\n/**\n * A configuration service for the [NgbAlert](#/components/alert/api#NgbAlert) component.\n *\n * You can inject this service, typically in your root component, and customize its properties\n * to provide default values for all alerts used in the application.\n */\nclass NgbAlertConfig {\n    constructor(_ngbConfig) {\n        this._ngbConfig = _ngbConfig;\n        this.dismissible = true;\n        this.type = 'warning';\n    }\n    get animation() { return (this._animation === undefined) ? this._ngbConfig.animation : this._animation; }\n    set animation(animation) { this._animation = animation; }\n}\nNgbAlertConfig.ɵfac = function NgbAlertConfig_Factory(t) { return new (t || NgbAlertConfig)(ɵngcc0.ɵɵinject(NgbConfig)); };\nNgbAlertConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbAlertConfig_Factory() { return new NgbAlertConfig(i0.ɵɵinject(NgbConfig)); }, token: NgbAlertConfig, providedIn: \"root\" });\nNgbAlertConfig.ctorParameters = () => [\n    { type: NgbConfig }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbAlertConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return [{ type: NgbConfig }]; }, null); })();\n\nconst ngbAlertFadingTransition = ({ classList }) => {\n    classList.remove('show');\n};\n\n/**\n * Alert is a component to provide contextual feedback messages for user.\n *\n * It supports several alert types and can be dismissed.\n */\nclass NgbAlert {\n    constructor(config, _renderer, _element, _zone) {\n        this._renderer = _renderer;\n        this._element = _element;\n        this._zone = _zone;\n        /**\n         * An event emitted when the close button is clicked. It has no payload and only relevant for dismissible alerts.\n         *\n         * @since 8.0.0\n         */\n        this.closed = new EventEmitter();\n        this.dismissible = config.dismissible;\n        this.type = config.type;\n        this.animation = config.animation;\n    }\n    /**\n     * Triggers alert closing programmatically (same as clicking on the close button (×)).\n     *\n     * The returned observable will emit and be completed once the closing transition has finished.\n     * If the animations are turned off this happens synchronously.\n     *\n     * Alternatively you could listen or subscribe to the `(closed)` output\n     *\n     * @since 8.0.0\n     */\n    close() {\n        const transition = ngbRunTransition(this._zone, this._element.nativeElement, ngbAlertFadingTransition, { animation: this.animation, runningTransition: 'continue' });\n        transition.subscribe(() => this.closed.emit());\n        return transition;\n    }\n    ngOnChanges(changes) {\n        const typeChange = changes['type'];\n        if (typeChange && !typeChange.firstChange) {\n            this._renderer.removeClass(this._element.nativeElement, `alert-${typeChange.previousValue}`);\n            this._renderer.addClass(this._element.nativeElement, `alert-${typeChange.currentValue}`);\n        }\n    }\n    ngOnInit() { this._renderer.addClass(this._element.nativeElement, `alert-${this.type}`); }\n}\nNgbAlert.ɵfac = function NgbAlert_Factory(t) { return new (t || NgbAlert)(ɵngcc0.ɵɵdirectiveInject(NgbAlertConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone)); };\nNgbAlert.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbAlert, selectors: [[\"ngb-alert\"]], hostAttrs: [\"role\", \"alert\", 1, \"alert\", \"show\"], hostVars: 4, hostBindings: function NgbAlert_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵclassProp(\"fade\", ctx.animation)(\"alert-dismissible\", ctx.dismissible);\n    } }, inputs: { dismissible: \"dismissible\", type: \"type\", animation: \"animation\" }, outputs: { closed: \"closed\" }, exportAs: [\"ngbAlert\"], features: [ɵngcc0.ɵɵNgOnChangesFeature], ngContentSelectors: _c3, decls: 2, vars: 1, consts: function () { let i18n_1; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_alert_close$$FESM2015_NG_BOOTSTRAP_JS_2 = goog.getMsg(\"Close\");\n        i18n_1 = MSG_EXTERNAL_ngb_alert_close$$FESM2015_NG_BOOTSTRAP_JS_2;\n    }\n    else {\n        i18n_1 = $localize `:@@ngb.alert.close␟f4e529ae5ffd73001d1ff4bbdeeb0a72e342e5c8␟7819314041543176992:Close`;\n    } return [[\"type\", \"button\", \"class\", \"close\", \"aria-label\", i18n_1, 3, \"click\", 4, \"ngIf\"], [\"type\", \"button\", \"aria-label\", i18n_1, 1, \"close\", 3, \"click\"], [\"aria-hidden\", \"true\"]]; }, template: function NgbAlert_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵprojectionDef();\n        ɵngcc0.ɵɵprojection(0);\n        ɵngcc0.ɵɵtemplate(1, NgbAlert_button_1_Template, 3, 0, \"button\", 0);\n    } if (rf & 2) {\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.dismissible);\n    } }, directives: [ɵngcc1.NgIf], styles: [\"ngb-alert{display:block}\"], encapsulation: 2, changeDetection: 0 });\nNgbAlert.ctorParameters = () => [\n    { type: NgbAlertConfig },\n    { type: Renderer2 },\n    { type: ElementRef },\n    { type: NgZone }\n];\nNgbAlert.propDecorators = {\n    animation: [{ type: Input }],\n    dismissible: [{ type: Input }],\n    type: [{ type: Input }],\n    closed: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbAlert, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-alert',\n                exportAs: 'ngbAlert',\n                changeDetection: ChangeDetectionStrategy.OnPush,\n                encapsulation: ViewEncapsulation.None,\n                host: { 'role': 'alert', 'class': 'alert show', '[class.fade]': 'animation', '[class.alert-dismissible]': 'dismissible' },\n                template: `\n    <ng-content></ng-content>\n    <button *ngIf=\"dismissible\" type=\"button\" class=\"close\" aria-label=\"Close\" i18n-aria-label=\"@@ngb.alert.close\"\n      (click)=\"close()\">\n      <span aria-hidden=\"true\">&times;</span>\n    </button>\n    `,\n                styles: [\"ngb-alert{display:block}\"]\n            }]\n    }], function () { return [{ type: NgbAlertConfig }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.NgZone }]; }, { closed: [{\n            type: Output\n        }], dismissible: [{\n            type: Input\n        }], type: [{\n            type: Input\n        }], animation: [{\n            type: Input\n        }] }); })();\n\nclass NgbAlertModule {\n}\nNgbAlertModule.ɵfac = function NgbAlertModule_Factory(t) { return new (t || NgbAlertModule)(); };\nNgbAlertModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbAlertModule });\nNgbAlertModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [[CommonModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbAlertModule, [{\n        type: NgModule,\n        args: [{ declarations: [NgbAlert], exports: [NgbAlert], imports: [CommonModule], entryComponents: [NgbAlert] }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbAlertModule, { declarations: function () { return [NgbAlert]; }, imports: function () { return [CommonModule]; }, exports: function () { return [NgbAlert]; } }); })();\n\nclass NgbButtonLabel {\n}\nNgbButtonLabel.ɵfac = function NgbButtonLabel_Factory(t) { return new (t || NgbButtonLabel)(); };\nNgbButtonLabel.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbButtonLabel, selectors: [[\"\", \"ngbButtonLabel\", \"\"]], hostVars: 8, hostBindings: function NgbButtonLabel_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵclassProp(\"btn\", true)(\"active\", ctx.active)(\"disabled\", ctx.disabled)(\"focus\", ctx.focused);\n    } } });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbButtonLabel, [{\n        type: Directive,\n        args: [{\n                selector: '[ngbButtonLabel]',\n                host: { '[class.btn]': 'true', '[class.active]': 'active', '[class.disabled]': 'disabled', '[class.focus]': 'focused' }\n            }]\n    }], null, null); })();\n\n/**\n * Allows to easily create Bootstrap-style checkbox buttons.\n *\n * Integrates with forms, so the value of a checked button is bound to the underlying form control\n * either in a reactive or template-driven way.\n */\nclass NgbCheckBox {\n    constructor(_label, _cd) {\n        this._label = _label;\n        this._cd = _cd;\n        /**\n         * If `true`, the checkbox button will be disabled\n         */\n        this.disabled = false;\n        /**\n         * The form control value when the checkbox is checked.\n         */\n        this.valueChecked = true;\n        /**\n         * The form control value when the checkbox is unchecked.\n         */\n        this.valueUnChecked = false;\n        this.onChange = (_) => { };\n        this.onTouched = () => { };\n    }\n    set focused(isFocused) {\n        this._label.focused = isFocused;\n        if (!isFocused) {\n            this.onTouched();\n        }\n    }\n    onInputChange($event) {\n        const modelToPropagate = $event.target.checked ? this.valueChecked : this.valueUnChecked;\n        this.onChange(modelToPropagate);\n        this.onTouched();\n        this.writeValue(modelToPropagate);\n    }\n    registerOnChange(fn) { this.onChange = fn; }\n    registerOnTouched(fn) { this.onTouched = fn; }\n    setDisabledState(isDisabled) {\n        this.disabled = isDisabled;\n        this._label.disabled = isDisabled;\n    }\n    writeValue(value) {\n        this.checked = value === this.valueChecked;\n        this._label.active = this.checked;\n        // label won't be updated, if it is inside the OnPush component when [ngModel] changes\n        this._cd.markForCheck();\n    }\n}\nNgbCheckBox.ɵfac = function NgbCheckBox_Factory(t) { return new (t || NgbCheckBox)(ɵngcc0.ɵɵdirectiveInject(NgbButtonLabel), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef)); };\nNgbCheckBox.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbCheckBox, selectors: [[\"\", \"ngbButton\", \"\", \"type\", \"checkbox\"]], hostVars: 2, hostBindings: function NgbCheckBox_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"change\", function NgbCheckBox_change_HostBindingHandler($event) { return ctx.onInputChange($event); })(\"focus\", function NgbCheckBox_focus_HostBindingHandler() { return ctx.focused = true; })(\"blur\", function NgbCheckBox_blur_HostBindingHandler() { return ctx.focused = false; });\n    } if (rf & 2) {\n        ɵngcc0.ɵɵhostProperty(\"checked\", ctx.checked)(\"disabled\", ctx.disabled);\n    } }, inputs: { disabled: \"disabled\", valueChecked: \"valueChecked\", valueUnChecked: \"valueUnChecked\" }, features: [ɵngcc0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbCheckBox), multi: true }])] });\nNgbCheckBox.ctorParameters = () => [\n    { type: NgbButtonLabel },\n    { type: ChangeDetectorRef }\n];\nNgbCheckBox.propDecorators = {\n    disabled: [{ type: Input }],\n    valueChecked: [{ type: Input }],\n    valueUnChecked: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbCheckBox, [{\n        type: Directive,\n        args: [{\n                selector: '[ngbButton][type=checkbox]',\n                host: {\n                    '[checked]': 'checked',\n                    '[disabled]': 'disabled',\n                    '(change)': 'onInputChange($event)',\n                    '(focus)': 'focused = true',\n                    '(blur)': 'focused = false'\n                },\n                providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbCheckBox), multi: true }]\n            }]\n    }], function () { return [{ type: NgbButtonLabel }, { type: ɵngcc0.ChangeDetectorRef }]; }, { disabled: [{\n            type: Input\n        }], valueChecked: [{\n            type: Input\n        }], valueUnChecked: [{\n            type: Input\n        }] }); })();\n\nlet nextId$3 = 0;\n/**\n * Allows to easily create Bootstrap-style radio buttons.\n *\n * Integrates with forms, so the value of a checked button is bound to the underlying form control\n * either in a reactive or template-driven way.\n */\nclass NgbRadioGroup {\n    constructor() {\n        this._radios = new Set();\n        this._value = null;\n        /**\n         * Name of the radio group applied to radio input elements.\n         *\n         * Will be applied to all radio input elements inside the group,\n         * unless [`NgbRadio`](#/components/buttons/api#NgbRadio)'s specify names themselves.\n         *\n         * If not provided, will be generated in the `ngb-radio-xx` format.\n         */\n        this.name = `ngb-radio-${nextId$3++}`;\n        this.onChange = (_) => { };\n        this.onTouched = () => { };\n    }\n    get disabled() { return this._disabled; }\n    set disabled(isDisabled) { this.setDisabledState(isDisabled); }\n    onRadioChange(radio) {\n        this.writeValue(radio.value);\n        this.onChange(radio.value);\n    }\n    onRadioValueUpdate() { this._updateRadiosValue(); }\n    register(radio) { this._radios.add(radio); }\n    registerOnChange(fn) { this.onChange = fn; }\n    registerOnTouched(fn) { this.onTouched = fn; }\n    setDisabledState(isDisabled) {\n        this._disabled = isDisabled;\n        this._updateRadiosDisabled();\n    }\n    unregister(radio) { this._radios.delete(radio); }\n    writeValue(value) {\n        this._value = value;\n        this._updateRadiosValue();\n    }\n    _updateRadiosValue() { this._radios.forEach((radio) => radio.updateValue(this._value)); }\n    _updateRadiosDisabled() { this._radios.forEach((radio) => radio.updateDisabled()); }\n}\nNgbRadioGroup.ɵfac = function NgbRadioGroup_Factory(t) { return new (t || NgbRadioGroup)(); };\nNgbRadioGroup.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbRadioGroup, selectors: [[\"\", \"ngbRadioGroup\", \"\"]], hostAttrs: [\"role\", \"radiogroup\"], inputs: { name: \"name\" }, features: [ɵngcc0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbRadioGroup), multi: true }])] });\nNgbRadioGroup.propDecorators = {\n    name: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbRadioGroup, [{\n        type: Directive,\n        args: [{\n                selector: '[ngbRadioGroup]',\n                host: { 'role': 'radiogroup' },\n                providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbRadioGroup), multi: true }]\n            }]\n    }], function () { return []; }, { name: [{\n            type: Input\n        }] }); })();\n/**\n * A directive that marks an input of type \"radio\" as a part of the\n * [`NgbRadioGroup`](#/components/buttons/api#NgbRadioGroup).\n */\nclass NgbRadio {\n    constructor(_group, _label, _renderer, _element, _cd) {\n        this._group = _group;\n        this._label = _label;\n        this._renderer = _renderer;\n        this._element = _element;\n        this._cd = _cd;\n        this._value = null;\n        this._group.register(this);\n        this.updateDisabled();\n    }\n    /**\n     * The form control value when current radio button is checked.\n     */\n    set value(value) {\n        this._value = value;\n        const stringValue = value ? value.toString() : '';\n        this._renderer.setProperty(this._element.nativeElement, 'value', stringValue);\n        this._group.onRadioValueUpdate();\n    }\n    /**\n     * If `true`, current radio button will be disabled.\n     */\n    set disabled(isDisabled) {\n        this._disabled = isDisabled !== false;\n        this.updateDisabled();\n    }\n    set focused(isFocused) {\n        if (this._label) {\n            this._label.focused = isFocused;\n        }\n        if (!isFocused) {\n            this._group.onTouched();\n        }\n    }\n    get checked() { return this._checked; }\n    get disabled() { return this._group.disabled || this._disabled; }\n    get value() { return this._value; }\n    get nameAttr() { return this.name || this._group.name; }\n    ngOnDestroy() { this._group.unregister(this); }\n    onChange() { this._group.onRadioChange(this); }\n    updateValue(value) {\n        // label won't be updated, if it is inside the OnPush component when [ngModel] changes\n        if (this.value !== value) {\n            this._cd.markForCheck();\n        }\n        this._checked = this.value === value;\n        this._label.active = this._checked;\n    }\n    updateDisabled() { this._label.disabled = this.disabled; }\n}\nNgbRadio.ɵfac = function NgbRadio_Factory(t) { return new (t || NgbRadio)(ɵngcc0.ɵɵdirectiveInject(NgbRadioGroup), ɵngcc0.ɵɵdirectiveInject(NgbButtonLabel), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef)); };\nNgbRadio.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbRadio, selectors: [[\"\", \"ngbButton\", \"\", \"type\", \"radio\"]], hostVars: 3, hostBindings: function NgbRadio_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"change\", function NgbRadio_change_HostBindingHandler() { return ctx.onChange(); })(\"focus\", function NgbRadio_focus_HostBindingHandler() { return ctx.focused = true; })(\"blur\", function NgbRadio_blur_HostBindingHandler() { return ctx.focused = false; });\n    } if (rf & 2) {\n        ɵngcc0.ɵɵhostProperty(\"checked\", ctx.checked)(\"disabled\", ctx.disabled)(\"name\", ctx.nameAttr);\n    } }, inputs: { value: \"value\", disabled: \"disabled\", name: \"name\" } });\nNgbRadio.ctorParameters = () => [\n    { type: NgbRadioGroup },\n    { type: NgbButtonLabel },\n    { type: Renderer2 },\n    { type: ElementRef },\n    { type: ChangeDetectorRef }\n];\nNgbRadio.propDecorators = {\n    name: [{ type: Input }],\n    value: [{ type: Input, args: ['value',] }],\n    disabled: [{ type: Input, args: ['disabled',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbRadio, [{\n        type: Directive,\n        args: [{\n                selector: '[ngbButton][type=radio]',\n                host: {\n                    '[checked]': 'checked',\n                    '[disabled]': 'disabled',\n                    '[name]': 'nameAttr',\n                    '(change)': 'onChange()',\n                    '(focus)': 'focused = true',\n                    '(blur)': 'focused = false'\n                }\n            }]\n    }], function () { return [{ type: NgbRadioGroup }, { type: NgbButtonLabel }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.ChangeDetectorRef }]; }, { value: [{\n            type: Input,\n            args: ['value']\n        }], disabled: [{\n            type: Input,\n            args: ['disabled']\n        }], name: [{\n            type: Input\n        }] }); })();\n\nconst NGB_BUTTON_DIRECTIVES = [NgbButtonLabel, NgbCheckBox, NgbRadioGroup, NgbRadio];\nclass NgbButtonsModule {\n}\nNgbButtonsModule.ɵfac = function NgbButtonsModule_Factory(t) { return new (t || NgbButtonsModule)(); };\nNgbButtonsModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbButtonsModule });\nNgbButtonsModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({});\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbButtonsModule, [{\n        type: NgModule,\n        args: [{ declarations: NGB_BUTTON_DIRECTIVES, exports: NGB_BUTTON_DIRECTIVES }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbButtonsModule, { declarations: [NgbButtonLabel, NgbCheckBox, NgbRadioGroup, NgbRadio], exports: [NgbButtonLabel, NgbCheckBox, NgbRadioGroup, NgbRadio] }); })();\n\n/**\n * A configuration service for the [NgbCarousel](#/components/carousel/api#NgbCarousel) component.\n *\n * You can inject this service, typically in your root component, and customize its properties\n * to provide default values for all carousels used in the application.\n */\nclass NgbCarouselConfig {\n    constructor(_ngbConfig) {\n        this._ngbConfig = _ngbConfig;\n        this.interval = 5000;\n        this.wrap = true;\n        this.keyboard = true;\n        this.pauseOnHover = true;\n        this.pauseOnFocus = true;\n        this.showNavigationArrows = true;\n        this.showNavigationIndicators = true;\n    }\n    get animation() { return (this._animation === undefined) ? this._ngbConfig.animation : this._animation; }\n    set animation(animation) { this._animation = animation; }\n}\nNgbCarouselConfig.ɵfac = function NgbCarouselConfig_Factory(t) { return new (t || NgbCarouselConfig)(ɵngcc0.ɵɵinject(NgbConfig)); };\nNgbCarouselConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbCarouselConfig_Factory() { return new NgbCarouselConfig(i0.ɵɵinject(NgbConfig)); }, token: NgbCarouselConfig, providedIn: \"root\" });\nNgbCarouselConfig.ctorParameters = () => [\n    { type: NgbConfig }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbCarouselConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return [{ type: NgbConfig }]; }, null); })();\n\n/**\n * Defines the carousel slide transition direction.\n */\nvar NgbSlideEventDirection;\n(function (NgbSlideEventDirection) {\n    NgbSlideEventDirection[\"LEFT\"] = \"left\";\n    NgbSlideEventDirection[\"RIGHT\"] = \"right\";\n})(NgbSlideEventDirection || (NgbSlideEventDirection = {}));\nconst isBeingAnimated = ({ classList }) => {\n    return classList.contains('carousel-item-left') || classList.contains('carousel-item-right');\n};\nconst ɵ0$4 = isBeingAnimated;\nconst removeDirectionClasses = (classList) => {\n    classList.remove('carousel-item-left');\n    classList.remove('carousel-item-right');\n};\nconst ɵ1$1 = removeDirectionClasses;\nconst removeClasses = (classList) => {\n    removeDirectionClasses(classList);\n    classList.remove('carousel-item-prev');\n    classList.remove('carousel-item-next');\n};\nconst ɵ2$1 = removeClasses;\nconst ngbCarouselTransitionIn = (element, animation, { direction }) => {\n    const { classList } = element;\n    if (!animation) {\n        removeDirectionClasses(classList);\n        removeClasses(classList);\n        classList.add('active');\n        return;\n    }\n    if (isBeingAnimated(element)) {\n        // Revert the transition\n        removeDirectionClasses(classList);\n    }\n    else {\n        // For the 'in' transition, a 'pre-class' is applied to the element to ensure its visibility\n        classList.add('carousel-item-' + (direction === NgbSlideEventDirection.LEFT ? 'next' : 'prev'));\n        reflow(element);\n        classList.add('carousel-item-' + direction);\n    }\n    return () => {\n        removeClasses(classList);\n        classList.add('active');\n    };\n};\nconst ngbCarouselTransitionOut = (element, animation, { direction }) => {\n    const { classList } = element;\n    if (!animation) {\n        removeDirectionClasses(classList);\n        removeClasses(classList);\n        classList.remove('active');\n        return;\n    }\n    //  direction is left or right, depending on the way the slide goes out.\n    if (isBeingAnimated(element)) {\n        // Revert the transition\n        removeDirectionClasses(classList);\n    }\n    else {\n        classList.add('carousel-item-' + direction);\n    }\n    return () => {\n        removeClasses(classList);\n        classList.remove('active');\n    };\n};\n\nlet nextId$2 = 0;\n/**\n * A directive that wraps the individual carousel slide.\n */\nclass NgbSlide {\n    constructor(tplRef) {\n        this.tplRef = tplRef;\n        /**\n         * Slide id that must be unique for the entire document.\n         *\n         * If not provided, will be generated in the `ngb-slide-xx` format.\n         */\n        this.id = `ngb-slide-${nextId$2++}`;\n        /**\n         * An event emitted when the slide transition is finished\n         *\n         * @since 8.0.0\n         */\n        this.slid = new EventEmitter();\n    }\n}\nNgbSlide.ɵfac = function NgbSlide_Factory(t) { return new (t || NgbSlide)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgbSlide.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbSlide, selectors: [[\"ng-template\", \"ngbSlide\", \"\"]], inputs: { id: \"id\" }, outputs: { slid: \"slid\" } });\nNgbSlide.ctorParameters = () => [\n    { type: TemplateRef }\n];\nNgbSlide.propDecorators = {\n    id: [{ type: Input }],\n    slid: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbSlide, [{\n        type: Directive,\n        args: [{ selector: 'ng-template[ngbSlide]' }]\n    }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, { id: [{\n            type: Input\n        }], slid: [{\n            type: Output\n        }] }); })();\n/**\n * Carousel is a component to easily create and control slideshows.\n *\n * Allows to set intervals, change the way user interacts with the slides and provides a programmatic API.\n */\nclass NgbCarousel {\n    constructor(config, _platformId, _ngZone, _cd, _container) {\n        this._platformId = _platformId;\n        this._ngZone = _ngZone;\n        this._cd = _cd;\n        this._container = _container;\n        this.NgbSlideEventSource = NgbSlideEventSource;\n        this._destroy$ = new Subject();\n        this._interval$ = new BehaviorSubject(0);\n        this._mouseHover$ = new BehaviorSubject(false);\n        this._focused$ = new BehaviorSubject(false);\n        this._pauseOnHover$ = new BehaviorSubject(false);\n        this._pauseOnFocus$ = new BehaviorSubject(false);\n        this._pause$ = new BehaviorSubject(false);\n        this._wrap$ = new BehaviorSubject(false);\n        /**\n         * An event emitted just before the slide transition starts.\n         *\n         * See [`NgbSlideEvent`](#/components/carousel/api#NgbSlideEvent) for payload details.\n         */\n        this.slide = new EventEmitter();\n        /**\n         * An event emitted right after the slide transition is completed.\n         *\n         * See [`NgbSlideEvent`](#/components/carousel/api#NgbSlideEvent) for payload details.\n         *\n         * @since 8.0.0\n         */\n        this.slid = new EventEmitter();\n        /*\n         * Keep the ids of the panels currently transitionning\n         * in order to allow only the transition revertion\n         */\n        this._transitionIds = null;\n        this.animation = config.animation;\n        this.interval = config.interval;\n        this.wrap = config.wrap;\n        this.keyboard = config.keyboard;\n        this.pauseOnHover = config.pauseOnHover;\n        this.pauseOnFocus = config.pauseOnFocus;\n        this.showNavigationArrows = config.showNavigationArrows;\n        this.showNavigationIndicators = config.showNavigationIndicators;\n    }\n    /**\n     * Time in milliseconds before the next slide is shown.\n     */\n    set interval(value) {\n        this._interval$.next(value);\n    }\n    get interval() { return this._interval$.value; }\n    /**\n     * If `true`, will 'wrap' the carousel by switching from the last slide back to the first.\n     */\n    set wrap(value) {\n        this._wrap$.next(value);\n    }\n    get wrap() { return this._wrap$.value; }\n    /**\n     * If `true`, will pause slide switching when mouse cursor hovers the slide.\n     *\n     * @since 2.2.0\n     */\n    set pauseOnHover(value) {\n        this._pauseOnHover$.next(value);\n    }\n    get pauseOnHover() { return this._pauseOnHover$.value; }\n    /**\n     * If `true`, will pause slide switching when the focus is inside the carousel.\n     */\n    set pauseOnFocus(value) {\n        this._pauseOnFocus$.next(value);\n    }\n    get pauseOnFocus() { return this._pauseOnFocus$.value; }\n    set mouseHover(value) { this._mouseHover$.next(value); }\n    get mouseHover() { return this._mouseHover$.value; }\n    set focused(value) { this._focused$.next(value); }\n    get focused() { return this._focused$.value; }\n    arrowLeft() {\n        this.focus();\n        this.prev(NgbSlideEventSource.ARROW_LEFT);\n    }\n    arrowRight() {\n        this.focus();\n        this.next(NgbSlideEventSource.ARROW_RIGHT);\n    }\n    ngAfterContentInit() {\n        // setInterval() doesn't play well with SSR and protractor,\n        // so we should run it in the browser and outside Angular\n        if (isPlatformBrowser(this._platformId)) {\n            this._ngZone.runOutsideAngular(() => {\n                const hasNextSlide$ = combineLatest([\n                    this.slide.pipe(map(slideEvent => slideEvent.current), startWith(this.activeId)),\n                    this._wrap$, this.slides.changes.pipe(startWith(null))\n                ])\n                    .pipe(map(([currentSlideId, wrap]) => {\n                    const slideArr = this.slides.toArray();\n                    const currentSlideIdx = this._getSlideIdxById(currentSlideId);\n                    return wrap ? slideArr.length > 1 : currentSlideIdx < slideArr.length - 1;\n                }), distinctUntilChanged());\n                combineLatest([\n                    this._pause$, this._pauseOnHover$, this._mouseHover$, this._pauseOnFocus$, this._focused$, this._interval$,\n                    hasNextSlide$\n                ])\n                    .pipe(map(([pause, pauseOnHover, mouseHover, pauseOnFocus, focused, interval, hasNextSlide]) => ((pause || (pauseOnHover && mouseHover) || (pauseOnFocus && focused) || !hasNextSlide) ?\n                    0 :\n                    interval)), distinctUntilChanged(), switchMap(interval => interval > 0 ? timer(interval, interval) : NEVER), takeUntil(this._destroy$))\n                    .subscribe(() => this._ngZone.run(() => this.next(NgbSlideEventSource.TIMER)));\n            });\n        }\n        this.slides.changes.pipe(takeUntil(this._destroy$)).subscribe(() => {\n            var _a;\n            (_a = this._transitionIds) === null || _a === void 0 ? void 0 : _a.forEach(id => ngbCompleteTransition(this._getSlideElement(id)));\n            this._transitionIds = null;\n            this._cd.markForCheck();\n            // The following code need to be done asynchronously, after the dom becomes stable,\n            // otherwise all changes will be undone.\n            this._ngZone.onStable.pipe(take(1)).subscribe(() => {\n                for (const { id } of this.slides) {\n                    const element = this._getSlideElement(id);\n                    if (id === this.activeId) {\n                        element.classList.add('active');\n                    }\n                    else {\n                        element.classList.remove('active');\n                    }\n                }\n            });\n        });\n    }\n    ngAfterContentChecked() {\n        let activeSlide = this._getSlideById(this.activeId);\n        this.activeId = activeSlide ? activeSlide.id : (this.slides.length ? this.slides.first.id : '');\n    }\n    ngAfterViewInit() {\n        // Initialize the 'active' class (not managed by the template)\n        if (this.activeId) {\n            const element = this._getSlideElement(this.activeId);\n            if (element) {\n                element.classList.add('active');\n            }\n        }\n    }\n    ngOnDestroy() { this._destroy$.next(); }\n    /**\n     * Navigates to a slide with the specified identifier.\n     */\n    select(slideId, source) {\n        this._cycleToSelected(slideId, this._getSlideEventDirection(this.activeId, slideId), source);\n    }\n    /**\n     * Navigates to the previous slide.\n     */\n    prev(source) {\n        this._cycleToSelected(this._getPrevSlide(this.activeId), NgbSlideEventDirection.RIGHT, source);\n    }\n    /**\n     * Navigates to the next slide.\n     */\n    next(source) {\n        this._cycleToSelected(this._getNextSlide(this.activeId), NgbSlideEventDirection.LEFT, source);\n    }\n    /**\n     * Pauses cycling through the slides.\n     */\n    pause() { this._pause$.next(true); }\n    /**\n     * Restarts cycling through the slides from left to right.\n     */\n    cycle() { this._pause$.next(false); }\n    /**\n     * Set the focus on the carousel.\n     */\n    focus() { this._container.nativeElement.focus(); }\n    _cycleToSelected(slideIdx, direction, source) {\n        const transitionIds = this._transitionIds;\n        if (transitionIds && (transitionIds[0] !== slideIdx || transitionIds[1] !== this.activeId)) {\n            // Revert prevented\n            return;\n        }\n        let selectedSlide = this._getSlideById(slideIdx);\n        if (selectedSlide && selectedSlide.id !== this.activeId) {\n            this._transitionIds = [this.activeId, slideIdx];\n            this.slide.emit({ prev: this.activeId, current: selectedSlide.id, direction: direction, paused: this._pause$.value, source });\n            const options = {\n                animation: this.animation,\n                runningTransition: 'stop',\n                context: { direction },\n            };\n            const transitions = [];\n            const activeSlide = this._getSlideById(this.activeId);\n            if (activeSlide) {\n                const activeSlideTransition = ngbRunTransition(this._ngZone, this._getSlideElement(activeSlide.id), ngbCarouselTransitionOut, options);\n                activeSlideTransition.subscribe(() => { activeSlide.slid.emit({ isShown: false, direction, source }); });\n                transitions.push(activeSlideTransition);\n            }\n            const previousId = this.activeId;\n            this.activeId = selectedSlide.id;\n            const nextSlide = this._getSlideById(this.activeId);\n            const transition = ngbRunTransition(this._ngZone, this._getSlideElement(selectedSlide.id), ngbCarouselTransitionIn, options);\n            transition.subscribe(() => { nextSlide === null || nextSlide === void 0 ? void 0 : nextSlide.slid.emit({ isShown: true, direction, source }); });\n            transitions.push(transition);\n            zip(...transitions).pipe(take(1)).subscribe(() => {\n                this._transitionIds = null;\n                this.slid.emit({ prev: previousId, current: selectedSlide.id, direction: direction, paused: this._pause$.value, source });\n            });\n        }\n        // we get here after the interval fires or any external API call like next(), prev() or select()\n        this._cd.markForCheck();\n    }\n    _getSlideEventDirection(currentActiveSlideId, nextActiveSlideId) {\n        const currentActiveSlideIdx = this._getSlideIdxById(currentActiveSlideId);\n        const nextActiveSlideIdx = this._getSlideIdxById(nextActiveSlideId);\n        return currentActiveSlideIdx > nextActiveSlideIdx ? NgbSlideEventDirection.RIGHT : NgbSlideEventDirection.LEFT;\n    }\n    _getSlideById(slideId) {\n        return this.slides.find(slide => slide.id === slideId) || null;\n    }\n    _getSlideIdxById(slideId) {\n        const slide = this._getSlideById(slideId);\n        return slide != null ? this.slides.toArray().indexOf(slide) : -1;\n    }\n    _getNextSlide(currentSlideId) {\n        const slideArr = this.slides.toArray();\n        const currentSlideIdx = this._getSlideIdxById(currentSlideId);\n        const isLastSlide = currentSlideIdx === slideArr.length - 1;\n        return isLastSlide ? (this.wrap ? slideArr[0].id : slideArr[slideArr.length - 1].id) :\n            slideArr[currentSlideIdx + 1].id;\n    }\n    _getPrevSlide(currentSlideId) {\n        const slideArr = this.slides.toArray();\n        const currentSlideIdx = this._getSlideIdxById(currentSlideId);\n        const isFirstSlide = currentSlideIdx === 0;\n        return isFirstSlide ? (this.wrap ? slideArr[slideArr.length - 1].id : slideArr[0].id) :\n            slideArr[currentSlideIdx - 1].id;\n    }\n    _getSlideElement(slideId) {\n        return this._container.nativeElement.querySelector(`#slide-${slideId}`);\n    }\n}\nNgbCarousel.ɵfac = function NgbCarousel_Factory(t) { return new (t || NgbCarousel)(ɵngcc0.ɵɵdirectiveInject(NgbCarouselConfig), ɵngcc0.ɵɵdirectiveInject(PLATFORM_ID), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nNgbCarousel.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbCarousel, selectors: [[\"ngb-carousel\"]], contentQueries: function NgbCarousel_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbSlide, 4);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.slides = _t);\n    } }, hostAttrs: [\"tabIndex\", \"0\", 1, \"carousel\", \"slide\"], hostVars: 3, hostBindings: function NgbCarousel_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"keydown.arrowLeft\", function NgbCarousel_keydown_arrowLeft_HostBindingHandler() { return ctx.keyboard && ctx.arrowLeft(); })(\"keydown.arrowRight\", function NgbCarousel_keydown_arrowRight_HostBindingHandler() { return ctx.keyboard && ctx.arrowRight(); })(\"mouseenter\", function NgbCarousel_mouseenter_HostBindingHandler() { return ctx.mouseHover = true; })(\"mouseleave\", function NgbCarousel_mouseleave_HostBindingHandler() { return ctx.mouseHover = false; })(\"focusin\", function NgbCarousel_focusin_HostBindingHandler() { return ctx.focused = true; })(\"focusout\", function NgbCarousel_focusout_HostBindingHandler() { return ctx.focused = false; });\n    } if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"aria-activedescendant\", \"slide-\" + ctx.activeId);\n        ɵngcc0.ɵɵstyleProp(\"display\", \"block\");\n    } }, inputs: { animation: \"animation\", interval: \"interval\", wrap: \"wrap\", keyboard: \"keyboard\", pauseOnHover: \"pauseOnHover\", pauseOnFocus: \"pauseOnFocus\", showNavigationArrows: \"showNavigationArrows\", showNavigationIndicators: \"showNavigationIndicators\", activeId: \"activeId\" }, outputs: { slide: \"slide\", slid: \"slid\" }, exportAs: [\"ngbCarousel\"], decls: 6, vars: 6, consts: function () { let i18n_4; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        /**\n         * @desc Currently selected slide number read by screen reader\n         */\n        const MSG_EXTERNAL_ngb_carousel_slide_number$$FESM2015_NG_BOOTSTRAP_JS__5 = goog.getMsg(\" Slide {$interpolation} of {$interpolation_1} \", { \"interpolation\": \"\\uFFFD0\\uFFFD\", \"interpolation_1\": \"\\uFFFD1\\uFFFD\" });\n        i18n_4 = MSG_EXTERNAL_ngb_carousel_slide_number$$FESM2015_NG_BOOTSTRAP_JS__5;\n    }\n    else {\n        i18n_4 = $localize `:Currently selected slide number read by screen reader@@ngb.carousel.slide-number␟a65b1b49aa7dd8c4f3004da6a8c2241814dae621␟783273603869937627: Slide ${\"\\uFFFD0\\uFFFD\"}:INTERPOLATION: of ${\"\\uFFFD1\\uFFFD\"}:INTERPOLATION_1: `;\n    } let i18n_6; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_carousel_previous$$FESM2015_NG_BOOTSTRAP_JS__7 = goog.getMsg(\"Previous\");\n        i18n_6 = MSG_EXTERNAL_ngb_carousel_previous$$FESM2015_NG_BOOTSTRAP_JS__7;\n    }\n    else {\n        i18n_6 = $localize `:@@ngb.carousel.previous␟680d5c75b7fd8d37961083608b9fcdc4167b4c43␟4452427314943113135:Previous`;\n    } let i18n_8; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_carousel_next$$FESM2015_NG_BOOTSTRAP_JS__9 = goog.getMsg(\"Next\");\n        i18n_8 = MSG_EXTERNAL_ngb_carousel_next$$FESM2015_NG_BOOTSTRAP_JS__9;\n    }\n    else {\n        i18n_8 = $localize `:@@ngb.carousel.next␟f732c304c7433e5a83ffcd862c3dce709a0f4982␟3885497195825665706:Next`;\n    } return [[\"role\", \"tablist\", 1, \"carousel-indicators\"], [\"role\", \"tab\", 3, \"active\", \"click\", 4, \"ngFor\", \"ngForOf\"], [1, \"carousel-inner\"], [\"class\", \"carousel-item\", \"role\", \"tabpanel\", 3, \"id\", 4, \"ngFor\", \"ngForOf\"], [\"class\", \"carousel-control-prev\", \"role\", \"button\", 3, \"click\", 4, \"ngIf\"], [\"class\", \"carousel-control-next\", \"role\", \"button\", 3, \"click\", 4, \"ngIf\"], [\"role\", \"tab\", 3, \"click\"], [\"role\", \"tabpanel\", 1, \"carousel-item\", 3, \"id\"], [1, \"sr-only\"], i18n_4, [3, \"ngTemplateOutlet\"], [\"role\", \"button\", 1, \"carousel-control-prev\", 3, \"click\"], [\"aria-hidden\", \"true\", 1, \"carousel-control-prev-icon\"], i18n_6, [\"role\", \"button\", 1, \"carousel-control-next\", 3, \"click\"], [\"aria-hidden\", \"true\", 1, \"carousel-control-next-icon\"], i18n_8]; }, template: function NgbCarousel_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵelementStart(0, \"ol\", 0);\n        ɵngcc0.ɵɵtemplate(1, NgbCarousel_li_1_Template, 1, 5, \"li\", 1);\n        ɵngcc0.ɵɵelementEnd();\n        ɵngcc0.ɵɵelementStart(2, \"div\", 2);\n        ɵngcc0.ɵɵtemplate(3, NgbCarousel_div_3_Template, 4, 4, \"div\", 3);\n        ɵngcc0.ɵɵelementEnd();\n        ɵngcc0.ɵɵtemplate(4, NgbCarousel_a_4_Template, 4, 0, \"a\", 4);\n        ɵngcc0.ɵɵtemplate(5, NgbCarousel_a_5_Template, 4, 0, \"a\", 5);\n    } if (rf & 2) {\n        ɵngcc0.ɵɵclassProp(\"sr-only\", !ctx.showNavigationIndicators);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngForOf\", ctx.slides);\n        ɵngcc0.ɵɵadvance(2);\n        ɵngcc0.ɵɵproperty(\"ngForOf\", ctx.slides);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.showNavigationArrows);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.showNavigationArrows);\n    } }, directives: [ɵngcc1.NgForOf, ɵngcc1.NgIf, ɵngcc1.NgTemplateOutlet], encapsulation: 2, changeDetection: 0 });\nNgbCarousel.ctorParameters = () => [\n    { type: NgbCarouselConfig },\n    { type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },\n    { type: NgZone },\n    { type: ChangeDetectorRef },\n    { type: ElementRef }\n];\nNgbCarousel.propDecorators = {\n    slides: [{ type: ContentChildren, args: [NgbSlide,] }],\n    animation: [{ type: Input }],\n    activeId: [{ type: Input }],\n    interval: [{ type: Input }],\n    wrap: [{ type: Input }],\n    keyboard: [{ type: Input }],\n    pauseOnHover: [{ type: Input }],\n    pauseOnFocus: [{ type: Input }],\n    showNavigationArrows: [{ type: Input }],\n    showNavigationIndicators: [{ type: Input }],\n    slide: [{ type: Output }],\n    slid: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbCarousel, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-carousel',\n                exportAs: 'ngbCarousel',\n                changeDetection: ChangeDetectionStrategy.OnPush,\n                encapsulation: ViewEncapsulation.None,\n                host: {\n                    'class': 'carousel slide',\n                    '[style.display]': '\"block\"',\n                    'tabIndex': '0',\n                    '(keydown.arrowLeft)': 'keyboard && arrowLeft()',\n                    '(keydown.arrowRight)': 'keyboard && arrowRight()',\n                    '(mouseenter)': 'mouseHover = true',\n                    '(mouseleave)': 'mouseHover = false',\n                    '(focusin)': 'focused = true',\n                    '(focusout)': 'focused = false',\n                    '[attr.aria-activedescendant]': `'slide-' + activeId`\n                },\n                template: `\n    <ol class=\"carousel-indicators\" [class.sr-only]=\"!showNavigationIndicators\" role=\"tablist\">\n      <li *ngFor=\"let slide of slides\" [class.active]=\"slide.id === activeId\"\n          role=\"tab\" [attr.aria-labelledby]=\"'slide-' + slide.id\" [attr.aria-controls]=\"'slide-' + slide.id\"\n          [attr.aria-selected]=\"slide.id === activeId\"\n          (click)=\"focus();select(slide.id, NgbSlideEventSource.INDICATOR);\"></li>\n    </ol>\n    <div class=\"carousel-inner\">\n      <div *ngFor=\"let slide of slides; index as i; count as c\" class=\"carousel-item\" [id]=\"'slide-' + slide.id\" role=\"tabpanel\">\n        <span class=\"sr-only\" i18n=\"Currently selected slide number read by screen reader@@ngb.carousel.slide-number\">\n          Slide {{i + 1}} of {{c}}\n        </span>\n        <ng-template [ngTemplateOutlet]=\"slide.tplRef\"></ng-template>\n      </div>\n    </div>\n    <a class=\"carousel-control-prev\" role=\"button\" (click)=\"arrowLeft()\" *ngIf=\"showNavigationArrows\">\n      <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n      <span class=\"sr-only\" i18n=\"@@ngb.carousel.previous\">Previous</span>\n    </a>\n    <a class=\"carousel-control-next\" role=\"button\" (click)=\"arrowRight()\" *ngIf=\"showNavigationArrows\">\n      <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n      <span class=\"sr-only\" i18n=\"@@ngb.carousel.next\">Next</span>\n    </a>\n  `\n            }]\n    }], function () { return [{ type: NgbCarouselConfig }, { type: undefined, decorators: [{\n                type: Inject,\n                args: [PLATFORM_ID]\n            }] }, { type: ɵngcc0.NgZone }, { type: ɵngcc0.ChangeDetectorRef }, { type: ɵngcc0.ElementRef }]; }, { slide: [{\n            type: Output\n        }], slid: [{\n            type: Output\n        }], animation: [{\n            type: Input\n        }], interval: [{\n            type: Input\n        }], wrap: [{\n            type: Input\n        }], keyboard: [{\n            type: Input\n        }], pauseOnHover: [{\n            type: Input\n        }], pauseOnFocus: [{\n            type: Input\n        }], showNavigationArrows: [{\n            type: Input\n        }], showNavigationIndicators: [{\n            type: Input\n        }], activeId: [{\n            type: Input\n        }], slides: [{\n            type: ContentChildren,\n            args: [NgbSlide]\n        }] }); })();\nvar NgbSlideEventSource;\n(function (NgbSlideEventSource) {\n    NgbSlideEventSource[\"TIMER\"] = \"timer\";\n    NgbSlideEventSource[\"ARROW_LEFT\"] = \"arrowLeft\";\n    NgbSlideEventSource[\"ARROW_RIGHT\"] = \"arrowRight\";\n    NgbSlideEventSource[\"INDICATOR\"] = \"indicator\";\n})(NgbSlideEventSource || (NgbSlideEventSource = {}));\nconst NGB_CAROUSEL_DIRECTIVES = [NgbCarousel, NgbSlide];\n\nclass NgbCarouselModule {\n}\nNgbCarouselModule.ɵfac = function NgbCarouselModule_Factory(t) { return new (t || NgbCarouselModule)(); };\nNgbCarouselModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbCarouselModule });\nNgbCarouselModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [[CommonModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbCarouselModule, [{\n        type: NgModule,\n        args: [{ declarations: NGB_CAROUSEL_DIRECTIVES, exports: NGB_CAROUSEL_DIRECTIVES, imports: [CommonModule] }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbCarouselModule, { declarations: function () { return [NgbCarousel, NgbSlide]; }, imports: function () { return [CommonModule]; }, exports: function () { return [NgbCarousel, NgbSlide]; } }); })();\n\n/**\n * A configuration service for the [NgbCollapse](#/components/collapse/api#NgbCollapse) component.\n *\n * You can inject this service, typically in your root component, and customize its properties\n * to provide default values for all collapses used in the application.\n */\nclass NgbCollapseConfig {\n    constructor(_ngbConfig) {\n        this._ngbConfig = _ngbConfig;\n    }\n    get animation() { return (this._animation === undefined) ? this._ngbConfig.animation : this._animation; }\n    set animation(animation) { this._animation = animation; }\n}\nNgbCollapseConfig.ɵfac = function NgbCollapseConfig_Factory(t) { return new (t || NgbCollapseConfig)(ɵngcc0.ɵɵinject(NgbConfig)); };\nNgbCollapseConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbCollapseConfig_Factory() { return new NgbCollapseConfig(i0.ɵɵinject(NgbConfig)); }, token: NgbCollapseConfig, providedIn: \"root\" });\nNgbCollapseConfig.ctorParameters = () => [\n    { type: NgbConfig }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbCollapseConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return [{ type: NgbConfig }]; }, null); })();\n\n/**\n * A directive to provide a simple way of hiding and showing elements on the page.\n */\nclass NgbCollapse {\n    constructor(_element, config, _zone) {\n        this._element = _element;\n        this._zone = _zone;\n        /**\n         * If `true`, will collapse the element or show it otherwise.\n         */\n        this.collapsed = false;\n        this.ngbCollapseChange = new EventEmitter();\n        /**\n         * An event emitted when the collapse element is shown, after the transition. It has no payload.\n         *\n         * @since 8.0.0\n         */\n        this.shown = new EventEmitter();\n        /**\n         * An event emitted when the collapse element is hidden, after the transition. It has no payload.\n         *\n         * @since 8.0.0\n         */\n        this.hidden = new EventEmitter();\n        this.animation = config.animation;\n    }\n    ngOnInit() { this._runTransition(this.collapsed, false); }\n    ngOnChanges({ collapsed }) {\n        if (!collapsed.firstChange) {\n            this._runTransitionWithEvents(this.collapsed, this.animation);\n        }\n    }\n    /**\n     * Triggers collapsing programmatically.\n     *\n     * If there is a collapsing transition running already, it will be reversed.\n     * If the animations are turned off this happens synchronously.\n     *\n     * @since 8.0.0\n     */\n    toggle(open = this.collapsed) {\n        this.collapsed = !open;\n        this.ngbCollapseChange.next(this.collapsed);\n        this._runTransitionWithEvents(this.collapsed, this.animation);\n    }\n    _runTransition(collapsed, animation) {\n        return ngbRunTransition(this._zone, this._element.nativeElement, ngbCollapsingTransition, { animation, runningTransition: 'stop', context: { direction: collapsed ? 'hide' : 'show' } });\n    }\n    _runTransitionWithEvents(collapsed, animation) {\n        this._runTransition(collapsed, animation).subscribe(() => {\n            if (collapsed) {\n                this.hidden.emit();\n            }\n            else {\n                this.shown.emit();\n            }\n        });\n    }\n}\nNgbCollapse.ɵfac = function NgbCollapse_Factory(t) { return new (t || NgbCollapse)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(NgbCollapseConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone)); };\nNgbCollapse.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbCollapse, selectors: [[\"\", \"ngbCollapse\", \"\"]], inputs: { collapsed: [\"ngbCollapse\", \"collapsed\"], animation: \"animation\" }, outputs: { ngbCollapseChange: \"ngbCollapseChange\", shown: \"shown\", hidden: \"hidden\" }, exportAs: [\"ngbCollapse\"], features: [ɵngcc0.ɵɵNgOnChangesFeature] });\nNgbCollapse.ctorParameters = () => [\n    { type: ElementRef },\n    { type: NgbCollapseConfig },\n    { type: NgZone }\n];\nNgbCollapse.propDecorators = {\n    animation: [{ type: Input }],\n    collapsed: [{ type: Input, args: ['ngbCollapse',] }],\n    ngbCollapseChange: [{ type: Output }],\n    shown: [{ type: Output }],\n    hidden: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbCollapse, [{\n        type: Directive,\n        args: [{ selector: '[ngbCollapse]', exportAs: 'ngbCollapse' }]\n    }], function () { return [{ type: ɵngcc0.ElementRef }, { type: NgbCollapseConfig }, { type: ɵngcc0.NgZone }]; }, { collapsed: [{\n            type: Input,\n            args: ['ngbCollapse']\n        }], ngbCollapseChange: [{\n            type: Output\n        }], shown: [{\n            type: Output\n        }], hidden: [{\n            type: Output\n        }], animation: [{\n            type: Input\n        }] }); })();\n\nclass NgbCollapseModule {\n}\nNgbCollapseModule.ɵfac = function NgbCollapseModule_Factory(t) { return new (t || NgbCollapseModule)(); };\nNgbCollapseModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbCollapseModule });\nNgbCollapseModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({});\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbCollapseModule, [{\n        type: NgModule,\n        args: [{ declarations: [NgbCollapse], exports: [NgbCollapse] }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbCollapseModule, { declarations: [NgbCollapse], exports: [NgbCollapse] }); })();\n\n/**\n * A simple class that represents a date that datepicker also uses internally.\n *\n * It is the implementation of the `NgbDateStruct` interface that adds some convenience methods,\n * like `.equals()`, `.before()`, etc.\n *\n * All datepicker APIs consume `NgbDateStruct`, but return `NgbDate`.\n *\n * In many cases it is simpler to manipulate these objects together with\n * [`NgbCalendar`](#/components/datepicker/api#NgbCalendar) than native JS Dates.\n *\n * See the [date format overview](#/components/datepicker/overview#date-model) for more details.\n *\n * @since 3.0.0\n */\nclass NgbDate {\n    constructor(year, month, day) {\n        this.year = isInteger(year) ? year : null;\n        this.month = isInteger(month) ? month : null;\n        this.day = isInteger(day) ? day : null;\n    }\n    /**\n     * A **static method** that creates a new date object from the `NgbDateStruct`,\n     *\n     * ex. `NgbDate.from({year: 2000, month: 5, day: 1})`.\n     *\n     * If the `date` is already of `NgbDate` type, the method will return the same object.\n     */\n    static from(date) {\n        if (date instanceof NgbDate) {\n            return date;\n        }\n        return date ? new NgbDate(date.year, date.month, date.day) : null;\n    }\n    /**\n     * Checks if the current date is equal to another date.\n     */\n    equals(other) {\n        return other != null && this.year === other.year && this.month === other.month && this.day === other.day;\n    }\n    /**\n     * Checks if the current date is before another date.\n     */\n    before(other) {\n        if (!other) {\n            return false;\n        }\n        if (this.year === other.year) {\n            if (this.month === other.month) {\n                return this.day === other.day ? false : this.day < other.day;\n            }\n            else {\n                return this.month < other.month;\n            }\n        }\n        else {\n            return this.year < other.year;\n        }\n    }\n    /**\n     * Checks if the current date is after another date.\n     */\n    after(other) {\n        if (!other) {\n            return false;\n        }\n        if (this.year === other.year) {\n            if (this.month === other.month) {\n                return this.day === other.day ? false : this.day > other.day;\n            }\n            else {\n                return this.month > other.month;\n            }\n        }\n        else {\n            return this.year > other.year;\n        }\n    }\n}\n\nfunction fromJSDate(jsDate) {\n    return new NgbDate(jsDate.getFullYear(), jsDate.getMonth() + 1, jsDate.getDate());\n}\nfunction toJSDate(date) {\n    const jsDate = new Date(date.year, date.month - 1, date.day, 12);\n    // this is done avoid 30 -> 1930 conversion\n    if (!isNaN(jsDate.getTime())) {\n        jsDate.setFullYear(date.year);\n    }\n    return jsDate;\n}\nfunction NGB_DATEPICKER_CALENDAR_FACTORY() {\n    return new NgbCalendarGregorian();\n}\n/**\n * A service that represents the calendar used by the datepicker.\n *\n * The default implementation uses the Gregorian calendar. You can inject it in your own\n * implementations if necessary to simplify `NgbDate` calculations.\n */\nclass NgbCalendar {\n}\nNgbCalendar.ɵfac = function NgbCalendar_Factory(t) { return new (t || NgbCalendar)(); };\nNgbCalendar.ɵprov = i0.ɵɵdefineInjectable({ factory: NGB_DATEPICKER_CALENDAR_FACTORY, token: NgbCalendar, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbCalendar, [{\n        type: Injectable,\n        args: [{ providedIn: 'root', useFactory: NGB_DATEPICKER_CALENDAR_FACTORY }]\n    }], null, null); })();\nclass NgbCalendarGregorian extends NgbCalendar {\n    getDaysPerWeek() { return 7; }\n    getMonths() { return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; }\n    getWeeksPerMonth() { return 6; }\n    getNext(date, period = 'd', number = 1) {\n        let jsDate = toJSDate(date);\n        let checkMonth = true;\n        let expectedMonth = jsDate.getMonth();\n        switch (period) {\n            case 'y':\n                jsDate.setFullYear(jsDate.getFullYear() + number);\n                break;\n            case 'm':\n                expectedMonth += number;\n                jsDate.setMonth(expectedMonth);\n                expectedMonth = expectedMonth % 12;\n                if (expectedMonth < 0) {\n                    expectedMonth = expectedMonth + 12;\n                }\n                break;\n            case 'd':\n                jsDate.setDate(jsDate.getDate() + number);\n                checkMonth = false;\n                break;\n            default:\n                return date;\n        }\n        if (checkMonth && jsDate.getMonth() !== expectedMonth) {\n            // this means the destination month has less days than the initial month\n            // let's go back to the end of the previous month:\n            jsDate.setDate(0);\n        }\n        return fromJSDate(jsDate);\n    }\n    getPrev(date, period = 'd', number = 1) { return this.getNext(date, period, -number); }\n    getWeekday(date) {\n        let jsDate = toJSDate(date);\n        let day = jsDate.getDay();\n        // in JS Date Sun=0, in ISO 8601 Sun=7\n        return day === 0 ? 7 : day;\n    }\n    getWeekNumber(week, firstDayOfWeek) {\n        // in JS Date Sun=0, in ISO 8601 Sun=7\n        if (firstDayOfWeek === 7) {\n            firstDayOfWeek = 0;\n        }\n        const thursdayIndex = (4 + 7 - firstDayOfWeek) % 7;\n        let date = week[thursdayIndex];\n        const jsDate = toJSDate(date);\n        jsDate.setDate(jsDate.getDate() + 4 - (jsDate.getDay() || 7)); // Thursday\n        const time = jsDate.getTime();\n        jsDate.setMonth(0); // Compare with Jan 1\n        jsDate.setDate(1);\n        return Math.floor(Math.round((time - jsDate.getTime()) / 86400000) / 7) + 1;\n    }\n    getToday() { return fromJSDate(new Date()); }\n    isValid(date) {\n        if (!date || !isInteger(date.year) || !isInteger(date.month) || !isInteger(date.day)) {\n            return false;\n        }\n        // year 0 doesn't exist in Gregorian calendar\n        if (date.year === 0) {\n            return false;\n        }\n        const jsDate = toJSDate(date);\n        return !isNaN(jsDate.getTime()) && jsDate.getFullYear() === date.year && jsDate.getMonth() + 1 === date.month &&\n            jsDate.getDate() === date.day;\n    }\n}\nNgbCalendarGregorian.ɵfac = /*@__PURE__*/ function () { let ɵNgbCalendarGregorian_BaseFactory; return function NgbCalendarGregorian_Factory(t) { return (ɵNgbCalendarGregorian_BaseFactory || (ɵNgbCalendarGregorian_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NgbCalendarGregorian)))(t || NgbCalendarGregorian); }; }();\nNgbCalendarGregorian.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbCalendarGregorian, factory: NgbCalendarGregorian.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbCalendarGregorian, [{\n        type: Injectable\n    }], null, null); })();\n\nfunction isChangedDate(prev, next) {\n    return !dateComparator(prev, next);\n}\nfunction isChangedMonth(prev, next) {\n    return !prev && !next ? false : !prev || !next ? true : prev.year !== next.year || prev.month !== next.month;\n}\nfunction dateComparator(prev, next) {\n    return (!prev && !next) || (!!prev && !!next && prev.equals(next));\n}\nfunction checkMinBeforeMax(minDate, maxDate) {\n    if (maxDate && minDate && maxDate.before(minDate)) {\n        throw new Error(`'maxDate' ${maxDate} should be greater than 'minDate' ${minDate}`);\n    }\n}\nfunction checkDateInRange(date, minDate, maxDate) {\n    if (date && minDate && date.before(minDate)) {\n        return minDate;\n    }\n    if (date && maxDate && date.after(maxDate)) {\n        return maxDate;\n    }\n    return date || null;\n}\nfunction isDateSelectable(date, state) {\n    const { minDate, maxDate, disabled, markDisabled } = state;\n    // clang-format off\n    return !(date === null ||\n        date === undefined ||\n        disabled ||\n        (markDisabled && markDisabled(date, { year: date.year, month: date.month })) ||\n        (minDate && date.before(minDate)) ||\n        (maxDate && date.after(maxDate)));\n    // clang-format on\n}\nfunction generateSelectBoxMonths(calendar, date, minDate, maxDate) {\n    if (!date) {\n        return [];\n    }\n    let months = calendar.getMonths(date.year);\n    if (minDate && date.year === minDate.year) {\n        const index = months.findIndex(month => month === minDate.month);\n        months = months.slice(index);\n    }\n    if (maxDate && date.year === maxDate.year) {\n        const index = months.findIndex(month => month === maxDate.month);\n        months = months.slice(0, index + 1);\n    }\n    return months;\n}\nfunction generateSelectBoxYears(date, minDate, maxDate) {\n    if (!date) {\n        return [];\n    }\n    const start = minDate ? Math.max(minDate.year, date.year - 500) : date.year - 10;\n    const end = maxDate ? Math.min(maxDate.year, date.year + 500) : date.year + 10;\n    const length = end - start + 1;\n    const numbers = Array(length);\n    for (let i = 0; i < length; i++) {\n        numbers[i] = start + i;\n    }\n    return numbers;\n}\nfunction nextMonthDisabled(calendar, date, maxDate) {\n    const nextDate = Object.assign(calendar.getNext(date, 'm'), { day: 1 });\n    return maxDate != null && nextDate.after(maxDate);\n}\nfunction prevMonthDisabled(calendar, date, minDate) {\n    const prevDate = Object.assign(calendar.getPrev(date, 'm'), { day: 1 });\n    return minDate != null && (prevDate.year === minDate.year && prevDate.month < minDate.month ||\n        prevDate.year < minDate.year && minDate.month === 1);\n}\nfunction buildMonths(calendar, date, state, i18n, force) {\n    const { displayMonths, months } = state;\n    // move old months to a temporary array\n    const monthsToReuse = months.splice(0, months.length);\n    // generate new first dates, nullify or reuse months\n    const firstDates = Array.from({ length: displayMonths }, (_, i) => {\n        const firstDate = Object.assign(calendar.getNext(date, 'm', i), { day: 1 });\n        months[i] = null;\n        if (!force) {\n            const reusedIndex = monthsToReuse.findIndex(month => month.firstDate.equals(firstDate));\n            // move reused month back to months\n            if (reusedIndex !== -1) {\n                months[i] = monthsToReuse.splice(reusedIndex, 1)[0];\n            }\n        }\n        return firstDate;\n    });\n    // rebuild nullified months\n    firstDates.forEach((firstDate, i) => {\n        if (months[i] === null) {\n            months[i] = buildMonth(calendar, firstDate, state, i18n, monthsToReuse.shift() || {});\n        }\n    });\n    return months;\n}\nfunction buildMonth(calendar, date, state, i18n, month = {}) {\n    const { dayTemplateData, minDate, maxDate, firstDayOfWeek, markDisabled, outsideDays, weekdayWidth, weekdaysVisible } = state;\n    const calendarToday = calendar.getToday();\n    month.firstDate = null;\n    month.lastDate = null;\n    month.number = date.month;\n    month.year = date.year;\n    month.weeks = month.weeks || [];\n    month.weekdays = month.weekdays || [];\n    date = getFirstViewDate(calendar, date, firstDayOfWeek);\n    // clearing weekdays, if not visible\n    if (!weekdaysVisible) {\n        month.weekdays.length = 0;\n    }\n    // month has weeks\n    for (let week = 0; week < calendar.getWeeksPerMonth(); week++) {\n        let weekObject = month.weeks[week];\n        if (!weekObject) {\n            weekObject = month.weeks[week] = { number: 0, days: [], collapsed: true };\n        }\n        const days = weekObject.days;\n        // week has days\n        for (let day = 0; day < calendar.getDaysPerWeek(); day++) {\n            if (week === 0 && weekdaysVisible) {\n                month.weekdays[day] = i18n.getWeekdayLabel(calendar.getWeekday(date), weekdayWidth);\n            }\n            const newDate = new NgbDate(date.year, date.month, date.day);\n            const nextDate = calendar.getNext(newDate);\n            const ariaLabel = i18n.getDayAriaLabel(newDate);\n            // marking date as disabled\n            let disabled = !!((minDate && newDate.before(minDate)) || (maxDate && newDate.after(maxDate)));\n            if (!disabled && markDisabled) {\n                disabled = markDisabled(newDate, { month: month.number, year: month.year });\n            }\n            // today\n            let today = newDate.equals(calendarToday);\n            // adding user-provided data to the context\n            let contextUserData = dayTemplateData ? dayTemplateData(newDate, { month: month.number, year: month.year }) : undefined;\n            // saving first date of the month\n            if (month.firstDate === null && newDate.month === month.number) {\n                month.firstDate = newDate;\n            }\n            // saving last date of the month\n            if (newDate.month === month.number && nextDate.month !== month.number) {\n                month.lastDate = newDate;\n            }\n            let dayObject = days[day];\n            if (!dayObject) {\n                dayObject = days[day] = {};\n            }\n            dayObject.date = newDate;\n            dayObject.context = Object.assign(dayObject.context || {}, {\n                $implicit: newDate,\n                date: newDate,\n                data: contextUserData,\n                currentMonth: month.number,\n                currentYear: month.year, disabled,\n                focused: false,\n                selected: false, today\n            });\n            dayObject.tabindex = -1;\n            dayObject.ariaLabel = ariaLabel;\n            dayObject.hidden = false;\n            date = nextDate;\n        }\n        weekObject.number = calendar.getWeekNumber(days.map(day => day.date), firstDayOfWeek);\n        // marking week as collapsed\n        weekObject.collapsed = outsideDays === 'collapsed' && days[0].date.month !== month.number &&\n            days[days.length - 1].date.month !== month.number;\n    }\n    return month;\n}\nfunction getFirstViewDate(calendar, date, firstDayOfWeek) {\n    const daysPerWeek = calendar.getDaysPerWeek();\n    const firstMonthDate = new NgbDate(date.year, date.month, 1);\n    const dayOfWeek = calendar.getWeekday(firstMonthDate) % daysPerWeek;\n    return calendar.getPrev(firstMonthDate, 'd', (daysPerWeek + dayOfWeek - firstDayOfWeek) % daysPerWeek);\n}\n\nfunction NGB_DATEPICKER_18N_FACTORY(locale) {\n    return new NgbDatepickerI18nDefault(locale);\n}\n/**\n * A service supplying i18n data to the datepicker component.\n *\n * The default implementation of this service uses the Angular locale and registered locale data for\n * weekdays and month names (as explained in the Angular i18n guide).\n *\n * It also provides a way to i18n data that depends on calendar calculations, like aria labels, day, week and year\n * numerals. For other static labels the datepicker uses the default Angular i18n.\n *\n * See the [i18n demo](#/components/datepicker/examples#i18n) and\n * [Hebrew calendar demo](#/components/datepicker/calendars#hebrew) on how to extend this class and define\n * a custom provider for i18n.\n */\nclass NgbDatepickerI18n {\n    /**\n     * Returns the text label to display above the day view.\n     *\n     * @since 9.1.0\n     */\n    getMonthLabel(date) {\n        return `${this.getMonthFullName(date.month, date.year)} ${this.getYearNumerals(date.year)}`;\n    }\n    /**\n     * Returns the textual representation of a day that is rendered in a day cell.\n     *\n     * @since 3.0.0\n     */\n    getDayNumerals(date) { return `${date.day}`; }\n    /**\n     * Returns the textual representation of a week number rendered by datepicker.\n     *\n     * @since 3.0.0\n     */\n    getWeekNumerals(weekNumber) { return `${weekNumber}`; }\n    /**\n     * Returns the textual representation of a year that is rendered in the datepicker year select box.\n     *\n     * @since 3.0.0\n     */\n    getYearNumerals(year) { return `${year}`; }\n    /**\n     * Returns the week label to display in the heading of the month view.\n     *\n     * @since 9.1.0\n     */\n    getWeekLabel() { return ''; }\n}\nNgbDatepickerI18n.ɵfac = function NgbDatepickerI18n_Factory(t) { return new (t || NgbDatepickerI18n)(); };\nNgbDatepickerI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbDatepickerI18n_Factory() { return NGB_DATEPICKER_18N_FACTORY(i0.ɵɵinject(i0.LOCALE_ID)); }, token: NgbDatepickerI18n, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDatepickerI18n, [{\n        type: Injectable,\n        args: [{ providedIn: 'root', useFactory: NGB_DATEPICKER_18N_FACTORY, deps: [LOCALE_ID] }]\n    }], null, null); })();\n/**\n * A service providing default implementation for the datepicker i18n.\n * It can be used as a base implementation if necessary.\n *\n * @since 9.1.0\n */\nclass NgbDatepickerI18nDefault extends NgbDatepickerI18n {\n    constructor(_locale) {\n        super();\n        this._locale = _locale;\n        this._monthsShort = getLocaleMonthNames(_locale, FormStyle.Standalone, TranslationWidth.Abbreviated);\n        this._monthsFull = getLocaleMonthNames(_locale, FormStyle.Standalone, TranslationWidth.Wide);\n    }\n    getWeekdayLabel(weekday, width) {\n        const weekdaysStartingOnSunday = getLocaleDayNames(this._locale, FormStyle.Standalone, width === undefined ? TranslationWidth.Short : width);\n        const weekdays = weekdaysStartingOnSunday.map((day, index) => weekdaysStartingOnSunday[(index + 1) % 7]);\n        return weekdays[weekday - 1] || '';\n    }\n    getMonthShortName(month) { return this._monthsShort[month - 1] || ''; }\n    getMonthFullName(month) { return this._monthsFull[month - 1] || ''; }\n    getDayAriaLabel(date) {\n        const jsDate = new Date(date.year, date.month - 1, date.day);\n        return formatDate(jsDate, 'fullDate', this._locale);\n    }\n}\nNgbDatepickerI18nDefault.ɵfac = function NgbDatepickerI18nDefault_Factory(t) { return new (t || NgbDatepickerI18nDefault)(ɵngcc0.ɵɵinject(LOCALE_ID)); };\nNgbDatepickerI18nDefault.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbDatepickerI18nDefault, factory: NgbDatepickerI18nDefault.ɵfac });\nNgbDatepickerI18nDefault.ctorParameters = () => [\n    { type: String, decorators: [{ type: Inject, args: [LOCALE_ID,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDatepickerI18nDefault, [{\n        type: Injectable\n    }], function () { return [{ type: String, decorators: [{\n                type: Inject,\n                args: [LOCALE_ID]\n            }] }]; }, null); })();\n\nclass NgbDatepickerService {\n    constructor(_calendar, _i18n) {\n        this._calendar = _calendar;\n        this._i18n = _i18n;\n        this._VALIDATORS = {\n            dayTemplateData: (dayTemplateData) => {\n                if (this._state.dayTemplateData !== dayTemplateData) {\n                    return { dayTemplateData };\n                }\n            },\n            displayMonths: (displayMonths) => {\n                displayMonths = toInteger(displayMonths);\n                if (isInteger(displayMonths) && displayMonths > 0 && this._state.displayMonths !== displayMonths) {\n                    return { displayMonths };\n                }\n            },\n            disabled: (disabled) => {\n                if (this._state.disabled !== disabled) {\n                    return { disabled };\n                }\n            },\n            firstDayOfWeek: (firstDayOfWeek) => {\n                firstDayOfWeek = toInteger(firstDayOfWeek);\n                if (isInteger(firstDayOfWeek) && firstDayOfWeek >= 0 && this._state.firstDayOfWeek !== firstDayOfWeek) {\n                    return { firstDayOfWeek };\n                }\n            },\n            focusVisible: (focusVisible) => {\n                if (this._state.focusVisible !== focusVisible && !this._state.disabled) {\n                    return { focusVisible };\n                }\n            },\n            markDisabled: (markDisabled) => {\n                if (this._state.markDisabled !== markDisabled) {\n                    return { markDisabled };\n                }\n            },\n            maxDate: (date) => {\n                const maxDate = this.toValidDate(date, null);\n                if (isChangedDate(this._state.maxDate, maxDate)) {\n                    return { maxDate };\n                }\n            },\n            minDate: (date) => {\n                const minDate = this.toValidDate(date, null);\n                if (isChangedDate(this._state.minDate, minDate)) {\n                    return { minDate };\n                }\n            },\n            navigation: (navigation) => {\n                if (this._state.navigation !== navigation) {\n                    return { navigation };\n                }\n            },\n            outsideDays: (outsideDays) => {\n                if (this._state.outsideDays !== outsideDays) {\n                    return { outsideDays };\n                }\n            },\n            weekdays: (weekdays) => {\n                const weekdayWidth = weekdays === true || weekdays === false ? TranslationWidth.Short : weekdays;\n                const weekdaysVisible = weekdays === true || weekdays === false ? weekdays : true;\n                if (this._state.weekdayWidth !== weekdayWidth || this._state.weekdaysVisible !== weekdaysVisible) {\n                    return { weekdayWidth, weekdaysVisible };\n                }\n            }\n        };\n        this._model$ = new Subject();\n        this._dateSelect$ = new Subject();\n        this._state = {\n            dayTemplateData: null,\n            markDisabled: null,\n            maxDate: null,\n            minDate: null,\n            disabled: false,\n            displayMonths: 1,\n            firstDate: null,\n            firstDayOfWeek: 1,\n            lastDate: null,\n            focusDate: null,\n            focusVisible: false,\n            months: [],\n            navigation: 'select',\n            outsideDays: 'visible',\n            prevDisabled: false,\n            nextDisabled: false,\n            selectedDate: null,\n            selectBoxes: { years: [], months: [] },\n            weekdayWidth: TranslationWidth.Short,\n            weekdaysVisible: true\n        };\n    }\n    get model$() { return this._model$.pipe(filter(model => model.months.length > 0)); }\n    get dateSelect$() { return this._dateSelect$.pipe(filter(date => date !== null)); }\n    set(options) {\n        let patch = Object.keys(options)\n            .map(key => this._VALIDATORS[key](options[key]))\n            .reduce((obj, part) => (Object.assign(Object.assign({}, obj), part)), {});\n        if (Object.keys(patch).length > 0) {\n            this._nextState(patch);\n        }\n    }\n    focus(date) {\n        const focusedDate = this.toValidDate(date, null);\n        if (focusedDate != null && !this._state.disabled && isChangedDate(this._state.focusDate, focusedDate)) {\n            this._nextState({ focusDate: date });\n        }\n    }\n    focusSelect() {\n        if (isDateSelectable(this._state.focusDate, this._state)) {\n            this.select(this._state.focusDate, { emitEvent: true });\n        }\n    }\n    open(date) {\n        const firstDate = this.toValidDate(date, this._calendar.getToday());\n        if (firstDate != null && !this._state.disabled &&\n            (!this._state.firstDate || isChangedMonth(this._state.firstDate, firstDate))) {\n            this._nextState({ firstDate });\n        }\n    }\n    select(date, options = {}) {\n        const selectedDate = this.toValidDate(date, null);\n        if (selectedDate != null && !this._state.disabled) {\n            if (isChangedDate(this._state.selectedDate, selectedDate)) {\n                this._nextState({ selectedDate });\n            }\n            if (options.emitEvent && isDateSelectable(selectedDate, this._state)) {\n                this._dateSelect$.next(selectedDate);\n            }\n        }\n    }\n    toValidDate(date, defaultValue) {\n        const ngbDate = NgbDate.from(date);\n        if (defaultValue === undefined) {\n            defaultValue = this._calendar.getToday();\n        }\n        return this._calendar.isValid(ngbDate) ? ngbDate : defaultValue;\n    }\n    getMonth(struct) {\n        for (let month of this._state.months) {\n            if (struct.month === month.number && struct.year === month.year) {\n                return month;\n            }\n        }\n        throw new Error(`month ${struct.month} of year ${struct.year} not found`);\n    }\n    _nextState(patch) {\n        const newState = this._updateState(patch);\n        this._patchContexts(newState);\n        this._state = newState;\n        this._model$.next(this._state);\n    }\n    _patchContexts(state) {\n        const { months, displayMonths, selectedDate, focusDate, focusVisible, disabled, outsideDays } = state;\n        state.months.forEach(month => {\n            month.weeks.forEach(week => {\n                week.days.forEach(day => {\n                    // patch focus flag\n                    if (focusDate) {\n                        day.context.focused = focusDate.equals(day.date) && focusVisible;\n                    }\n                    // calculating tabindex\n                    day.tabindex =\n                        !disabled && focusDate && day.date.equals(focusDate) && focusDate.month === month.number ? 0 : -1;\n                    // override context disabled\n                    if (disabled === true) {\n                        day.context.disabled = true;\n                    }\n                    // patch selection flag\n                    if (selectedDate !== undefined) {\n                        day.context.selected = selectedDate !== null && selectedDate.equals(day.date);\n                    }\n                    // visibility\n                    if (month.number !== day.date.month) {\n                        day.hidden = outsideDays === 'hidden' || outsideDays === 'collapsed' ||\n                            (displayMonths > 1 && day.date.after(months[0].firstDate) &&\n                                day.date.before(months[displayMonths - 1].lastDate));\n                    }\n                });\n            });\n        });\n    }\n    _updateState(patch) {\n        // patching fields\n        const state = Object.assign({}, this._state, patch);\n        let startDate = state.firstDate;\n        // min/max dates changed\n        if ('minDate' in patch || 'maxDate' in patch) {\n            checkMinBeforeMax(state.minDate, state.maxDate);\n            state.focusDate = checkDateInRange(state.focusDate, state.minDate, state.maxDate);\n            state.firstDate = checkDateInRange(state.firstDate, state.minDate, state.maxDate);\n            startDate = state.focusDate;\n        }\n        // disabled\n        if ('disabled' in patch) {\n            state.focusVisible = false;\n        }\n        // initial rebuild via 'select()'\n        if ('selectedDate' in patch && this._state.months.length === 0) {\n            startDate = state.selectedDate;\n        }\n        // terminate early if only focus visibility was changed\n        if ('focusVisible' in patch) {\n            return state;\n        }\n        // focus date changed\n        if ('focusDate' in patch) {\n            state.focusDate = checkDateInRange(state.focusDate, state.minDate, state.maxDate);\n            startDate = state.focusDate;\n            // nothing to rebuild if only focus changed and it is still visible\n            if (state.months.length !== 0 && state.focusDate && !state.focusDate.before(state.firstDate) &&\n                !state.focusDate.after(state.lastDate)) {\n                return state;\n            }\n        }\n        // first date changed\n        if ('firstDate' in patch) {\n            state.firstDate = checkDateInRange(state.firstDate, state.minDate, state.maxDate);\n            startDate = state.firstDate;\n        }\n        // rebuilding months\n        if (startDate) {\n            const forceRebuild = 'dayTemplateData' in patch || 'firstDayOfWeek' in patch || 'markDisabled' in patch ||\n                'minDate' in patch || 'maxDate' in patch || 'disabled' in patch || 'outsideDays' in patch ||\n                'weekdaysVisible' in patch;\n            const months = buildMonths(this._calendar, startDate, state, this._i18n, forceRebuild);\n            // updating months and boundary dates\n            state.months = months;\n            state.firstDate = months[0].firstDate;\n            state.lastDate = months[months.length - 1].lastDate;\n            // reset selected date if 'markDisabled' returns true\n            if ('selectedDate' in patch && !isDateSelectable(state.selectedDate, state)) {\n                state.selectedDate = null;\n            }\n            // adjusting focus after months were built\n            if ('firstDate' in patch) {\n                if (!state.focusDate || state.focusDate.before(state.firstDate) || state.focusDate.after(state.lastDate)) {\n                    state.focusDate = startDate;\n                }\n            }\n            // adjusting months/years for the select box navigation\n            const yearChanged = !this._state.firstDate || this._state.firstDate.year !== state.firstDate.year;\n            const monthChanged = !this._state.firstDate || this._state.firstDate.month !== state.firstDate.month;\n            if (state.navigation === 'select') {\n                // years ->  boundaries (min/max were changed)\n                if ('minDate' in patch || 'maxDate' in patch || state.selectBoxes.years.length === 0 || yearChanged) {\n                    state.selectBoxes.years = generateSelectBoxYears(state.firstDate, state.minDate, state.maxDate);\n                }\n                // months -> when current year or boundaries change\n                if ('minDate' in patch || 'maxDate' in patch || state.selectBoxes.months.length === 0 || yearChanged) {\n                    state.selectBoxes.months =\n                        generateSelectBoxMonths(this._calendar, state.firstDate, state.minDate, state.maxDate);\n                }\n            }\n            else {\n                state.selectBoxes = { years: [], months: [] };\n            }\n            // updating navigation arrows -> boundaries change (min/max) or month/year changes\n            if ((state.navigation === 'arrows' || state.navigation === 'select') &&\n                (monthChanged || yearChanged || 'minDate' in patch || 'maxDate' in patch || 'disabled' in patch)) {\n                state.prevDisabled = state.disabled || prevMonthDisabled(this._calendar, state.firstDate, state.minDate);\n                state.nextDisabled = state.disabled || nextMonthDisabled(this._calendar, state.lastDate, state.maxDate);\n            }\n        }\n        return state;\n    }\n}\nNgbDatepickerService.ɵfac = function NgbDatepickerService_Factory(t) { return new (t || NgbDatepickerService)(ɵngcc0.ɵɵinject(NgbCalendar), ɵngcc0.ɵɵinject(NgbDatepickerI18n)); };\nNgbDatepickerService.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbDatepickerService, factory: NgbDatepickerService.ɵfac });\nNgbDatepickerService.ctorParameters = () => [\n    { type: NgbCalendar },\n    { type: NgbDatepickerI18n }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDatepickerService, [{\n        type: Injectable\n    }], function () { return [{ type: NgbCalendar }, { type: NgbDatepickerI18n }]; }, null); })();\n\n// clang-format on\nvar NavigationEvent;\n(function (NavigationEvent) {\n    NavigationEvent[NavigationEvent[\"PREV\"] = 0] = \"PREV\";\n    NavigationEvent[NavigationEvent[\"NEXT\"] = 1] = \"NEXT\";\n})(NavigationEvent || (NavigationEvent = {}));\n\n/**\n * A configuration service for the [`NgbDatepicker`](#/components/datepicker/api#NgbDatepicker) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the datepickers used in the application.\n */\nclass NgbDatepickerConfig {\n    constructor() {\n        this.displayMonths = 1;\n        this.firstDayOfWeek = 1;\n        this.navigation = 'select';\n        this.outsideDays = 'visible';\n        this.showWeekNumbers = false;\n        this.weekdays = TranslationWidth.Short;\n    }\n}\nNgbDatepickerConfig.ɵfac = function NgbDatepickerConfig_Factory(t) { return new (t || NgbDatepickerConfig)(); };\nNgbDatepickerConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbDatepickerConfig_Factory() { return new NgbDatepickerConfig(); }, token: NgbDatepickerConfig, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDatepickerConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return []; }, null); })();\n\nfunction NGB_DATEPICKER_DATE_ADAPTER_FACTORY() {\n    return new NgbDateStructAdapter();\n}\n/**\n * An abstract service that does the conversion between the internal datepicker `NgbDateStruct` model and\n * any provided user date model `D`, ex. a string, a native date, etc.\n *\n * The adapter is used **only** for conversion when binding datepicker to a form control,\n * ex. `[(ngModel)]=\"userDateModel\"`. Here `userDateModel` can be of any type.\n *\n * The default datepicker implementation assumes we use `NgbDateStruct` as a user model.\n *\n * See the [date format overview](#/components/datepicker/overview#date-model) for more details\n * and the [custom adapter demo](#/components/datepicker/examples#adapter) for an example.\n */\nclass NgbDateAdapter {\n}\nNgbDateAdapter.ɵfac = function NgbDateAdapter_Factory(t) { return new (t || NgbDateAdapter)(); };\nNgbDateAdapter.ɵprov = i0.ɵɵdefineInjectable({ factory: NGB_DATEPICKER_DATE_ADAPTER_FACTORY, token: NgbDateAdapter, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDateAdapter, [{\n        type: Injectable,\n        args: [{ providedIn: 'root', useFactory: NGB_DATEPICKER_DATE_ADAPTER_FACTORY }]\n    }], null, null); })();\nclass NgbDateStructAdapter extends NgbDateAdapter {\n    /**\n     * Converts a NgbDateStruct value into NgbDateStruct value\n     */\n    fromModel(date) {\n        return (date && isInteger(date.year) && isInteger(date.month) && isInteger(date.day)) ?\n            { year: date.year, month: date.month, day: date.day } :\n            null;\n    }\n    /**\n     * Converts a NgbDateStruct value into NgbDateStruct value\n     */\n    toModel(date) {\n        return (date && isInteger(date.year) && isInteger(date.month) && isInteger(date.day)) ?\n            { year: date.year, month: date.month, day: date.day } :\n            null;\n    }\n}\nNgbDateStructAdapter.ɵfac = /*@__PURE__*/ function () { let ɵNgbDateStructAdapter_BaseFactory; return function NgbDateStructAdapter_Factory(t) { return (ɵNgbDateStructAdapter_BaseFactory || (ɵNgbDateStructAdapter_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NgbDateStructAdapter)))(t || NgbDateStructAdapter); }; }();\nNgbDateStructAdapter.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbDateStructAdapter, factory: NgbDateStructAdapter.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDateStructAdapter, [{\n        type: Injectable\n    }], null, null); })();\n\n/**\n * A directive that marks the content template that customizes the way datepicker months are displayed\n *\n * @since 5.3.0\n */\nclass NgbDatepickerContent {\n    constructor(templateRef) {\n        this.templateRef = templateRef;\n    }\n}\nNgbDatepickerContent.ɵfac = function NgbDatepickerContent_Factory(t) { return new (t || NgbDatepickerContent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgbDatepickerContent.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbDatepickerContent, selectors: [[\"ng-template\", \"ngbDatepickerContent\", \"\"]] });\nNgbDatepickerContent.ctorParameters = () => [\n    { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDatepickerContent, [{\n        type: Directive,\n        args: [{ selector: 'ng-template[ngbDatepickerContent]' }]\n    }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\n/**\n * A highly configurable component that helps you with selecting calendar dates.\n *\n * `NgbDatepicker` is meant to be displayed inline on a page or put inside a popup.\n */\nclass NgbDatepicker {\n    constructor(_service, _calendar, i18n, config, cd, _elementRef, _ngbDateAdapter, _ngZone) {\n        this._service = _service;\n        this._calendar = _calendar;\n        this.i18n = i18n;\n        this._elementRef = _elementRef;\n        this._ngbDateAdapter = _ngbDateAdapter;\n        this._ngZone = _ngZone;\n        this._controlValue = null;\n        this._destroyed$ = new Subject();\n        this._publicState = {};\n        /**\n         * An event emitted right before the navigation happens and displayed month changes.\n         *\n         * See [`NgbDatepickerNavigateEvent`](#/components/datepicker/api#NgbDatepickerNavigateEvent) for the payload info.\n         */\n        this.navigate = new EventEmitter();\n        /**\n         * An event emitted when user selects a date using keyboard or mouse.\n         *\n         * The payload of the event is currently selected `NgbDate`.\n         *\n         * @since 5.2.0\n         */\n        this.dateSelect = new EventEmitter();\n        this.onChange = (_) => { };\n        this.onTouched = () => { };\n        ['dayTemplate', 'dayTemplateData', 'displayMonths', 'firstDayOfWeek', 'footerTemplate', 'markDisabled', 'minDate',\n            'maxDate', 'navigation', 'outsideDays', 'showWeekNumbers', 'startDate', 'weekdays']\n            .forEach(input => this[input] = config[input]);\n        _service.dateSelect$.pipe(takeUntil(this._destroyed$)).subscribe(date => { this.dateSelect.emit(date); });\n        _service.model$.pipe(takeUntil(this._destroyed$)).subscribe(model => {\n            const newDate = model.firstDate;\n            const oldDate = this.model ? this.model.firstDate : null;\n            // update public state\n            this._publicState = {\n                maxDate: model.maxDate,\n                minDate: model.minDate,\n                firstDate: model.firstDate,\n                lastDate: model.lastDate,\n                focusedDate: model.focusDate,\n                months: model.months.map(viewModel => viewModel.firstDate)\n            };\n            let navigationPrevented = false;\n            // emitting navigation event if the first month changes\n            if (!newDate.equals(oldDate)) {\n                this.navigate.emit({\n                    current: oldDate ? { year: oldDate.year, month: oldDate.month } : null,\n                    next: { year: newDate.year, month: newDate.month },\n                    preventDefault: () => navigationPrevented = true\n                });\n                // can't prevent the very first navigation\n                if (navigationPrevented && oldDate !== null) {\n                    this._service.open(oldDate);\n                    return;\n                }\n            }\n            const newSelectedDate = model.selectedDate;\n            const newFocusedDate = model.focusDate;\n            const oldFocusedDate = this.model ? this.model.focusDate : null;\n            this.model = model;\n            // handling selection change\n            if (isChangedDate(newSelectedDate, this._controlValue)) {\n                this._controlValue = newSelectedDate;\n                this.onTouched();\n                this.onChange(this._ngbDateAdapter.toModel(newSelectedDate));\n            }\n            // handling focus change\n            if (isChangedDate(newFocusedDate, oldFocusedDate) && oldFocusedDate && model.focusVisible) {\n                this.focus();\n            }\n            cd.markForCheck();\n        });\n    }\n    /**\n     *  Returns the readonly public state of the datepicker\n     *\n     * @since 5.2.0\n     */\n    get state() { return this._publicState; }\n    /**\n     *  Returns the calendar service used in the specific datepicker instance.\n     *\n     *  @since 5.3.0\n     */\n    get calendar() { return this._calendar; }\n    /**\n     *  Focuses on given date.\n     */\n    focusDate(date) { this._service.focus(NgbDate.from(date)); }\n    /**\n     *  Selects focused date.\n     */\n    focusSelect() { this._service.focusSelect(); }\n    focus() {\n        this._ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n            const elementToFocus = this._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex=\"0\"]');\n            if (elementToFocus) {\n                elementToFocus.focus();\n            }\n        });\n    }\n    /**\n     * Navigates to the provided date.\n     *\n     * With the default calendar we use ISO 8601: 'month' is 1=Jan ... 12=Dec.\n     * If nothing or invalid date provided calendar will open current month.\n     *\n     * Use the `[startDate]` input as an alternative.\n     */\n    navigateTo(date) {\n        this._service.open(NgbDate.from(date ? date.day ? date : Object.assign(Object.assign({}, date), { day: 1 }) : null));\n    }\n    ngAfterViewInit() {\n        this._ngZone.runOutsideAngular(() => {\n            const focusIns$ = fromEvent(this._contentEl.nativeElement, 'focusin');\n            const focusOuts$ = fromEvent(this._contentEl.nativeElement, 'focusout');\n            const { nativeElement } = this._elementRef;\n            // we're changing 'focusVisible' only when entering or leaving months view\n            // and ignoring all focus events where both 'target' and 'related' target are day cells\n            merge(focusIns$, focusOuts$)\n                .pipe(filter(({ target, relatedTarget }) => !(hasClassName(target, 'ngb-dp-day') && hasClassName(relatedTarget, 'ngb-dp-day') &&\n                nativeElement.contains(target) && nativeElement.contains(relatedTarget))), takeUntil(this._destroyed$))\n                .subscribe(({ type }) => this._ngZone.run(() => this._service.set({ focusVisible: type === 'focusin' })));\n        });\n    }\n    ngOnDestroy() { this._destroyed$.next(); }\n    ngOnInit() {\n        if (this.model === undefined) {\n            const inputs = {};\n            ['dayTemplateData', 'displayMonths', 'markDisabled', 'firstDayOfWeek', 'navigation', 'minDate', 'maxDate',\n                'outsideDays', 'weekdays']\n                .forEach(name => inputs[name] = this[name]);\n            this._service.set(inputs);\n            this.navigateTo(this.startDate);\n        }\n        if (!this.dayTemplate) {\n            this.dayTemplate = this._defaultDayTemplate;\n        }\n    }\n    ngOnChanges(changes) {\n        const inputs = {};\n        ['dayTemplateData', 'displayMonths', 'markDisabled', 'firstDayOfWeek', 'navigation', 'minDate', 'maxDate',\n            'outsideDays', 'weekdays']\n            .filter(name => name in changes)\n            .forEach(name => inputs[name] = this[name]);\n        this._service.set(inputs);\n        if ('startDate' in changes) {\n            const { currentValue, previousValue } = changes.startDate;\n            if (isChangedMonth(previousValue, currentValue)) {\n                this.navigateTo(this.startDate);\n            }\n        }\n    }\n    onDateSelect(date) {\n        this._service.focus(date);\n        this._service.select(date, { emitEvent: true });\n    }\n    onNavigateDateSelect(date) { this._service.open(date); }\n    onNavigateEvent(event) {\n        switch (event) {\n            case NavigationEvent.PREV:\n                this._service.open(this._calendar.getPrev(this.model.firstDate, 'm', 1));\n                break;\n            case NavigationEvent.NEXT:\n                this._service.open(this._calendar.getNext(this.model.firstDate, 'm', 1));\n                break;\n        }\n    }\n    registerOnChange(fn) { this.onChange = fn; }\n    registerOnTouched(fn) { this.onTouched = fn; }\n    setDisabledState(disabled) { this._service.set({ disabled }); }\n    writeValue(value) {\n        this._controlValue = NgbDate.from(this._ngbDateAdapter.fromModel(value));\n        this._service.select(this._controlValue);\n    }\n}\nNgbDatepicker.ɵfac = function NgbDatepicker_Factory(t) { return new (t || NgbDatepicker)(ɵngcc0.ɵɵdirectiveInject(NgbDatepickerService), ɵngcc0.ɵɵdirectiveInject(NgbCalendar), ɵngcc0.ɵɵdirectiveInject(NgbDatepickerI18n), ɵngcc0.ɵɵdirectiveInject(NgbDatepickerConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(NgbDateAdapter), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone)); };\nNgbDatepicker.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbDatepicker, selectors: [[\"ngb-datepicker\"]], contentQueries: function NgbDatepicker_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbDatepickerContent, 7);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.contentTemplate = _t.first);\n    } }, viewQuery: function NgbDatepicker_Query(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵviewQuery(_c10, 7);\n        ɵngcc0.ɵɵviewQuery(_c11, 7);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx._defaultDayTemplate = _t.first);\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx._contentEl = _t.first);\n    } }, inputs: { dayTemplate: \"dayTemplate\", dayTemplateData: \"dayTemplateData\", displayMonths: \"displayMonths\", firstDayOfWeek: \"firstDayOfWeek\", footerTemplate: \"footerTemplate\", markDisabled: \"markDisabled\", maxDate: \"maxDate\", minDate: \"minDate\", navigation: \"navigation\", outsideDays: \"outsideDays\", showWeekNumbers: \"showWeekNumbers\", startDate: \"startDate\", weekdays: \"weekdays\" }, outputs: { navigate: \"navigate\", dateSelect: \"dateSelect\" }, exportAs: [\"ngbDatepicker\"], features: [ɵngcc0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbDatepicker), multi: true }, NgbDatepickerService]), ɵngcc0.ɵɵNgOnChangesFeature], decls: 10, vars: 5, consts: [[\"defaultDayTemplate\", \"\"], [\"defaultContentTemplate\", \"\"], [1, \"ngb-dp-header\"], [3, \"date\", \"months\", \"disabled\", \"showSelect\", \"prevDisabled\", \"nextDisabled\", \"selectBoxes\", \"navigate\", \"select\", 4, \"ngIf\"], [1, \"ngb-dp-content\"], [\"content\", \"\"], [3, \"ngTemplateOutlet\"], [\"ngbDatepickerDayView\", \"\", 3, \"date\", \"currentMonth\", \"selected\", \"disabled\", \"focused\"], [\"class\", \"ngb-dp-month\", 4, \"ngFor\", \"ngForOf\"], [1, \"ngb-dp-month\"], [\"class\", \"ngb-dp-month-name\", 4, \"ngIf\"], [3, \"month\"], [1, \"ngb-dp-month-name\"], [3, \"date\", \"months\", \"disabled\", \"showSelect\", \"prevDisabled\", \"nextDisabled\", \"selectBoxes\", \"navigate\", \"select\"]], template: function NgbDatepicker_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵtemplate(0, NgbDatepicker_ng_template_0_Template, 1, 5, \"ng-template\", null, 0, ɵngcc0.ɵɵtemplateRefExtractor);\n        ɵngcc0.ɵɵtemplate(2, NgbDatepicker_ng_template_2_Template, 1, 1, \"ng-template\", null, 1, ɵngcc0.ɵɵtemplateRefExtractor);\n        ɵngcc0.ɵɵelementStart(4, \"div\", 2);\n        ɵngcc0.ɵɵtemplate(5, NgbDatepicker_ngb_datepicker_navigation_5_Template, 1, 7, \"ngb-datepicker-navigation\", 3);\n        ɵngcc0.ɵɵelementEnd();\n        ɵngcc0.ɵɵelementStart(6, \"div\", 4, 5);\n        ɵngcc0.ɵɵtemplate(8, NgbDatepicker_ng_template_8_Template, 0, 0, \"ng-template\", 6);\n        ɵngcc0.ɵɵelementEnd();\n        ɵngcc0.ɵɵtemplate(9, NgbDatepicker_ng_template_9_Template, 0, 0, \"ng-template\", 6);\n    } if (rf & 2) {\n        const _r2 = ɵngcc0.ɵɵreference(3);\n        ɵngcc0.ɵɵadvance(5);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.navigation !== \"none\");\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵclassProp(\"ngb-dp-months\", !ctx.contentTemplate);\n        ɵngcc0.ɵɵadvance(2);\n        ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", (ctx.contentTemplate == null ? null : ctx.contentTemplate.templateRef) || _r2);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", ctx.footerTemplate);\n    } }, directives: function () { return [ɵngcc1.NgIf, ɵngcc1.NgTemplateOutlet, NgbDatepickerDayView, ɵngcc1.NgForOf, NgbDatepickerMonth, NgbDatepickerNavigation]; }, styles: [\"ngb-datepicker{border:1px solid #dfdfdf;border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}.ngb-dp-body{z-index:1050}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}\"], encapsulation: 2, changeDetection: 0 });\nNgbDatepicker.ctorParameters = () => [\n    { type: NgbDatepickerService },\n    { type: NgbCalendar },\n    { type: NgbDatepickerI18n },\n    { type: NgbDatepickerConfig },\n    { type: ChangeDetectorRef },\n    { type: ElementRef },\n    { type: NgbDateAdapter },\n    { type: NgZone }\n];\nNgbDatepicker.propDecorators = {\n    _defaultDayTemplate: [{ type: ViewChild, args: ['defaultDayTemplate', { static: true },] }],\n    _contentEl: [{ type: ViewChild, args: ['content', { static: true },] }],\n    contentTemplate: [{ type: ContentChild, args: [NgbDatepickerContent, { static: true },] }],\n    dayTemplate: [{ type: Input }],\n    dayTemplateData: [{ type: Input }],\n    displayMonths: [{ type: Input }],\n    firstDayOfWeek: [{ type: Input }],\n    footerTemplate: [{ type: Input }],\n    markDisabled: [{ type: Input }],\n    maxDate: [{ type: Input }],\n    minDate: [{ type: Input }],\n    navigation: [{ type: Input }],\n    outsideDays: [{ type: Input }],\n    showWeekNumbers: [{ type: Input }],\n    startDate: [{ type: Input }],\n    weekdays: [{ type: Input }],\n    navigate: [{ type: Output }],\n    dateSelect: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDatepicker, [{\n        type: Component,\n        args: [{\n                exportAs: 'ngbDatepicker',\n                selector: 'ngb-datepicker',\n                changeDetection: ChangeDetectionStrategy.OnPush,\n                encapsulation: ViewEncapsulation.None,\n                template: `\n    <ng-template #defaultDayTemplate let-date=\"date\" let-currentMonth=\"currentMonth\" let-selected=\"selected\"\n                 let-disabled=\"disabled\" let-focused=\"focused\">\n      <div ngbDatepickerDayView\n        [date]=\"date\"\n        [currentMonth]=\"currentMonth\"\n        [selected]=\"selected\"\n        [disabled]=\"disabled\"\n        [focused]=\"focused\">\n      </div>\n    </ng-template>\n\n    <ng-template #defaultContentTemplate>\n      <div *ngFor=\"let month of model.months; let i = index;\" class=\"ngb-dp-month\">\n        <div *ngIf=\"navigation === 'none' || (displayMonths > 1 && navigation === 'select')\" class=\"ngb-dp-month-name\">\n          {{ i18n.getMonthLabel(month.firstDate) }}\n        </div>\n        <ngb-datepicker-month [month]=\"month.firstDate\"></ngb-datepicker-month>\n      </div>\n    </ng-template>\n\n    <div class=\"ngb-dp-header\">\n      <ngb-datepicker-navigation *ngIf=\"navigation !== 'none'\"\n        [date]=\"model.firstDate!\"\n        [months]=\"model.months\"\n        [disabled]=\"model.disabled\"\n        [showSelect]=\"model.navigation === 'select'\"\n        [prevDisabled]=\"model.prevDisabled\"\n        [nextDisabled]=\"model.nextDisabled\"\n        [selectBoxes]=\"model.selectBoxes\"\n        (navigate)=\"onNavigateEvent($event)\"\n        (select)=\"onNavigateDateSelect($event)\">\n      </ngb-datepicker-navigation>\n    </div>\n\n    <div class=\"ngb-dp-content\" [class.ngb-dp-months]=\"!contentTemplate\" #content>\n      <ng-template [ngTemplateOutlet]=\"contentTemplate?.templateRef || defaultContentTemplate\"></ng-template>\n    </div>\n\n    <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n  `,\n                providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbDatepicker), multi: true }, NgbDatepickerService],\n                styles: [\"ngb-datepicker{border:1px solid #dfdfdf;border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}.ngb-dp-body{z-index:1050}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}\"]\n            }]\n    }], function () { return [{ type: NgbDatepickerService }, { type: NgbCalendar }, { type: NgbDatepickerI18n }, { type: NgbDatepickerConfig }, { type: ɵngcc0.ChangeDetectorRef }, { type: ɵngcc0.ElementRef }, { type: NgbDateAdapter }, { type: ɵngcc0.NgZone }]; }, { navigate: [{\n            type: Output\n        }], dateSelect: [{\n            type: Output\n        }], dayTemplate: [{\n            type: Input\n        }], _defaultDayTemplate: [{\n            type: ViewChild,\n            args: ['defaultDayTemplate', { static: true }]\n        }], _contentEl: [{\n            type: ViewChild,\n            args: ['content', { static: true }]\n        }], contentTemplate: [{\n            type: ContentChild,\n            args: [NgbDatepickerContent, { static: true }]\n        }], dayTemplateData: [{\n            type: Input\n        }], displayMonths: [{\n            type: Input\n        }], firstDayOfWeek: [{\n            type: Input\n        }], footerTemplate: [{\n            type: Input\n        }], markDisabled: [{\n            type: Input\n        }], maxDate: [{\n            type: Input\n        }], minDate: [{\n            type: Input\n        }], navigation: [{\n            type: Input\n        }], outsideDays: [{\n            type: Input\n        }], showWeekNumbers: [{\n            type: Input\n        }], startDate: [{\n            type: Input\n        }], weekdays: [{\n            type: Input\n        }] }); })();\n\nvar Key;\n(function (Key) {\n    Key[Key[\"Tab\"] = 9] = \"Tab\";\n    Key[Key[\"Enter\"] = 13] = \"Enter\";\n    Key[Key[\"Escape\"] = 27] = \"Escape\";\n    Key[Key[\"Space\"] = 32] = \"Space\";\n    Key[Key[\"PageUp\"] = 33] = \"PageUp\";\n    Key[Key[\"PageDown\"] = 34] = \"PageDown\";\n    Key[Key[\"End\"] = 35] = \"End\";\n    Key[Key[\"Home\"] = 36] = \"Home\";\n    Key[Key[\"ArrowLeft\"] = 37] = \"ArrowLeft\";\n    Key[Key[\"ArrowUp\"] = 38] = \"ArrowUp\";\n    Key[Key[\"ArrowRight\"] = 39] = \"ArrowRight\";\n    Key[Key[\"ArrowDown\"] = 40] = \"ArrowDown\";\n})(Key || (Key = {}));\n\n/**\n * A service that represents the keyboard navigation.\n *\n * Default keyboard shortcuts [are documented in the overview](#/components/datepicker/overview#keyboard-shortcuts)\n *\n * @since 5.2.0\n */\nclass NgbDatepickerKeyboardService {\n    /**\n     * Processes a keyboard event.\n     */\n    processKey(event, datepicker) {\n        const { state, calendar } = datepicker;\n        // tslint:disable-next-line:deprecation\n        switch (event.which) {\n            case Key.PageUp:\n                datepicker.focusDate(calendar.getPrev(state.focusedDate, event.shiftKey ? 'y' : 'm', 1));\n                break;\n            case Key.PageDown:\n                datepicker.focusDate(calendar.getNext(state.focusedDate, event.shiftKey ? 'y' : 'm', 1));\n                break;\n            case Key.End:\n                datepicker.focusDate(event.shiftKey ? state.maxDate : state.lastDate);\n                break;\n            case Key.Home:\n                datepicker.focusDate(event.shiftKey ? state.minDate : state.firstDate);\n                break;\n            case Key.ArrowLeft:\n                datepicker.focusDate(calendar.getPrev(state.focusedDate, 'd', 1));\n                break;\n            case Key.ArrowUp:\n                datepicker.focusDate(calendar.getPrev(state.focusedDate, 'd', calendar.getDaysPerWeek()));\n                break;\n            case Key.ArrowRight:\n                datepicker.focusDate(calendar.getNext(state.focusedDate, 'd', 1));\n                break;\n            case Key.ArrowDown:\n                datepicker.focusDate(calendar.getNext(state.focusedDate, 'd', calendar.getDaysPerWeek()));\n                break;\n            case Key.Enter:\n            case Key.Space:\n                datepicker.focusSelect();\n                break;\n            default:\n                return;\n        }\n        event.preventDefault();\n        event.stopPropagation();\n    }\n}\nNgbDatepickerKeyboardService.ɵfac = function NgbDatepickerKeyboardService_Factory(t) { return new (t || NgbDatepickerKeyboardService)(); };\nNgbDatepickerKeyboardService.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbDatepickerKeyboardService_Factory() { return new NgbDatepickerKeyboardService(); }, token: NgbDatepickerKeyboardService, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDatepickerKeyboardService, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], null, null); })();\n\n/**\n * A component that renders one month including all the days, weekdays and week numbers. Can be used inside\n * the `<ng-template ngbDatepickerMonths></ng-template>` when you want to customize months layout.\n *\n * For a usage example, see [custom month layout demo](#/components/datepicker/examples#custommonth)\n *\n * @since 5.3.0\n */\nclass NgbDatepickerMonth {\n    constructor(i18n, datepicker, _keyboardService, _service) {\n        this.i18n = i18n;\n        this.datepicker = datepicker;\n        this._keyboardService = _keyboardService;\n        this._service = _service;\n    }\n    /**\n     * The first date of month to be rendered.\n     *\n     * This month must one of the months present in the\n     * [datepicker state](#/components/datepicker/api#NgbDatepickerState).\n     */\n    set month(month) {\n        this.viewModel = this._service.getMonth(month);\n    }\n    onKeyDown(event) { this._keyboardService.processKey(event, this.datepicker); }\n    doSelect(day) {\n        if (!day.context.disabled && !day.hidden) {\n            this.datepicker.onDateSelect(day.date);\n        }\n    }\n}\nNgbDatepickerMonth.ɵfac = function NgbDatepickerMonth_Factory(t) { return new (t || NgbDatepickerMonth)(ɵngcc0.ɵɵdirectiveInject(NgbDatepickerI18n), ɵngcc0.ɵɵdirectiveInject(NgbDatepicker), ɵngcc0.ɵɵdirectiveInject(NgbDatepickerKeyboardService), ɵngcc0.ɵɵdirectiveInject(NgbDatepickerService)); };\nNgbDatepickerMonth.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbDatepickerMonth, selectors: [[\"ngb-datepicker-month\"]], hostAttrs: [\"role\", \"grid\"], hostBindings: function NgbDatepickerMonth_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"keydown\", function NgbDatepickerMonth_keydown_HostBindingHandler($event) { return ctx.onKeyDown($event); });\n    } }, inputs: { month: \"month\" }, decls: 2, vars: 2, consts: [[\"class\", \"ngb-dp-week ngb-dp-weekdays\", \"role\", \"row\", 4, \"ngIf\"], [\"ngFor\", \"\", 3, \"ngForOf\"], [\"role\", \"row\", 1, \"ngb-dp-week\", \"ngb-dp-weekdays\"], [\"class\", \"ngb-dp-weekday ngb-dp-showweek small\", 4, \"ngIf\"], [\"class\", \"ngb-dp-weekday small\", \"role\", \"columnheader\", 4, \"ngFor\", \"ngForOf\"], [1, \"ngb-dp-weekday\", \"ngb-dp-showweek\", \"small\"], [\"role\", \"columnheader\", 1, \"ngb-dp-weekday\", \"small\"], [\"class\", \"ngb-dp-week\", \"role\", \"row\", 4, \"ngIf\"], [\"role\", \"row\", 1, \"ngb-dp-week\"], [\"class\", \"ngb-dp-week-number small text-muted\", 4, \"ngIf\"], [\"class\", \"ngb-dp-day\", \"role\", \"gridcell\", 3, \"disabled\", \"tabindex\", \"hidden\", \"ngb-dp-today\", \"click\", 4, \"ngFor\", \"ngForOf\"], [1, \"ngb-dp-week-number\", \"small\", \"text-muted\"], [\"role\", \"gridcell\", 1, \"ngb-dp-day\", 3, \"tabindex\", \"click\"], [3, \"ngIf\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"]], template: function NgbDatepickerMonth_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵtemplate(0, NgbDatepickerMonth_div_0_Template, 3, 2, \"div\", 0);\n        ɵngcc0.ɵɵtemplate(1, NgbDatepickerMonth_ng_template_1_Template, 1, 1, \"ng-template\", 1);\n    } if (rf & 2) {\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.viewModel.weekdays.length > 0);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngForOf\", ctx.viewModel.weeks);\n    } }, directives: [ɵngcc1.NgIf, ɵngcc1.NgForOf, ɵngcc1.NgTemplateOutlet], styles: [\"ngb-datepicker-month{display:block}.ngb-dp-week-number,.ngb-dp-weekday{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:#5bc0de;color:var(--info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid rgba(0,0,0,.125);border-radius:0;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-day,.ngb-dp-week-number,.ngb-dp-weekday{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex=\\\"0\\\"]{z-index:1}\"], encapsulation: 2 });\nNgbDatepickerMonth.ctorParameters = () => [\n    { type: NgbDatepickerI18n },\n    { type: NgbDatepicker },\n    { type: NgbDatepickerKeyboardService },\n    { type: NgbDatepickerService }\n];\nNgbDatepickerMonth.propDecorators = {\n    month: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDatepickerMonth, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-datepicker-month',\n                host: { 'role': 'grid', '(keydown)': 'onKeyDown($event)' },\n                encapsulation: ViewEncapsulation.None,\n                template: `\n    <div *ngIf=\"viewModel.weekdays.length > 0\" class=\"ngb-dp-week ngb-dp-weekdays\" role=\"row\">\n      <div *ngIf=\"datepicker.showWeekNumbers\" class=\"ngb-dp-weekday ngb-dp-showweek small\">{{ i18n.getWeekLabel() }}</div>\n      <div *ngFor=\"let weekday of viewModel.weekdays\" class=\"ngb-dp-weekday small\" role=\"columnheader\">{{ weekday }}</div>\n    </div>\n    <ng-template ngFor let-week [ngForOf]=\"viewModel.weeks\">\n      <div *ngIf=\"!week.collapsed\" class=\"ngb-dp-week\" role=\"row\">\n        <div *ngIf=\"datepicker.showWeekNumbers\" class=\"ngb-dp-week-number small text-muted\">{{ i18n.getWeekNumerals(week.number) }}</div>\n        <div *ngFor=\"let day of week.days\" (click)=\"doSelect(day); $event.preventDefault()\" class=\"ngb-dp-day\" role=\"gridcell\"\n             [class.disabled]=\"day.context.disabled\"\n             [tabindex]=\"day.tabindex\"\n             [class.hidden]=\"day.hidden\"\n             [class.ngb-dp-today]=\"day.context.today\"\n             [attr.aria-label]=\"day.ariaLabel\">\n          <ng-template [ngIf]=\"!day.hidden\">\n            <ng-template [ngTemplateOutlet]=\"datepicker.dayTemplate\" [ngTemplateOutletContext]=\"day.context\"></ng-template>\n          </ng-template>\n        </div>\n      </div>\n    </ng-template>\n  `,\n                styles: [\"ngb-datepicker-month{display:block}.ngb-dp-week-number,.ngb-dp-weekday{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:#5bc0de;color:var(--info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid rgba(0,0,0,.125);border-radius:0;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-day,.ngb-dp-week-number,.ngb-dp-weekday{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex=\\\"0\\\"]{z-index:1}\"]\n            }]\n    }], function () { return [{ type: NgbDatepickerI18n }, { type: NgbDatepicker }, { type: NgbDatepickerKeyboardService }, { type: NgbDatepickerService }]; }, { month: [{\n            type: Input\n        }] }); })();\n\nclass NgbDatepickerNavigation {\n    constructor(i18n) {\n        this.i18n = i18n;\n        this.navigation = NavigationEvent;\n        this.months = [];\n        this.navigate = new EventEmitter();\n        this.select = new EventEmitter();\n    }\n    onClickPrev(event) {\n        event.currentTarget.focus();\n        this.navigate.emit(this.navigation.PREV);\n    }\n    onClickNext(event) {\n        event.currentTarget.focus();\n        this.navigate.emit(this.navigation.NEXT);\n    }\n}\nNgbDatepickerNavigation.ɵfac = function NgbDatepickerNavigation_Factory(t) { return new (t || NgbDatepickerNavigation)(ɵngcc0.ɵɵdirectiveInject(NgbDatepickerI18n)); };\nNgbDatepickerNavigation.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbDatepickerNavigation, selectors: [[\"ngb-datepicker-navigation\"]], inputs: { months: \"months\", date: \"date\", disabled: \"disabled\", showSelect: \"showSelect\", prevDisabled: \"prevDisabled\", nextDisabled: \"nextDisabled\", selectBoxes: \"selectBoxes\" }, outputs: { navigate: \"navigate\", select: \"select\" }, decls: 8, vars: 4, consts: function () { let i18n_12; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_datepicker_previous_month$$FESM2015_NG_BOOTSTRAP_JS_13 = goog.getMsg(\"Previous month\");\n        i18n_12 = MSG_EXTERNAL_ngb_datepicker_previous_month$$FESM2015_NG_BOOTSTRAP_JS_13;\n    }\n    else {\n        i18n_12 = $localize `:@@ngb.datepicker.previous-month␟c3b08b07b5ab98e7cdcf18df39355690ab7d3884␟8586908745456864217:Previous month`;\n    } let i18n_14; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_datepicker_previous_month$$FESM2015_NG_BOOTSTRAP_JS_15 = goog.getMsg(\"Previous month\");\n        i18n_14 = MSG_EXTERNAL_ngb_datepicker_previous_month$$FESM2015_NG_BOOTSTRAP_JS_15;\n    }\n    else {\n        i18n_14 = $localize `:@@ngb.datepicker.previous-month␟c3b08b07b5ab98e7cdcf18df39355690ab7d3884␟8586908745456864217:Previous month`;\n    } let i18n_16; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_datepicker_next_month$$FESM2015_NG_BOOTSTRAP_JS_17 = goog.getMsg(\"Next month\");\n        i18n_16 = MSG_EXTERNAL_ngb_datepicker_next_month$$FESM2015_NG_BOOTSTRAP_JS_17;\n    }\n    else {\n        i18n_16 = $localize `:@@ngb.datepicker.next-month␟4bd046985cfe13040d5ef0cd881edce0968a111a␟3628374603023447227:Next month`;\n    } let i18n_18; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_datepicker_next_month$$FESM2015_NG_BOOTSTRAP_JS_19 = goog.getMsg(\"Next month\");\n        i18n_18 = MSG_EXTERNAL_ngb_datepicker_next_month$$FESM2015_NG_BOOTSTRAP_JS_19;\n    }\n    else {\n        i18n_18 = $localize `:@@ngb.datepicker.next-month␟4bd046985cfe13040d5ef0cd881edce0968a111a␟3628374603023447227:Next month`;\n    } return [[1, \"ngb-dp-arrow\"], [\"type\", \"button\", \"aria-label\", i18n_12, \"title\", i18n_14, 1, \"btn\", \"btn-link\", \"ngb-dp-arrow-btn\", 3, \"disabled\", \"click\"], [1, \"ngb-dp-navigation-chevron\"], [\"class\", \"ngb-dp-navigation-select\", 3, \"date\", \"disabled\", \"months\", \"years\", \"select\", 4, \"ngIf\"], [4, \"ngIf\"], [1, \"ngb-dp-arrow\", \"right\"], [\"type\", \"button\", \"aria-label\", i18n_16, \"title\", i18n_18, 1, \"btn\", \"btn-link\", \"ngb-dp-arrow-btn\", 3, \"disabled\", \"click\"], [1, \"ngb-dp-navigation-select\", 3, \"date\", \"disabled\", \"months\", \"years\", \"select\"], [\"ngFor\", \"\", 3, \"ngForOf\"], [\"class\", \"ngb-dp-arrow\", 4, \"ngIf\"], [1, \"ngb-dp-month-name\"]]; }, template: function NgbDatepickerNavigation_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵelementStart(0, \"div\", 0);\n        ɵngcc0.ɵɵelementStart(1, \"button\", 1);\n        ɵngcc0.ɵɵlistener(\"click\", function NgbDatepickerNavigation_Template_button_click_1_listener($event) { return ctx.onClickPrev($event); });\n        ɵngcc0.ɵɵelement(2, \"span\", 2);\n        ɵngcc0.ɵɵelementEnd();\n        ɵngcc0.ɵɵelementEnd();\n        ɵngcc0.ɵɵtemplate(3, NgbDatepickerNavigation_ngb_datepicker_navigation_select_3_Template, 1, 4, \"ngb-datepicker-navigation-select\", 3);\n        ɵngcc0.ɵɵtemplate(4, NgbDatepickerNavigation_4_Template, 1, 1, undefined, 4);\n        ɵngcc0.ɵɵelementStart(5, \"div\", 5);\n        ɵngcc0.ɵɵelementStart(6, \"button\", 6);\n        ɵngcc0.ɵɵlistener(\"click\", function NgbDatepickerNavigation_Template_button_click_6_listener($event) { return ctx.onClickNext($event); });\n        ɵngcc0.ɵɵelement(7, \"span\", 2);\n        ɵngcc0.ɵɵelementEnd();\n        ɵngcc0.ɵɵelementEnd();\n    } if (rf & 2) {\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"disabled\", ctx.prevDisabled);\n        ɵngcc0.ɵɵadvance(2);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.showSelect);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", !ctx.showSelect);\n        ɵngcc0.ɵɵadvance(2);\n        ɵngcc0.ɵɵproperty(\"disabled\", ctx.nextDisabled);\n    } }, directives: function () { return [ɵngcc1.NgIf, NgbDatepickerNavigationSelect, ɵngcc1.NgForOf]; }, styles: [\"ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{justify-content:flex-end}.ngb-dp-arrow.right .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media (-ms-high-contrast:active),(-ms-high-contrast:none){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem}\"], encapsulation: 2, changeDetection: 0 });\nNgbDatepickerNavigation.ctorParameters = () => [\n    { type: NgbDatepickerI18n }\n];\nNgbDatepickerNavigation.propDecorators = {\n    date: [{ type: Input }],\n    disabled: [{ type: Input }],\n    months: [{ type: Input }],\n    showSelect: [{ type: Input }],\n    prevDisabled: [{ type: Input }],\n    nextDisabled: [{ type: Input }],\n    selectBoxes: [{ type: Input }],\n    navigate: [{ type: Output }],\n    select: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDatepickerNavigation, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-datepicker-navigation',\n                changeDetection: ChangeDetectionStrategy.OnPush,\n                encapsulation: ViewEncapsulation.None,\n                template: `\n    <div class=\"ngb-dp-arrow\">\n      <button type=\"button\" class=\"btn btn-link ngb-dp-arrow-btn\" (click)=\"onClickPrev($event)\" [disabled]=\"prevDisabled\"\n              i18n-aria-label=\"@@ngb.datepicker.previous-month\" aria-label=\"Previous month\"\n              i18n-title=\"@@ngb.datepicker.previous-month\" title=\"Previous month\">\n        <span class=\"ngb-dp-navigation-chevron\"></span>\n      </button>\n    </div>\n    <ngb-datepicker-navigation-select *ngIf=\"showSelect\" class=\"ngb-dp-navigation-select\"\n      [date]=\"date\"\n      [disabled] = \"disabled\"\n      [months]=\"selectBoxes.months\"\n      [years]=\"selectBoxes.years\"\n      (select)=\"select.emit($event)\">\n    </ngb-datepicker-navigation-select>\n\n    <ng-template *ngIf=\"!showSelect\" ngFor let-month [ngForOf]=\"months\" let-i=\"index\">\n      <div class=\"ngb-dp-arrow\" *ngIf=\"i > 0\"></div>\n      <div class=\"ngb-dp-month-name\">\n        {{ i18n.getMonthLabel(month.firstDate) }}\n      </div>\n      <div class=\"ngb-dp-arrow\" *ngIf=\"i !== months.length - 1\"></div>\n    </ng-template>\n    <div class=\"ngb-dp-arrow right\">\n      <button type=\"button\" class=\"btn btn-link ngb-dp-arrow-btn\" (click)=\"onClickNext($event)\" [disabled]=\"nextDisabled\"\n              i18n-aria-label=\"@@ngb.datepicker.next-month\" aria-label=\"Next month\"\n              i18n-title=\"@@ngb.datepicker.next-month\" title=\"Next month\">\n        <span class=\"ngb-dp-navigation-chevron\"></span>\n      </button>\n    </div>\n    `,\n                styles: [\"ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{justify-content:flex-end}.ngb-dp-arrow.right .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media (-ms-high-contrast:active),(-ms-high-contrast:none){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem}\"]\n            }]\n    }], function () { return [{ type: NgbDatepickerI18n }]; }, { months: [{\n            type: Input\n        }], navigate: [{\n            type: Output\n        }], select: [{\n            type: Output\n        }], date: [{\n            type: Input\n        }], disabled: [{\n            type: Input\n        }], showSelect: [{\n            type: Input\n        }], prevDisabled: [{\n            type: Input\n        }], nextDisabled: [{\n            type: Input\n        }], selectBoxes: [{\n            type: Input\n        }] }); })();\n\nconst isContainedIn = (element, array) => array ? array.some(item => item.contains(element)) : false;\nconst ɵ0$3 = isContainedIn;\nconst matchesSelectorIfAny = (element, selector) => !selector || closest(element, selector) != null;\nconst ɵ1 = matchesSelectorIfAny;\nconst ɵ2 = () => {\n    const isIOS = () => /iPad|iPhone|iPod/.test(navigator.userAgent) ||\n        (/Macintosh/.test(navigator.userAgent) && navigator.maxTouchPoints && navigator.maxTouchPoints > 2);\n    const isAndroid = () => /Android/.test(navigator.userAgent);\n    return typeof navigator !== 'undefined' ? !!navigator.userAgent && (isIOS() || isAndroid()) : false;\n};\n// we have to add a more significant delay to avoid re-opening when handling (click) on a toggling element\n// TODO: use proper Angular platform detection when NgbAutoClose becomes a service and we can inject PLATFORM_ID\nconst isMobile = (ɵ2)();\n// setting 'ngbAutoClose' synchronously on mobile results in immediate popup closing\n// when tapping on the triggering element\nconst wrapAsyncForMobile = fn => isMobile ? () => setTimeout(() => fn(), 100) : fn;\nconst ɵ3 = wrapAsyncForMobile;\nfunction ngbAutoClose(zone, document, type, close, closed$, insideElements, ignoreElements, insideSelector) {\n    // closing on ESC and outside clicks\n    if (type) {\n        zone.runOutsideAngular(wrapAsyncForMobile(() => {\n            const shouldCloseOnClick = (event) => {\n                const element = event.target;\n                if (event.button === 2 || isContainedIn(element, ignoreElements)) {\n                    return false;\n                }\n                if (type === 'inside') {\n                    return isContainedIn(element, insideElements) && matchesSelectorIfAny(element, insideSelector);\n                }\n                else if (type === 'outside') {\n                    return !isContainedIn(element, insideElements);\n                }\n                else /* if (type === true) */ {\n                    return matchesSelectorIfAny(element, insideSelector) || !isContainedIn(element, insideElements);\n                }\n            };\n            const escapes$ = fromEvent(document, 'keydown')\n                .pipe(takeUntil(closed$), \n            // tslint:disable-next-line:deprecation\n            filter(e => e.which === Key.Escape), tap(e => e.preventDefault()));\n            // we have to pre-calculate 'shouldCloseOnClick' on 'mousedown',\n            // because on 'mouseup' DOM nodes might be detached\n            const mouseDowns$ = fromEvent(document, 'mousedown').pipe(map(shouldCloseOnClick), takeUntil(closed$));\n            const closeableClicks$ = fromEvent(document, 'mouseup')\n                .pipe(withLatestFrom(mouseDowns$), filter(([_, shouldClose]) => shouldClose), delay(0), takeUntil(closed$));\n            race([\n                escapes$.pipe(map(_ => 0 /* ESCAPE */)), closeableClicks$.pipe(map(_ => 1 /* CLICK */))\n            ]).subscribe((source) => zone.run(() => close(source)));\n        }));\n    }\n}\n\nconst FOCUSABLE_ELEMENTS_SELECTOR = [\n    'a[href]', 'button:not([disabled])', 'input:not([disabled]):not([type=\"hidden\"])', 'select:not([disabled])',\n    'textarea:not([disabled])', '[contenteditable]', '[tabindex]:not([tabindex=\"-1\"])'\n].join(', ');\n/**\n * Returns first and last focusable elements inside of a given element based on specific CSS selector\n */\nfunction getFocusableBoundaryElements(element) {\n    const list = Array.from(element.querySelectorAll(FOCUSABLE_ELEMENTS_SELECTOR))\n        .filter(el => el.tabIndex !== -1);\n    return [list[0], list[list.length - 1]];\n}\n/**\n * Function that enforces browser focus to be trapped inside a DOM element.\n *\n * Works only for clicks inside the element and navigation with 'Tab', ignoring clicks outside of the element\n *\n * @param zone Angular zone\n * @param element The element around which focus will be trapped inside\n * @param stopFocusTrap$ The observable stream. When completed the focus trap will clean up listeners\n * and free internal resources\n * @param refocusOnClick Put the focus back to the last focused element whenever a click occurs on element (default to\n * false)\n */\nconst ngbFocusTrap = (zone, element, stopFocusTrap$, refocusOnClick = false) => {\n    zone.runOutsideAngular(() => {\n        // last focused element\n        const lastFocusedElement$ = fromEvent(element, 'focusin').pipe(takeUntil(stopFocusTrap$), map(e => e.target));\n        // 'tab' / 'shift+tab' stream\n        fromEvent(element, 'keydown')\n            .pipe(takeUntil(stopFocusTrap$), \n        // tslint:disable:deprecation\n        filter(e => e.which === Key.Tab), \n        // tslint:enable:deprecation\n        withLatestFrom(lastFocusedElement$))\n            .subscribe(([tabEvent, focusedElement]) => {\n            const [first, last] = getFocusableBoundaryElements(element);\n            if ((focusedElement === first || focusedElement === element) && tabEvent.shiftKey) {\n                last.focus();\n                tabEvent.preventDefault();\n            }\n            if (focusedElement === last && !tabEvent.shiftKey) {\n                first.focus();\n                tabEvent.preventDefault();\n            }\n        });\n        // inside click\n        if (refocusOnClick) {\n            fromEvent(element, 'click')\n                .pipe(takeUntil(stopFocusTrap$), withLatestFrom(lastFocusedElement$), map(arr => arr[1]))\n                .subscribe(lastFocusedElement => lastFocusedElement.focus());\n        }\n    });\n};\n\n// previous version:\n// https://github.com/angular-ui/bootstrap/blob/07c31d0731f7cb068a1932b8e01d2312b796b4ec/src/position/position.js\nclass Positioning {\n    getAllStyles(element) { return window.getComputedStyle(element); }\n    getStyle(element, prop) { return this.getAllStyles(element)[prop]; }\n    isStaticPositioned(element) {\n        return (this.getStyle(element, 'position') || 'static') === 'static';\n    }\n    offsetParent(element) {\n        let offsetParentEl = element.offsetParent || document.documentElement;\n        while (offsetParentEl && offsetParentEl !== document.documentElement && this.isStaticPositioned(offsetParentEl)) {\n            offsetParentEl = offsetParentEl.offsetParent;\n        }\n        return offsetParentEl || document.documentElement;\n    }\n    position(element, round = true) {\n        let elPosition;\n        let parentOffset = { width: 0, height: 0, top: 0, bottom: 0, left: 0, right: 0 };\n        if (this.getStyle(element, 'position') === 'fixed') {\n            elPosition = element.getBoundingClientRect();\n            elPosition = {\n                top: elPosition.top,\n                bottom: elPosition.bottom,\n                left: elPosition.left,\n                right: elPosition.right,\n                height: elPosition.height,\n                width: elPosition.width\n            };\n        }\n        else {\n            const offsetParentEl = this.offsetParent(element);\n            elPosition = this.offset(element, false);\n            if (offsetParentEl !== document.documentElement) {\n                parentOffset = this.offset(offsetParentEl, false);\n            }\n            parentOffset.top += offsetParentEl.clientTop;\n            parentOffset.left += offsetParentEl.clientLeft;\n        }\n        elPosition.top -= parentOffset.top;\n        elPosition.bottom -= parentOffset.top;\n        elPosition.left -= parentOffset.left;\n        elPosition.right -= parentOffset.left;\n        if (round) {\n            elPosition.top = Math.round(elPosition.top);\n            elPosition.bottom = Math.round(elPosition.bottom);\n            elPosition.left = Math.round(elPosition.left);\n            elPosition.right = Math.round(elPosition.right);\n        }\n        return elPosition;\n    }\n    offset(element, round = true) {\n        const elBcr = element.getBoundingClientRect();\n        const viewportOffset = {\n            top: window.pageYOffset - document.documentElement.clientTop,\n            left: window.pageXOffset - document.documentElement.clientLeft\n        };\n        let elOffset = {\n            height: elBcr.height || element.offsetHeight,\n            width: elBcr.width || element.offsetWidth,\n            top: elBcr.top + viewportOffset.top,\n            bottom: elBcr.bottom + viewportOffset.top,\n            left: elBcr.left + viewportOffset.left,\n            right: elBcr.right + viewportOffset.left\n        };\n        if (round) {\n            elOffset.height = Math.round(elOffset.height);\n            elOffset.width = Math.round(elOffset.width);\n            elOffset.top = Math.round(elOffset.top);\n            elOffset.bottom = Math.round(elOffset.bottom);\n            elOffset.left = Math.round(elOffset.left);\n            elOffset.right = Math.round(elOffset.right);\n        }\n        return elOffset;\n    }\n    /*\n      Return false if the element to position is outside the viewport\n    */\n    positionElements(hostElement, targetElement, placement, appendToBody) {\n        const [placementPrimary = 'top', placementSecondary = 'center'] = placement.split('-');\n        const hostElPosition = appendToBody ? this.offset(hostElement, false) : this.position(hostElement, false);\n        const targetElStyles = this.getAllStyles(targetElement);\n        const marginTop = parseFloat(targetElStyles.marginTop);\n        const marginBottom = parseFloat(targetElStyles.marginBottom);\n        const marginLeft = parseFloat(targetElStyles.marginLeft);\n        const marginRight = parseFloat(targetElStyles.marginRight);\n        let topPosition = 0;\n        let leftPosition = 0;\n        switch (placementPrimary) {\n            case 'top':\n                topPosition = (hostElPosition.top - (targetElement.offsetHeight + marginTop + marginBottom));\n                break;\n            case 'bottom':\n                topPosition = (hostElPosition.top + hostElPosition.height);\n                break;\n            case 'left':\n                leftPosition = (hostElPosition.left - (targetElement.offsetWidth + marginLeft + marginRight));\n                break;\n            case 'right':\n                leftPosition = (hostElPosition.left + hostElPosition.width);\n                break;\n        }\n        switch (placementSecondary) {\n            case 'top':\n                topPosition = hostElPosition.top;\n                break;\n            case 'bottom':\n                topPosition = hostElPosition.top + hostElPosition.height - targetElement.offsetHeight;\n                break;\n            case 'left':\n                leftPosition = hostElPosition.left;\n                break;\n            case 'right':\n                leftPosition = hostElPosition.left + hostElPosition.width - targetElement.offsetWidth;\n                break;\n            case 'center':\n                if (placementPrimary === 'top' || placementPrimary === 'bottom') {\n                    leftPosition = (hostElPosition.left + hostElPosition.width / 2 - targetElement.offsetWidth / 2);\n                }\n                else {\n                    topPosition = (hostElPosition.top + hostElPosition.height / 2 - targetElement.offsetHeight / 2);\n                }\n                break;\n        }\n        /// The translate3d/gpu acceleration render a blurry text on chrome, the next line is commented until a browser fix\n        // targetElement.style.transform = `translate3d(${Math.round(leftPosition)}px, ${Math.floor(topPosition)}px, 0px)`;\n        targetElement.style.transform = `translate(${Math.round(leftPosition)}px, ${Math.round(topPosition)}px)`;\n        // Check if the targetElement is inside the viewport\n        const targetElBCR = targetElement.getBoundingClientRect();\n        const html = document.documentElement;\n        const windowHeight = window.innerHeight || html.clientHeight;\n        const windowWidth = window.innerWidth || html.clientWidth;\n        return targetElBCR.left >= 0 && targetElBCR.top >= 0 && targetElBCR.right <= windowWidth &&\n            targetElBCR.bottom <= windowHeight;\n    }\n}\nconst placementSeparator = /\\s+/;\nconst positionService = new Positioning();\n/*\n * Accept the placement array and applies the appropriate placement dependent on the viewport.\n * Returns the applied placement.\n * In case of auto placement, placements are selected in order\n *   'top', 'bottom', 'left', 'right',\n *   'top-left', 'top-right',\n *   'bottom-left', 'bottom-right',\n *   'left-top', 'left-bottom',\n *   'right-top', 'right-bottom'.\n * */\nfunction positionElements(hostElement, targetElement, placement, appendToBody, baseClass) {\n    let placementVals = Array.isArray(placement) ? placement : placement.split(placementSeparator);\n    const allowedPlacements = [\n        'top', 'bottom', 'left', 'right', 'top-left', 'top-right', 'bottom-left', 'bottom-right', 'left-top', 'left-bottom',\n        'right-top', 'right-bottom'\n    ];\n    const classList = targetElement.classList;\n    const addClassesToTarget = (targetPlacement) => {\n        const [primary, secondary] = targetPlacement.split('-');\n        const classes = [];\n        if (baseClass) {\n            classes.push(`${baseClass}-${primary}`);\n            if (secondary) {\n                classes.push(`${baseClass}-${primary}-${secondary}`);\n            }\n            classes.forEach((classname) => { classList.add(classname); });\n        }\n        return classes;\n    };\n    // Remove old placement classes to avoid issues\n    if (baseClass) {\n        allowedPlacements.forEach((placementToRemove) => { classList.remove(`${baseClass}-${placementToRemove}`); });\n    }\n    // replace auto placement with other placements\n    let hasAuto = placementVals.findIndex(val => val === 'auto');\n    if (hasAuto >= 0) {\n        allowedPlacements.forEach(function (obj) {\n            if (placementVals.find(val => val.search('^' + obj) !== -1) == null) {\n                placementVals.splice(hasAuto++, 1, obj);\n            }\n        });\n    }\n    // coordinates where to position\n    // Required for transform:\n    const style = targetElement.style;\n    style.position = 'absolute';\n    style.top = '0';\n    style.left = '0';\n    style['will-change'] = 'transform';\n    let testPlacement = null;\n    let isInViewport = false;\n    for (testPlacement of placementVals) {\n        let addedClasses = addClassesToTarget(testPlacement);\n        if (positionService.positionElements(hostElement, targetElement, testPlacement, appendToBody)) {\n            isInViewport = true;\n            break;\n        }\n        // Remove the baseClasses for further calculation\n        if (baseClass) {\n            addedClasses.forEach((classname) => { classList.remove(classname); });\n        }\n    }\n    if (!isInViewport) {\n        // If nothing match, the first placement is the default one\n        testPlacement = placementVals[0];\n        addClassesToTarget(testPlacement);\n        positionService.positionElements(hostElement, targetElement, testPlacement, appendToBody);\n    }\n    return testPlacement;\n}\n\nfunction NGB_DATEPICKER_PARSER_FORMATTER_FACTORY() {\n    return new NgbDateISOParserFormatter();\n}\n/**\n * An abstract service for parsing and formatting dates for the\n * [`NgbInputDatepicker`](#/components/datepicker/api#NgbInputDatepicker) directive.\n * Converts between the internal `NgbDateStruct` model presentation and a `string` that is displayed in the\n * input element.\n *\n * When user types something in the input this service attempts to parse it into a `NgbDateStruct` object.\n * And vice versa, when users selects a date in the calendar with the mouse, it must be displayed as a `string`\n * in the input.\n *\n * Default implementation uses the ISO 8601 format, but you can provide another implementation via DI\n * to use an alternative string format or a custom parsing logic.\n *\n * See the [date format overview](#/components/datepicker/overview#date-model) for more details.\n */\nclass NgbDateParserFormatter {\n}\nNgbDateParserFormatter.ɵfac = function NgbDateParserFormatter_Factory(t) { return new (t || NgbDateParserFormatter)(); };\nNgbDateParserFormatter.ɵprov = i0.ɵɵdefineInjectable({ factory: NGB_DATEPICKER_PARSER_FORMATTER_FACTORY, token: NgbDateParserFormatter, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDateParserFormatter, [{\n        type: Injectable,\n        args: [{ providedIn: 'root', useFactory: NGB_DATEPICKER_PARSER_FORMATTER_FACTORY }]\n    }], null, null); })();\nclass NgbDateISOParserFormatter extends NgbDateParserFormatter {\n    parse(value) {\n        if (value != null) {\n            const dateParts = value.trim().split('-');\n            if (dateParts.length === 1 && isNumber(dateParts[0])) {\n                return { year: toInteger(dateParts[0]), month: null, day: null };\n            }\n            else if (dateParts.length === 2 && isNumber(dateParts[0]) && isNumber(dateParts[1])) {\n                return { year: toInteger(dateParts[0]), month: toInteger(dateParts[1]), day: null };\n            }\n            else if (dateParts.length === 3 && isNumber(dateParts[0]) && isNumber(dateParts[1]) && isNumber(dateParts[2])) {\n                return { year: toInteger(dateParts[0]), month: toInteger(dateParts[1]), day: toInteger(dateParts[2]) };\n            }\n        }\n        return null;\n    }\n    format(date) {\n        return date ?\n            `${date.year}-${isNumber(date.month) ? padNumber(date.month) : ''}-${isNumber(date.day) ? padNumber(date.day) : ''}` :\n            '';\n    }\n}\nNgbDateISOParserFormatter.ɵfac = /*@__PURE__*/ function () { let ɵNgbDateISOParserFormatter_BaseFactory; return function NgbDateISOParserFormatter_Factory(t) { return (ɵNgbDateISOParserFormatter_BaseFactory || (ɵNgbDateISOParserFormatter_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NgbDateISOParserFormatter)))(t || NgbDateISOParserFormatter); }; }();\nNgbDateISOParserFormatter.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbDateISOParserFormatter, factory: NgbDateISOParserFormatter.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDateISOParserFormatter, [{\n        type: Injectable\n    }], null, null); })();\n\n/**\n * A configuration service for the [`NgbDatepickerInput`](#/components/datepicker/api#NgbDatepicker) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the datepicker inputs used in the application.\n *\n * @since 5.2.0\n */\nclass NgbInputDatepickerConfig extends NgbDatepickerConfig {\n    constructor() {\n        super(...arguments);\n        this.autoClose = true;\n        this.placement = ['bottom-left', 'bottom-right', 'top-left', 'top-right'];\n        this.restoreFocus = true;\n    }\n}\nNgbInputDatepickerConfig.ɵfac = /*@__PURE__*/ function () { let ɵNgbInputDatepickerConfig_BaseFactory; return function NgbInputDatepickerConfig_Factory(t) { return (ɵNgbInputDatepickerConfig_BaseFactory || (ɵNgbInputDatepickerConfig_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NgbInputDatepickerConfig)))(t || NgbInputDatepickerConfig); }; }();\nNgbInputDatepickerConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbInputDatepickerConfig_Factory() { return new NgbInputDatepickerConfig(); }, token: NgbInputDatepickerConfig, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbInputDatepickerConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], null, null); })();\n\n/**\n * A directive that allows to stick a datepicker popup to an input field.\n *\n * Manages interaction with the input field itself, does value formatting and provides forms integration.\n */\nclass NgbInputDatepicker {\n    constructor(_parserFormatter, _elRef, _vcRef, _renderer, _cfr, _ngZone, _calendar, _dateAdapter, _document, _changeDetector, config) {\n        this._parserFormatter = _parserFormatter;\n        this._elRef = _elRef;\n        this._vcRef = _vcRef;\n        this._renderer = _renderer;\n        this._cfr = _cfr;\n        this._ngZone = _ngZone;\n        this._calendar = _calendar;\n        this._dateAdapter = _dateAdapter;\n        this._document = _document;\n        this._changeDetector = _changeDetector;\n        this._cRef = null;\n        this._disabled = false;\n        this._elWithFocus = null;\n        this._model = null;\n        /**\n         * An event emitted when user selects a date using keyboard or mouse.\n         *\n         * The payload of the event is currently selected `NgbDate`.\n         *\n         * @since 1.1.1\n         */\n        this.dateSelect = new EventEmitter();\n        /**\n         * Event emitted right after the navigation happens and displayed month changes.\n         *\n         * See [`NgbDatepickerNavigateEvent`](#/components/datepicker/api#NgbDatepickerNavigateEvent) for the payload info.\n         */\n        this.navigate = new EventEmitter();\n        /**\n         * An event fired after closing datepicker window.\n         *\n         * @since 4.2.0\n         */\n        this.closed = new EventEmitter();\n        this._onChange = (_) => { };\n        this._onTouched = () => { };\n        this._validatorChange = () => { };\n        ['autoClose', 'container', 'positionTarget', 'placement'].forEach(input => this[input] = config[input]);\n        this._zoneSubscription = _ngZone.onStable.subscribe(() => this._updatePopupPosition());\n    }\n    get disabled() {\n        return this._disabled;\n    }\n    set disabled(value) {\n        this._disabled = value === '' || (value && value !== 'false');\n        if (this.isOpen()) {\n            this._cRef.instance.setDisabledState(this._disabled);\n        }\n    }\n    registerOnChange(fn) { this._onChange = fn; }\n    registerOnTouched(fn) { this._onTouched = fn; }\n    registerOnValidatorChange(fn) { this._validatorChange = fn; }\n    setDisabledState(isDisabled) { this.disabled = isDisabled; }\n    validate(c) {\n        const { value } = c;\n        if (value != null) {\n            const ngbDate = this._fromDateStruct(this._dateAdapter.fromModel(value));\n            if (!ngbDate) {\n                return { 'ngbDate': { invalid: value } };\n            }\n            if (this.minDate && ngbDate.before(NgbDate.from(this.minDate))) {\n                return { 'ngbDate': { minDate: { minDate: this.minDate, actual: value } } };\n            }\n            if (this.maxDate && ngbDate.after(NgbDate.from(this.maxDate))) {\n                return { 'ngbDate': { maxDate: { maxDate: this.maxDate, actual: value } } };\n            }\n        }\n        return null;\n    }\n    writeValue(value) {\n        this._model = this._fromDateStruct(this._dateAdapter.fromModel(value));\n        this._writeModelValue(this._model);\n    }\n    manualDateChange(value, updateView = false) {\n        const inputValueChanged = value !== this._inputValue;\n        if (inputValueChanged) {\n            this._inputValue = value;\n            this._model = this._fromDateStruct(this._parserFormatter.parse(value));\n        }\n        if (inputValueChanged || !updateView) {\n            this._onChange(this._model ? this._dateAdapter.toModel(this._model) : (value === '' ? null : value));\n        }\n        if (updateView && this._model) {\n            this._writeModelValue(this._model);\n        }\n    }\n    isOpen() { return !!this._cRef; }\n    /**\n     * Opens the datepicker popup.\n     *\n     * If the related form control contains a valid date, the corresponding month will be opened.\n     */\n    open() {\n        if (!this.isOpen()) {\n            const cf = this._cfr.resolveComponentFactory(NgbDatepicker);\n            this._cRef = this._vcRef.createComponent(cf);\n            this._applyPopupStyling(this._cRef.location.nativeElement);\n            this._applyDatepickerInputs(this._cRef.instance);\n            this._subscribeForDatepickerOutputs(this._cRef.instance);\n            this._cRef.instance.ngOnInit();\n            this._cRef.instance.writeValue(this._dateAdapter.toModel(this._model));\n            // date selection event handling\n            this._cRef.instance.registerOnChange((selectedDate) => {\n                this.writeValue(selectedDate);\n                this._onChange(selectedDate);\n                this._onTouched();\n            });\n            this._cRef.changeDetectorRef.detectChanges();\n            this._cRef.instance.setDisabledState(this.disabled);\n            if (this.container === 'body') {\n                this._document.querySelector(this.container).appendChild(this._cRef.location.nativeElement);\n            }\n            // focus handling\n            this._elWithFocus = this._document.activeElement;\n            ngbFocusTrap(this._ngZone, this._cRef.location.nativeElement, this.closed, true);\n            this._cRef.instance.focus();\n            ngbAutoClose(this._ngZone, this._document, this.autoClose, () => this.close(), this.closed, [], [this._elRef.nativeElement, this._cRef.location.nativeElement]);\n        }\n    }\n    /**\n     * Closes the datepicker popup.\n     */\n    close() {\n        if (this.isOpen()) {\n            this._vcRef.remove(this._vcRef.indexOf(this._cRef.hostView));\n            this._cRef = null;\n            this.closed.emit();\n            this._changeDetector.markForCheck();\n            // restore focus\n            let elementToFocus = this._elWithFocus;\n            if (isString(this.restoreFocus)) {\n                elementToFocus = this._document.querySelector(this.restoreFocus);\n            }\n            else if (this.restoreFocus !== undefined) {\n                elementToFocus = this.restoreFocus;\n            }\n            // in IE document.activeElement can contain an object without 'focus()' sometimes\n            if (elementToFocus && elementToFocus['focus']) {\n                elementToFocus.focus();\n            }\n            else {\n                this._document.body.focus();\n            }\n        }\n    }\n    /**\n     * Toggles the datepicker popup.\n     */\n    toggle() {\n        if (this.isOpen()) {\n            this.close();\n        }\n        else {\n            this.open();\n        }\n    }\n    /**\n     * Navigates to the provided date.\n     *\n     * With the default calendar we use ISO 8601: 'month' is 1=Jan ... 12=Dec.\n     * If nothing or invalid date provided calendar will open current month.\n     *\n     * Use the `[startDate]` input as an alternative.\n     */\n    navigateTo(date) {\n        if (this.isOpen()) {\n            this._cRef.instance.navigateTo(date);\n        }\n    }\n    onBlur() { this._onTouched(); }\n    onFocus() { this._elWithFocus = this._elRef.nativeElement; }\n    ngOnChanges(changes) {\n        if (changes['minDate'] || changes['maxDate']) {\n            this._validatorChange();\n            if (this.isOpen()) {\n                if (changes['minDate']) {\n                    this._cRef.instance.minDate = this.minDate;\n                }\n                if (changes['maxDate']) {\n                    this._cRef.instance.maxDate = this.maxDate;\n                }\n                this._cRef.instance.ngOnChanges(changes);\n            }\n        }\n        if (changes['datepickerClass']) {\n            const { currentValue, previousValue } = changes['datepickerClass'];\n            this._applyPopupClass(currentValue, previousValue);\n        }\n    }\n    ngOnDestroy() {\n        this.close();\n        this._zoneSubscription.unsubscribe();\n    }\n    _applyDatepickerInputs(datepickerInstance) {\n        ['dayTemplate', 'dayTemplateData', 'displayMonths', 'firstDayOfWeek', 'footerTemplate', 'markDisabled', 'minDate',\n            'maxDate', 'navigation', 'outsideDays', 'showNavigation', 'showWeekNumbers', 'weekdays']\n            .forEach((optionName) => {\n            if (this[optionName] !== undefined) {\n                datepickerInstance[optionName] = this[optionName];\n            }\n        });\n        datepickerInstance.startDate = this.startDate || this._model;\n    }\n    _applyPopupClass(newClass, oldClass) {\n        var _a;\n        const popupEl = (_a = this._cRef) === null || _a === void 0 ? void 0 : _a.location.nativeElement;\n        if (popupEl) {\n            if (newClass) {\n                this._renderer.addClass(popupEl, newClass);\n            }\n            if (oldClass) {\n                this._renderer.removeClass(popupEl, oldClass);\n            }\n        }\n    }\n    _applyPopupStyling(nativeElement) {\n        this._renderer.addClass(nativeElement, 'dropdown-menu');\n        this._renderer.addClass(nativeElement, 'show');\n        if (this.container === 'body') {\n            this._renderer.addClass(nativeElement, 'ngb-dp-body');\n        }\n        this._applyPopupClass(this.datepickerClass);\n    }\n    _subscribeForDatepickerOutputs(datepickerInstance) {\n        datepickerInstance.navigate.subscribe(navigateEvent => this.navigate.emit(navigateEvent));\n        datepickerInstance.dateSelect.subscribe(date => {\n            this.dateSelect.emit(date);\n            if (this.autoClose === true || this.autoClose === 'inside') {\n                this.close();\n            }\n        });\n    }\n    _writeModelValue(model) {\n        const value = this._parserFormatter.format(model);\n        this._inputValue = value;\n        this._renderer.setProperty(this._elRef.nativeElement, 'value', value);\n        if (this.isOpen()) {\n            this._cRef.instance.writeValue(this._dateAdapter.toModel(model));\n            this._onTouched();\n        }\n    }\n    _fromDateStruct(date) {\n        const ngbDate = date ? new NgbDate(date.year, date.month, date.day) : null;\n        return this._calendar.isValid(ngbDate) ? ngbDate : null;\n    }\n    _updatePopupPosition() {\n        if (!this._cRef) {\n            return;\n        }\n        let hostElement;\n        if (isString(this.positionTarget)) {\n            hostElement = this._document.querySelector(this.positionTarget);\n        }\n        else if (this.positionTarget instanceof HTMLElement) {\n            hostElement = this.positionTarget;\n        }\n        else {\n            hostElement = this._elRef.nativeElement;\n        }\n        if (this.positionTarget && !hostElement) {\n            throw new Error('ngbDatepicker could not find element declared in [positionTarget] to position against.');\n        }\n        positionElements(hostElement, this._cRef.location.nativeElement, this.placement, this.container === 'body');\n    }\n}\nNgbInputDatepicker.ɵfac = function NgbInputDatepicker_Factory(t) { return new (t || NgbInputDatepicker)(ɵngcc0.ɵɵdirectiveInject(NgbDateParserFormatter), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ComponentFactoryResolver), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(NgbCalendar), ɵngcc0.ɵɵdirectiveInject(NgbDateAdapter), ɵngcc0.ɵɵdirectiveInject(DOCUMENT), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(NgbInputDatepickerConfig)); };\nNgbInputDatepicker.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbInputDatepicker, selectors: [[\"input\", \"ngbDatepicker\", \"\"]], hostVars: 1, hostBindings: function NgbInputDatepicker_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"input\", function NgbInputDatepicker_input_HostBindingHandler($event) { return ctx.manualDateChange($event.target.value); })(\"change\", function NgbInputDatepicker_change_HostBindingHandler($event) { return ctx.manualDateChange($event.target.value, true); })(\"focus\", function NgbInputDatepicker_focus_HostBindingHandler() { return ctx.onFocus(); })(\"blur\", function NgbInputDatepicker_blur_HostBindingHandler() { return ctx.onBlur(); });\n    } if (rf & 2) {\n        ɵngcc0.ɵɵhostProperty(\"disabled\", ctx.disabled);\n    } }, inputs: { disabled: \"disabled\", autoClose: \"autoClose\", datepickerClass: \"datepickerClass\", dayTemplate: \"dayTemplate\", dayTemplateData: \"dayTemplateData\", displayMonths: \"displayMonths\", firstDayOfWeek: \"firstDayOfWeek\", footerTemplate: \"footerTemplate\", markDisabled: \"markDisabled\", minDate: \"minDate\", maxDate: \"maxDate\", navigation: \"navigation\", outsideDays: \"outsideDays\", placement: \"placement\", restoreFocus: \"restoreFocus\", showWeekNumbers: \"showWeekNumbers\", startDate: \"startDate\", container: \"container\", positionTarget: \"positionTarget\", weekdays: \"weekdays\" }, outputs: { dateSelect: \"dateSelect\", navigate: \"navigate\", closed: \"closed\" }, exportAs: [\"ngbDatepicker\"], features: [ɵngcc0.ɵɵProvidersFeature([\n            { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbInputDatepicker), multi: true },\n            { provide: NG_VALIDATORS, useExisting: forwardRef(() => NgbInputDatepicker), multi: true },\n            { provide: NgbDatepickerConfig, useExisting: NgbInputDatepickerConfig }\n        ]), ɵngcc0.ɵɵNgOnChangesFeature] });\nNgbInputDatepicker.ctorParameters = () => [\n    { type: NgbDateParserFormatter },\n    { type: ElementRef },\n    { type: ViewContainerRef },\n    { type: Renderer2 },\n    { type: ComponentFactoryResolver },\n    { type: NgZone },\n    { type: NgbCalendar },\n    { type: NgbDateAdapter },\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n    { type: ChangeDetectorRef },\n    { type: NgbInputDatepickerConfig }\n];\nNgbInputDatepicker.propDecorators = {\n    autoClose: [{ type: Input }],\n    datepickerClass: [{ type: Input }],\n    dayTemplate: [{ type: Input }],\n    dayTemplateData: [{ type: Input }],\n    displayMonths: [{ type: Input }],\n    firstDayOfWeek: [{ type: Input }],\n    footerTemplate: [{ type: Input }],\n    markDisabled: [{ type: Input }],\n    minDate: [{ type: Input }],\n    maxDate: [{ type: Input }],\n    navigation: [{ type: Input }],\n    outsideDays: [{ type: Input }],\n    placement: [{ type: Input }],\n    restoreFocus: [{ type: Input }],\n    showWeekNumbers: [{ type: Input }],\n    startDate: [{ type: Input }],\n    container: [{ type: Input }],\n    positionTarget: [{ type: Input }],\n    weekdays: [{ type: Input }],\n    dateSelect: [{ type: Output }],\n    navigate: [{ type: Output }],\n    closed: [{ type: Output }],\n    disabled: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbInputDatepicker, [{\n        type: Directive,\n        args: [{\n                selector: 'input[ngbDatepicker]',\n                exportAs: 'ngbDatepicker',\n                host: {\n                    '(input)': 'manualDateChange($event.target.value)',\n                    '(change)': 'manualDateChange($event.target.value, true)',\n                    '(focus)': 'onFocus()',\n                    '(blur)': 'onBlur()',\n                    '[disabled]': 'disabled'\n                },\n                providers: [\n                    { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbInputDatepicker), multi: true },\n                    { provide: NG_VALIDATORS, useExisting: forwardRef(() => NgbInputDatepicker), multi: true },\n                    { provide: NgbDatepickerConfig, useExisting: NgbInputDatepickerConfig }\n                ]\n            }]\n    }], function () { return [{ type: NgbDateParserFormatter }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.ViewContainerRef }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ComponentFactoryResolver }, { type: ɵngcc0.NgZone }, { type: NgbCalendar }, { type: NgbDateAdapter }, { type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }, { type: ɵngcc0.ChangeDetectorRef }, { type: NgbInputDatepickerConfig }]; }, { dateSelect: [{\n            type: Output\n        }], navigate: [{\n            type: Output\n        }], closed: [{\n            type: Output\n        }], disabled: [{\n            type: Input\n        }], autoClose: [{\n            type: Input\n        }], datepickerClass: [{\n            type: Input\n        }], dayTemplate: [{\n            type: Input\n        }], dayTemplateData: [{\n            type: Input\n        }], displayMonths: [{\n            type: Input\n        }], firstDayOfWeek: [{\n            type: Input\n        }], footerTemplate: [{\n            type: Input\n        }], markDisabled: [{\n            type: Input\n        }], minDate: [{\n            type: Input\n        }], maxDate: [{\n            type: Input\n        }], navigation: [{\n            type: Input\n        }], outsideDays: [{\n            type: Input\n        }], placement: [{\n            type: Input\n        }], restoreFocus: [{\n            type: Input\n        }], showWeekNumbers: [{\n            type: Input\n        }], startDate: [{\n            type: Input\n        }], container: [{\n            type: Input\n        }], positionTarget: [{\n            type: Input\n        }], weekdays: [{\n            type: Input\n        }] }); })();\n\nclass NgbDatepickerDayView {\n    constructor(i18n) {\n        this.i18n = i18n;\n    }\n    isMuted() { return !this.selected && (this.date.month !== this.currentMonth || this.disabled); }\n}\nNgbDatepickerDayView.ɵfac = function NgbDatepickerDayView_Factory(t) { return new (t || NgbDatepickerDayView)(ɵngcc0.ɵɵdirectiveInject(NgbDatepickerI18n)); };\nNgbDatepickerDayView.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbDatepickerDayView, selectors: [[\"\", \"ngbDatepickerDayView\", \"\"]], hostAttrs: [1, \"btn-light\"], hostVars: 10, hostBindings: function NgbDatepickerDayView_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵclassProp(\"bg-primary\", ctx.selected)(\"text-white\", ctx.selected)(\"text-muted\", ctx.isMuted())(\"outside\", ctx.isMuted())(\"active\", ctx.focused);\n    } }, inputs: { currentMonth: \"currentMonth\", date: \"date\", disabled: \"disabled\", focused: \"focused\", selected: \"selected\" }, attrs: _c20, decls: 1, vars: 1, template: function NgbDatepickerDayView_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵtext(0);\n    } if (rf & 2) {\n        ɵngcc0.ɵɵtextInterpolate(ctx.i18n.getDayNumerals(ctx.date));\n    } }, styles: [\"[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView].outside{opacity:.5}\"], encapsulation: 2, changeDetection: 0 });\nNgbDatepickerDayView.ctorParameters = () => [\n    { type: NgbDatepickerI18n }\n];\nNgbDatepickerDayView.propDecorators = {\n    currentMonth: [{ type: Input }],\n    date: [{ type: Input }],\n    disabled: [{ type: Input }],\n    focused: [{ type: Input }],\n    selected: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDatepickerDayView, [{\n        type: Component,\n        args: [{\n                selector: '[ngbDatepickerDayView]',\n                changeDetection: ChangeDetectionStrategy.OnPush,\n                encapsulation: ViewEncapsulation.None,\n                host: {\n                    'class': 'btn-light',\n                    '[class.bg-primary]': 'selected',\n                    '[class.text-white]': 'selected',\n                    '[class.text-muted]': 'isMuted()',\n                    '[class.outside]': 'isMuted()',\n                    '[class.active]': 'focused'\n                },\n                template: `{{ i18n.getDayNumerals(date) }}`,\n                styles: [\"[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView].outside{opacity:.5}\"]\n            }]\n    }], function () { return [{ type: NgbDatepickerI18n }]; }, { currentMonth: [{\n            type: Input\n        }], date: [{\n            type: Input\n        }], disabled: [{\n            type: Input\n        }], focused: [{\n            type: Input\n        }], selected: [{\n            type: Input\n        }] }); })();\n\nclass NgbDatepickerNavigationSelect {\n    constructor(i18n, _renderer) {\n        this.i18n = i18n;\n        this._renderer = _renderer;\n        this.select = new EventEmitter();\n        this._month = -1;\n        this._year = -1;\n    }\n    changeMonth(month) { this.select.emit(new NgbDate(this.date.year, toInteger(month), 1)); }\n    changeYear(year) { this.select.emit(new NgbDate(toInteger(year), this.date.month, 1)); }\n    ngAfterViewChecked() {\n        if (this.date) {\n            if (this.date.month !== this._month) {\n                this._month = this.date.month;\n                this._renderer.setProperty(this.monthSelect.nativeElement, 'value', this._month);\n            }\n            if (this.date.year !== this._year) {\n                this._year = this.date.year;\n                this._renderer.setProperty(this.yearSelect.nativeElement, 'value', this._year);\n            }\n        }\n    }\n}\nNgbDatepickerNavigationSelect.ɵfac = function NgbDatepickerNavigationSelect_Factory(t) { return new (t || NgbDatepickerNavigationSelect)(ɵngcc0.ɵɵdirectiveInject(NgbDatepickerI18n), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2)); };\nNgbDatepickerNavigationSelect.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbDatepickerNavigationSelect, selectors: [[\"ngb-datepicker-navigation-select\"]], viewQuery: function NgbDatepickerNavigationSelect_Query(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵviewQuery(_c21, 7, ElementRef);\n        ɵngcc0.ɵɵviewQuery(_c22, 7, ElementRef);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.monthSelect = _t.first);\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.yearSelect = _t.first);\n    } }, inputs: { date: \"date\", disabled: \"disabled\", months: \"months\", years: \"years\" }, outputs: { select: \"select\" }, decls: 6, vars: 4, consts: function () { let i18n_23; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_datepicker_select_month$$FESM2015_NG_BOOTSTRAP_JS_24 = goog.getMsg(\"Select month\");\n        i18n_23 = MSG_EXTERNAL_ngb_datepicker_select_month$$FESM2015_NG_BOOTSTRAP_JS_24;\n    }\n    else {\n        i18n_23 = $localize `:@@ngb.datepicker.select-month␟1dbc84807f35518112f62e5775d1daebd3d8462b␟2253869508135064750:Select month`;\n    } let i18n_25; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_datepicker_select_month$$FESM2015_NG_BOOTSTRAP_JS_26 = goog.getMsg(\"Select month\");\n        i18n_25 = MSG_EXTERNAL_ngb_datepicker_select_month$$FESM2015_NG_BOOTSTRAP_JS_26;\n    }\n    else {\n        i18n_25 = $localize `:@@ngb.datepicker.select-month␟1dbc84807f35518112f62e5775d1daebd3d8462b␟2253869508135064750:Select month`;\n    } let i18n_27; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_datepicker_select_year$$FESM2015_NG_BOOTSTRAP_JS_28 = goog.getMsg(\"Select year\");\n        i18n_27 = MSG_EXTERNAL_ngb_datepicker_select_year$$FESM2015_NG_BOOTSTRAP_JS_28;\n    }\n    else {\n        i18n_27 = $localize `:@@ngb.datepicker.select-year␟8ceb09d002bf0c5d1cac171dfbffe1805d2b3962␟8852264961585484321:Select year`;\n    } let i18n_29; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_datepicker_select_year$$FESM2015_NG_BOOTSTRAP_JS_30 = goog.getMsg(\"Select year\");\n        i18n_29 = MSG_EXTERNAL_ngb_datepicker_select_year$$FESM2015_NG_BOOTSTRAP_JS_30;\n    }\n    else {\n        i18n_29 = $localize `:@@ngb.datepicker.select-year␟8ceb09d002bf0c5d1cac171dfbffe1805d2b3962␟8852264961585484321:Select year`;\n    } return [[\"aria-label\", i18n_23, \"title\", i18n_25, 1, \"custom-select\", 3, \"disabled\", \"change\"], [\"month\", \"\"], [3, \"value\", 4, \"ngFor\", \"ngForOf\"], [\"aria-label\", i18n_27, \"title\", i18n_29, 1, \"custom-select\", 3, \"disabled\", \"change\"], [\"year\", \"\"], [3, \"value\"]]; }, template: function NgbDatepickerNavigationSelect_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵelementStart(0, \"select\", 0, 1);\n        ɵngcc0.ɵɵlistener(\"change\", function NgbDatepickerNavigationSelect_Template_select_change_0_listener($event) { return ctx.changeMonth($event.target.value); });\n        ɵngcc0.ɵɵtemplate(2, NgbDatepickerNavigationSelect_option_2_Template, 2, 3, \"option\", 2);\n        ɵngcc0.ɵɵelementEnd();\n        ɵngcc0.ɵɵelementStart(3, \"select\", 3, 4);\n        ɵngcc0.ɵɵlistener(\"change\", function NgbDatepickerNavigationSelect_Template_select_change_3_listener($event) { return ctx.changeYear($event.target.value); });\n        ɵngcc0.ɵɵtemplate(5, NgbDatepickerNavigationSelect_option_5_Template, 2, 2, \"option\", 2);\n        ɵngcc0.ɵɵelementEnd();\n    } if (rf & 2) {\n        ɵngcc0.ɵɵproperty(\"disabled\", ctx.disabled);\n        ɵngcc0.ɵɵadvance(2);\n        ɵngcc0.ɵɵproperty(\"ngForOf\", ctx.months);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"disabled\", ctx.disabled);\n        ɵngcc0.ɵɵadvance(2);\n        ɵngcc0.ɵɵproperty(\"ngForOf\", ctx.years);\n    } }, directives: [ɵngcc1.NgForOf, ɵngcc2.NgSelectOption, ɵngcc2.ɵNgSelectMultipleOption], styles: [\"ngb-datepicker-navigation-select>.custom-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.custom-select:focus{z-index:1}ngb-datepicker-navigation-select>.custom-select::-ms-value{background-color:transparent!important}\"], encapsulation: 2, changeDetection: 0 });\nNgbDatepickerNavigationSelect.ctorParameters = () => [\n    { type: NgbDatepickerI18n },\n    { type: Renderer2 }\n];\nNgbDatepickerNavigationSelect.propDecorators = {\n    date: [{ type: Input }],\n    disabled: [{ type: Input }],\n    months: [{ type: Input }],\n    years: [{ type: Input }],\n    select: [{ type: Output }],\n    monthSelect: [{ type: ViewChild, args: ['month', { static: true, read: ElementRef },] }],\n    yearSelect: [{ type: ViewChild, args: ['year', { static: true, read: ElementRef },] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDatepickerNavigationSelect, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-datepicker-navigation-select',\n                changeDetection: ChangeDetectionStrategy.OnPush,\n                encapsulation: ViewEncapsulation.None,\n                template: `\n    <select #month\n      [disabled]=\"disabled\"\n      class=\"custom-select\"\n      i18n-aria-label=\"@@ngb.datepicker.select-month\" aria-label=\"Select month\"\n      i18n-title=\"@@ngb.datepicker.select-month\" title=\"Select month\"\n      (change)=\"changeMonth($any($event).target.value)\">\n        <option *ngFor=\"let m of months\" [attr.aria-label]=\"i18n.getMonthFullName(m, date?.year)\"\n                [value]=\"m\">{{ i18n.getMonthShortName(m, date?.year) }}</option>\n    </select><select #year\n      [disabled]=\"disabled\"\n      class=\"custom-select\"\n      i18n-aria-label=\"@@ngb.datepicker.select-year\" aria-label=\"Select year\"\n      i18n-title=\"@@ngb.datepicker.select-year\" title=\"Select year\"\n      (change)=\"changeYear($any($event).target.value)\">\n        <option *ngFor=\"let y of years\" [value]=\"y\">{{ i18n.getYearNumerals(y) }}</option>\n    </select>\n  `,\n                styles: [\"ngb-datepicker-navigation-select>.custom-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.custom-select:focus{z-index:1}ngb-datepicker-navigation-select>.custom-select::-ms-value{background-color:transparent!important}\"]\n            }]\n    }], function () { return [{ type: NgbDatepickerI18n }, { type: ɵngcc0.Renderer2 }]; }, { select: [{\n            type: Output\n        }], date: [{\n            type: Input\n        }], disabled: [{\n            type: Input\n        }], months: [{\n            type: Input\n        }], years: [{\n            type: Input\n        }], monthSelect: [{\n            type: ViewChild,\n            args: ['month', { static: true, read: ElementRef }]\n        }], yearSelect: [{\n            type: ViewChild,\n            args: ['year', { static: true, read: ElementRef }]\n        }] }); })();\n\nclass NgbCalendarHijri extends NgbCalendar {\n    getDaysPerWeek() { return 7; }\n    getMonths() { return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; }\n    getWeeksPerMonth() { return 6; }\n    getNext(date, period = 'd', number = 1) {\n        date = new NgbDate(date.year, date.month, date.day);\n        switch (period) {\n            case 'y':\n                date = this._setYear(date, date.year + number);\n                date.month = 1;\n                date.day = 1;\n                return date;\n            case 'm':\n                date = this._setMonth(date, date.month + number);\n                date.day = 1;\n                return date;\n            case 'd':\n                return this._setDay(date, date.day + number);\n            default:\n                return date;\n        }\n    }\n    getPrev(date, period = 'd', number = 1) { return this.getNext(date, period, -number); }\n    getWeekday(date) {\n        const day = this.toGregorian(date).getDay();\n        // in JS Date Sun=0, in ISO 8601 Sun=7\n        return day === 0 ? 7 : day;\n    }\n    getWeekNumber(week, firstDayOfWeek) {\n        // in JS Date Sun=0, in ISO 8601 Sun=7\n        if (firstDayOfWeek === 7) {\n            firstDayOfWeek = 0;\n        }\n        const thursdayIndex = (4 + 7 - firstDayOfWeek) % 7;\n        const date = week[thursdayIndex];\n        const jsDate = this.toGregorian(date);\n        jsDate.setDate(jsDate.getDate() + 4 - (jsDate.getDay() || 7)); // Thursday\n        const time = jsDate.getTime();\n        const MuhDate = this.toGregorian(new NgbDate(date.year, 1, 1)); // Compare with Muharram 1\n        return Math.floor(Math.round((time - MuhDate.getTime()) / 86400000) / 7) + 1;\n    }\n    getToday() { return this.fromGregorian(new Date()); }\n    isValid(date) {\n        return date != null && isNumber(date.year) && isNumber(date.month) && isNumber(date.day) &&\n            !isNaN(this.toGregorian(date).getTime());\n    }\n    _setDay(date, day) {\n        day = +day;\n        let mDays = this.getDaysPerMonth(date.month, date.year);\n        if (day <= 0) {\n            while (day <= 0) {\n                date = this._setMonth(date, date.month - 1);\n                mDays = this.getDaysPerMonth(date.month, date.year);\n                day += mDays;\n            }\n        }\n        else if (day > mDays) {\n            while (day > mDays) {\n                day -= mDays;\n                date = this._setMonth(date, date.month + 1);\n                mDays = this.getDaysPerMonth(date.month, date.year);\n            }\n        }\n        date.day = day;\n        return date;\n    }\n    _setMonth(date, month) {\n        month = +month;\n        date.year = date.year + Math.floor((month - 1) / 12);\n        date.month = Math.floor(((month - 1) % 12 + 12) % 12) + 1;\n        return date;\n    }\n    _setYear(date, year) {\n        date.year = +year;\n        return date;\n    }\n}\nNgbCalendarHijri.ɵfac = /*@__PURE__*/ function () { let ɵNgbCalendarHijri_BaseFactory; return function NgbCalendarHijri_Factory(t) { return (ɵNgbCalendarHijri_BaseFactory || (ɵNgbCalendarHijri_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NgbCalendarHijri)))(t || NgbCalendarHijri); }; }();\nNgbCalendarHijri.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbCalendarHijri, factory: NgbCalendarHijri.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbCalendarHijri, [{\n        type: Injectable\n    }], null, null); })();\n\n/**\n * Checks if islamic year is a leap year\n */\nfunction isIslamicLeapYear(hYear) {\n    return (14 + 11 * hYear) % 30 < 11;\n}\n/**\n * Checks if gregorian years is a leap year\n */\nfunction isGregorianLeapYear$1(gDate) {\n    const year = gDate.getFullYear();\n    return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n}\n/**\n * Returns the start of Hijri Month.\n * `hMonth` is 0 for Muharram, 1 for Safar, etc.\n * `hYear` is any Hijri hYear.\n */\nfunction getIslamicMonthStart(hYear, hMonth) {\n    return Math.ceil(29.5 * hMonth) + (hYear - 1) * 354 + Math.floor((3 + 11 * hYear) / 30.0);\n}\n/**\n * Returns the start of Hijri year.\n * `year` is any Hijri year.\n */\nfunction getIslamicYearStart(year) {\n    return (year - 1) * 354 + Math.floor((3 + 11 * year) / 30.0);\n}\nfunction mod$1(a, b) {\n    return a - b * Math.floor(a / b);\n}\n/**\n * The civil calendar is one type of Hijri calendars used in islamic countries.\n * Uses a fixed cycle of alternating 29- and 30-day months,\n * with a leap day added to the last month of 11 out of every 30 years.\n * http://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types\n * All the calculations here are based on the equations from \"Calendrical Calculations\" By Edward M. Reingold, Nachum\n * Dershowitz.\n */\nconst GREGORIAN_EPOCH$1 = 1721425.5;\nconst ISLAMIC_EPOCH = 1948439.5;\nclass NgbCalendarIslamicCivil extends NgbCalendarHijri {\n    /**\n     * Returns the equivalent islamic(civil) date value for a give input Gregorian date.\n     * `gDate` is a JS Date to be converted to Hijri.\n     */\n    fromGregorian(gDate) {\n        const gYear = gDate.getFullYear(), gMonth = gDate.getMonth(), gDay = gDate.getDate();\n        let julianDay = GREGORIAN_EPOCH$1 - 1 + 365 * (gYear - 1) + Math.floor((gYear - 1) / 4) +\n            -Math.floor((gYear - 1) / 100) + Math.floor((gYear - 1) / 400) +\n            Math.floor((367 * (gMonth + 1) - 362) / 12 + (gMonth + 1 <= 2 ? 0 : isGregorianLeapYear$1(gDate) ? -1 : -2) + gDay);\n        julianDay = Math.floor(julianDay) + 0.5;\n        const days = julianDay - ISLAMIC_EPOCH;\n        const hYear = Math.floor((30 * days + 10646) / 10631.0);\n        let hMonth = Math.ceil((days - 29 - getIslamicYearStart(hYear)) / 29.5);\n        hMonth = Math.min(hMonth, 11);\n        const hDay = Math.ceil(days - getIslamicMonthStart(hYear, hMonth)) + 1;\n        return new NgbDate(hYear, hMonth + 1, hDay);\n    }\n    /**\n     * Returns the equivalent JS date value for a give input islamic(civil) date.\n     * `hDate` is an islamic(civil) date to be converted to Gregorian.\n     */\n    toGregorian(hDate) {\n        const hYear = hDate.year;\n        const hMonth = hDate.month - 1;\n        const hDay = hDate.day;\n        const julianDay = hDay + Math.ceil(29.5 * hMonth) + (hYear - 1) * 354 + Math.floor((3 + 11 * hYear) / 30) + ISLAMIC_EPOCH - 1;\n        const wjd = Math.floor(julianDay - 0.5) + 0.5, depoch = wjd - GREGORIAN_EPOCH$1, quadricent = Math.floor(depoch / 146097), dqc = mod$1(depoch, 146097), cent = Math.floor(dqc / 36524), dcent = mod$1(dqc, 36524), quad = Math.floor(dcent / 1461), dquad = mod$1(dcent, 1461), yindex = Math.floor(dquad / 365);\n        let year = quadricent * 400 + cent * 100 + quad * 4 + yindex;\n        if (!(cent === 4 || yindex === 4)) {\n            year++;\n        }\n        const gYearStart = GREGORIAN_EPOCH$1 + 365 * (year - 1) + Math.floor((year - 1) / 4) - Math.floor((year - 1) / 100) +\n            Math.floor((year - 1) / 400);\n        const yearday = wjd - gYearStart;\n        const tjd = GREGORIAN_EPOCH$1 - 1 + 365 * (year - 1) + Math.floor((year - 1) / 4) - Math.floor((year - 1) / 100) +\n            Math.floor((year - 1) / 400) + Math.floor(739 / 12 + (isGregorianLeapYear$1(new Date(year, 3, 1)) ? -1 : -2) + 1);\n        const leapadj = wjd < tjd ? 0 : isGregorianLeapYear$1(new Date(year, 3, 1)) ? 1 : 2;\n        const month = Math.floor(((yearday + leapadj) * 12 + 373) / 367);\n        const tjd2 = GREGORIAN_EPOCH$1 - 1 + 365 * (year - 1) + Math.floor((year - 1) / 4) - Math.floor((year - 1) / 100) +\n            Math.floor((year - 1) / 400) +\n            Math.floor((367 * month - 362) / 12 + (month <= 2 ? 0 : isGregorianLeapYear$1(new Date(year, month - 1, 1)) ? -1 : -2) +\n                1);\n        const day = wjd - tjd2 + 1;\n        return new Date(year, month - 1, day);\n    }\n    /**\n     * Returns the number of days in a specific Hijri month.\n     * `month` is 1 for Muharram, 2 for Safar, etc.\n     * `year` is any Hijri year.\n     */\n    getDaysPerMonth(month, year) {\n        year = year + Math.floor(month / 13);\n        month = ((month - 1) % 12) + 1;\n        let length = 29 + month % 2;\n        if (month === 12 && isIslamicLeapYear(year)) {\n            length++;\n        }\n        return length;\n    }\n}\nNgbCalendarIslamicCivil.ɵfac = /*@__PURE__*/ function () { let ɵNgbCalendarIslamicCivil_BaseFactory; return function NgbCalendarIslamicCivil_Factory(t) { return (ɵNgbCalendarIslamicCivil_BaseFactory || (ɵNgbCalendarIslamicCivil_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NgbCalendarIslamicCivil)))(t || NgbCalendarIslamicCivil); }; }();\nNgbCalendarIslamicCivil.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbCalendarIslamicCivil, factory: NgbCalendarIslamicCivil.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbCalendarIslamicCivil, [{\n        type: Injectable\n    }], null, null); })();\n\n/**\n * Umalqura calendar is one type of Hijri calendars used in islamic countries.\n * This Calendar is used by Saudi Arabia for administrative purpose.\n * Unlike tabular calendars, the algorithm involves astronomical calculation, but it's still deterministic.\n * http://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types\n */\nconst GREGORIAN_FIRST_DATE = new Date(1882, 10, 12);\nconst GREGORIAN_LAST_DATE = new Date(2174, 10, 25);\nconst HIJRI_BEGIN = 1300;\nconst HIJRI_END = 1600;\nconst ONE_DAY = 1000 * 60 * 60 * 24;\nconst MONTH_LENGTH = [\n    // 1300-1304\n    '101010101010', '110101010100', '111011001001', '011011010100', '011011101010',\n    // 1305-1309\n    '001101101100', '101010101101', '010101010101', '011010101001', '011110010010',\n    // 1310-1314\n    '101110101001', '010111010100', '101011011010', '010101011100', '110100101101',\n    // 1315-1319\n    '011010010101', '011101001010', '101101010100', '101101101010', '010110101101',\n    // 1320-1324\n    '010010101110', '101001001111', '010100010111', '011010001011', '011010100101',\n    // 1325-1329\n    '101011010101', '001011010110', '100101011011', '010010011101', '101001001101',\n    // 1330-1334\n    '110100100110', '110110010101', '010110101100', '100110110110', '001010111010',\n    // 1335-1339\n    '101001011011', '010100101011', '101010010101', '011011001010', '101011101001',\n    // 1340-1344\n    '001011110100', '100101110110', '001010110110', '100101010110', '101011001010',\n    // 1345-1349\n    '101110100100', '101111010010', '010111011001', '001011011100', '100101101101',\n    // 1350-1354\n    '010101001101', '101010100101', '101101010010', '101110100101', '010110110100',\n    // 1355-1359\n    '100110110110', '010101010111', '001010010111', '010101001011', '011010100011',\n    // 1360-1364\n    '011101010010', '101101100101', '010101101010', '101010101011', '010100101011',\n    // 1365-1369\n    '110010010101', '110101001010', '110110100101', '010111001010', '101011010110',\n    // 1370-1374\n    '100101010111', '010010101011', '100101001011', '101010100101', '101101010010',\n    // 1375-1379\n    '101101101010', '010101110101', '001001110110', '100010110111', '010001011011',\n    // 1380-1384\n    '010101010101', '010110101001', '010110110100', '100111011010', '010011011101',\n    // 1385-1389\n    '001001101110', '100100110110', '101010101010', '110101010100', '110110110010',\n    // 1390-1394\n    '010111010101', '001011011010', '100101011011', '010010101011', '101001010101',\n    // 1395-1399\n    '101101001001', '101101100100', '101101110001', '010110110100', '101010110101',\n    // 1400-1404\n    '101001010101', '110100100101', '111010010010', '111011001001', '011011010100',\n    // 1405-1409\n    '101011101001', '100101101011', '010010101011', '101010010011', '110101001001',\n    // 1410-1414\n    '110110100100', '110110110010', '101010111001', '010010111010', '101001011011',\n    // 1415-1419\n    '010100101011', '101010010101', '101100101010', '101101010101', '010101011100',\n    // 1420-1424\n    '010010111101', '001000111101', '100100011101', '101010010101', '101101001010',\n    // 1425-1429\n    '101101011010', '010101101101', '001010110110', '100100111011', '010010011011',\n    // 1430-1434\n    '011001010101', '011010101001', '011101010100', '101101101010', '010101101100',\n    // 1435-1439\n    '101010101101', '010101010101', '101100101001', '101110010010', '101110101001',\n    // 1440-1444\n    '010111010100', '101011011010', '010101011010', '101010101011', '010110010101',\n    // 1445-1449\n    '011101001001', '011101100100', '101110101010', '010110110101', '001010110110',\n    // 1450-1454\n    '101001010110', '111001001101', '101100100101', '101101010010', '101101101010',\n    // 1455-1459\n    '010110101101', '001010101110', '100100101111', '010010010111', '011001001011',\n    // 1460-1464\n    '011010100101', '011010101100', '101011010110', '010101011101', '010010011101',\n    // 1465-1469\n    '101001001101', '110100010110', '110110010101', '010110101010', '010110110101',\n    // 1470-1474\n    '001011011010', '100101011011', '010010101101', '010110010101', '011011001010',\n    // 1475-1479\n    '011011100100', '101011101010', '010011110101', '001010110110', '100101010110',\n    // 1480-1484\n    '101010101010', '101101010100', '101111010010', '010111011001', '001011101010',\n    // 1485-1489\n    '100101101101', '010010101101', '101010010101', '101101001010', '101110100101',\n    // 1490-1494\n    '010110110010', '100110110101', '010011010110', '101010010111', '010101000111',\n    // 1495-1499\n    '011010010011', '011101001001', '101101010101', '010101101010', '101001101011',\n    // 1500-1504\n    '010100101011', '101010001011', '110101000110', '110110100011', '010111001010',\n    // 1505-1509\n    '101011010110', '010011011011', '001001101011', '100101001011', '101010100101',\n    // 1510-1514\n    '101101010010', '101101101001', '010101110101', '000101110110', '100010110111',\n    // 1515-1519\n    '001001011011', '010100101011', '010101100101', '010110110100', '100111011010',\n    // 1520-1524\n    '010011101101', '000101101101', '100010110110', '101010100110', '110101010010',\n    // 1525-1529\n    '110110101001', '010111010100', '101011011010', '100101011011', '010010101011',\n    // 1530-1534\n    '011001010011', '011100101001', '011101100010', '101110101001', '010110110010',\n    // 1535-1539\n    '101010110101', '010101010101', '101100100101', '110110010010', '111011001001',\n    // 1540-1544\n    '011011010010', '101011101001', '010101101011', '010010101011', '101001010101',\n    // 1545-1549\n    '110100101001', '110101010100', '110110101010', '100110110101', '010010111010',\n    // 1550-1554\n    '101000111011', '010010011011', '101001001101', '101010101010', '101011010101',\n    // 1555-1559\n    '001011011010', '100101011101', '010001011110', '101000101110', '110010011010',\n    // 1560-1564\n    '110101010101', '011010110010', '011010111001', '010010111010', '101001011101',\n    // 1565-1569\n    '010100101101', '101010010101', '101101010010', '101110101000', '101110110100',\n    // 1570-1574\n    '010110111001', '001011011010', '100101011010', '101101001010', '110110100100',\n    // 1575-1579\n    '111011010001', '011011101000', '101101101010', '010101101101', '010100110101',\n    // 1580-1584\n    '011010010101', '110101001010', '110110101000', '110111010100', '011011011010',\n    // 1585-1589\n    '010101011011', '001010011101', '011000101011', '101100010101', '101101001010',\n    // 1590-1594\n    '101110010101', '010110101010', '101010101110', '100100101110', '110010001111',\n    // 1595-1599\n    '010100100111', '011010010101', '011010101010', '101011010110', '010101011101',\n    // 1600\n    '001010011101'\n];\nfunction getDaysDiff(date1, date2) {\n    // Ignores the time part in date1 and date2:\n    const time1 = Date.UTC(date1.getFullYear(), date1.getMonth(), date1.getDate());\n    const time2 = Date.UTC(date2.getFullYear(), date2.getMonth(), date2.getDate());\n    const diff = Math.abs(time1 - time2);\n    return Math.round(diff / ONE_DAY);\n}\nclass NgbCalendarIslamicUmalqura extends NgbCalendarIslamicCivil {\n    /**\n    * Returns the equivalent islamic(Umalqura) date value for a give input Gregorian date.\n    * `gdate` is s JS Date to be converted to Hijri.\n    */\n    fromGregorian(gDate) {\n        let hDay = 1, hMonth = 0, hYear = 1300;\n        let daysDiff = getDaysDiff(gDate, GREGORIAN_FIRST_DATE);\n        if (gDate.getTime() - GREGORIAN_FIRST_DATE.getTime() >= 0 && gDate.getTime() - GREGORIAN_LAST_DATE.getTime() <= 0) {\n            let year = 1300;\n            for (let i = 0; i < MONTH_LENGTH.length; i++, year++) {\n                for (let j = 0; j < 12; j++) {\n                    let numOfDays = +MONTH_LENGTH[i][j] + 29;\n                    if (daysDiff <= numOfDays) {\n                        hDay = daysDiff + 1;\n                        if (hDay > numOfDays) {\n                            hDay = 1;\n                            j++;\n                        }\n                        if (j > 11) {\n                            j = 0;\n                            year++;\n                        }\n                        hMonth = j;\n                        hYear = year;\n                        return new NgbDate(hYear, hMonth + 1, hDay);\n                    }\n                    daysDiff = daysDiff - numOfDays;\n                }\n            }\n            return null;\n        }\n        else {\n            return super.fromGregorian(gDate);\n        }\n    }\n    /**\n    * Converts the current Hijri date to Gregorian.\n    */\n    toGregorian(hDate) {\n        const hYear = hDate.year;\n        const hMonth = hDate.month - 1;\n        const hDay = hDate.day;\n        let gDate = new Date(GREGORIAN_FIRST_DATE);\n        let dayDiff = hDay - 1;\n        if (hYear >= HIJRI_BEGIN && hYear <= HIJRI_END) {\n            for (let y = 0; y < hYear - HIJRI_BEGIN; y++) {\n                for (let m = 0; m < 12; m++) {\n                    dayDiff += +MONTH_LENGTH[y][m] + 29;\n                }\n            }\n            for (let m = 0; m < hMonth; m++) {\n                dayDiff += +MONTH_LENGTH[hYear - HIJRI_BEGIN][m] + 29;\n            }\n            gDate.setDate(GREGORIAN_FIRST_DATE.getDate() + dayDiff);\n        }\n        else {\n            gDate = super.toGregorian(hDate);\n        }\n        return gDate;\n    }\n    /**\n    * Returns the number of days in a specific Hijri hMonth.\n    * `hMonth` is 1 for Muharram, 2 for Safar, etc.\n    * `hYear` is any Hijri hYear.\n    */\n    getDaysPerMonth(hMonth, hYear) {\n        if (hYear >= HIJRI_BEGIN && hYear <= HIJRI_END) {\n            const pos = hYear - HIJRI_BEGIN;\n            return +MONTH_LENGTH[pos][hMonth - 1] + 29;\n        }\n        return super.getDaysPerMonth(hMonth, hYear);\n    }\n}\nNgbCalendarIslamicUmalqura.ɵfac = /*@__PURE__*/ function () { let ɵNgbCalendarIslamicUmalqura_BaseFactory; return function NgbCalendarIslamicUmalqura_Factory(t) { return (ɵNgbCalendarIslamicUmalqura_BaseFactory || (ɵNgbCalendarIslamicUmalqura_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NgbCalendarIslamicUmalqura)))(t || NgbCalendarIslamicUmalqura); }; }();\nNgbCalendarIslamicUmalqura.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbCalendarIslamicUmalqura, factory: NgbCalendarIslamicUmalqura.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbCalendarIslamicUmalqura, [{\n        type: Injectable\n    }], null, null); })();\n\n/**\n * Returns the equivalent JS date value for a give input Jalali date.\n * `jalaliDate` is an Jalali date to be converted to Gregorian.\n */\nfunction toGregorian$2(jalaliDate) {\n    let jdn = jalaliToJulian(jalaliDate.year, jalaliDate.month, jalaliDate.day);\n    let date = julianToGregorian(jdn);\n    date.setHours(6, 30, 3, 200);\n    return date;\n}\n/**\n * Returns the equivalent jalali date value for a give input Gregorian date.\n * `gdate` is a JS Date to be converted to jalali.\n * utc to local\n */\nfunction fromGregorian$2(gdate) {\n    let g2d = gregorianToJulian(gdate.getFullYear(), gdate.getMonth() + 1, gdate.getDate());\n    return julianToJalali(g2d);\n}\nfunction setJalaliYear(date, yearValue) {\n    date.year = +yearValue;\n    return date;\n}\nfunction setJalaliMonth(date, month) {\n    month = +month;\n    date.year = date.year + Math.floor((month - 1) / 12);\n    date.month = Math.floor(((month - 1) % 12 + 12) % 12) + 1;\n    return date;\n}\nfunction setJalaliDay(date, day) {\n    let mDays = getDaysPerMonth(date.month, date.year);\n    if (day <= 0) {\n        while (day <= 0) {\n            date = setJalaliMonth(date, date.month - 1);\n            mDays = getDaysPerMonth(date.month, date.year);\n            day += mDays;\n        }\n    }\n    else if (day > mDays) {\n        while (day > mDays) {\n            day -= mDays;\n            date = setJalaliMonth(date, date.month + 1);\n            mDays = getDaysPerMonth(date.month, date.year);\n        }\n    }\n    date.day = day;\n    return date;\n}\nfunction mod(a, b) {\n    return a - b * Math.floor(a / b);\n}\nfunction div(a, b) {\n    return Math.trunc(a / b);\n}\n/*\n This function determines if the Jalali (Persian) year is\n leap (366-day long) or is the common year (365 days), and\n finds the day in March (Gregorian calendar) of the first\n day of the Jalali year (jalaliYear).\n @param jalaliYear Jalali calendar year (-61 to 3177)\n @return\n leap: number of years since the last leap year (0 to 4)\n gYear: Gregorian year of the beginning of Jalali year\n march: the March day of Farvardin the 1st (1st day of jalaliYear)\n @see: http://www.astro.uni.torun.pl/~kb/Papers/EMP/PersianC-EMP.htm\n @see: http://www.fourmilab.ch/documents/calendar/\n */\nfunction jalCal(jalaliYear) {\n    // Jalali years starting the 33-year rule.\n    let breaks = [-61, 9, 38, 199, 426, 686, 756, 818, 1111, 1181, 1210, 1635, 2060, 2097, 2192, 2262, 2324, 2394, 2456, 3178];\n    const breaksLength = breaks.length;\n    const gYear = jalaliYear + 621;\n    let leapJ = -14;\n    let jp = breaks[0];\n    if (jalaliYear < jp || jalaliYear >= breaks[breaksLength - 1]) {\n        throw new Error('Invalid Jalali year ' + jalaliYear);\n    }\n    // Find the limiting years for the Jalali year jalaliYear.\n    let jump;\n    for (let i = 1; i < breaksLength; i += 1) {\n        const jm = breaks[i];\n        jump = jm - jp;\n        if (jalaliYear < jm) {\n            break;\n        }\n        leapJ = leapJ + div(jump, 33) * 8 + div(mod(jump, 33), 4);\n        jp = jm;\n    }\n    let n = jalaliYear - jp;\n    // Find the number of leap years from AD 621 to the beginning\n    // of the current Jalali year in the Persian calendar.\n    leapJ = leapJ + div(n, 33) * 8 + div(mod(n, 33) + 3, 4);\n    if (mod(jump, 33) === 4 && jump - n === 4) {\n        leapJ += 1;\n    }\n    // And the same in the Gregorian calendar (until the year gYear).\n    const leapG = div(gYear, 4) - div((div(gYear, 100) + 1) * 3, 4) - 150;\n    // Determine the Gregorian date of Farvardin the 1st.\n    const march = 20 + leapJ - leapG;\n    // Find how many years have passed since the last leap year.\n    if (jump - n < 6) {\n        n = n - jump + div(jump + 4, 33) * 33;\n    }\n    let leap = mod(mod(n + 1, 33) - 1, 4);\n    if (leap === -1) {\n        leap = 4;\n    }\n    return { leap: leap, gy: gYear, march: march };\n}\n/*\n Calculates Gregorian and Julian calendar dates from the Julian Day number\n (jdn) for the period since jdn=-34839655 (i.e. the year -100100 of both\n calendars) to some millions years ahead of the present.\n @param jdn Julian Day number\n @return\n gYear: Calendar year (years BC numbered 0, -1, -2, ...)\n gMonth: Calendar month (1 to 12)\n gDay: Calendar day of the month M (1 to 28/29/30/31)\n */\nfunction julianToGregorian(julianDayNumber) {\n    let j = 4 * julianDayNumber + 139361631;\n    j = j + div(div(4 * julianDayNumber + 183187720, 146097) * 3, 4) * 4 - 3908;\n    const i = div(mod(j, 1461), 4) * 5 + 308;\n    const gDay = div(mod(i, 153), 5) + 1;\n    const gMonth = mod(div(i, 153), 12) + 1;\n    const gYear = div(j, 1461) - 100100 + div(8 - gMonth, 6);\n    return new Date(gYear, gMonth - 1, gDay);\n}\n/*\n Converts a date of the Jalali calendar to the Julian Day number.\n @param jy Jalali year (1 to 3100)\n @param jm Jalali month (1 to 12)\n @param jd Jalali day (1 to 29/31)\n @return Julian Day number\n */\nfunction gregorianToJulian(gy, gm, gd) {\n    let d = div((gy + div(gm - 8, 6) + 100100) * 1461, 4) + div(153 * mod(gm + 9, 12) + 2, 5) + gd - 34840408;\n    d = d - div(div(gy + 100100 + div(gm - 8, 6), 100) * 3, 4) + 752;\n    return d;\n}\n/*\n Converts the Julian Day number to a date in the Jalali calendar.\n @param julianDayNumber Julian Day number\n @return\n jalaliYear: Jalali year (1 to 3100)\n jalaliMonth: Jalali month (1 to 12)\n jalaliDay: Jalali day (1 to 29/31)\n */\nfunction julianToJalali(julianDayNumber) {\n    let gy = julianToGregorian(julianDayNumber).getFullYear() // Calculate Gregorian year (gy).\n    , jalaliYear = gy - 621, r = jalCal(jalaliYear), gregorianDay = gregorianToJulian(gy, 3, r.march), jalaliDay, jalaliMonth, numberOfDays;\n    // Find number of days that passed since 1 Farvardin.\n    numberOfDays = julianDayNumber - gregorianDay;\n    if (numberOfDays >= 0) {\n        if (numberOfDays <= 185) {\n            // The first 6 months.\n            jalaliMonth = 1 + div(numberOfDays, 31);\n            jalaliDay = mod(numberOfDays, 31) + 1;\n            return new NgbDate(jalaliYear, jalaliMonth, jalaliDay);\n        }\n        else {\n            // The remaining months.\n            numberOfDays -= 186;\n        }\n    }\n    else {\n        // Previous Jalali year.\n        jalaliYear -= 1;\n        numberOfDays += 179;\n        if (r.leap === 1) {\n            numberOfDays += 1;\n        }\n    }\n    jalaliMonth = 7 + div(numberOfDays, 30);\n    jalaliDay = mod(numberOfDays, 30) + 1;\n    return new NgbDate(jalaliYear, jalaliMonth, jalaliDay);\n}\n/*\n Converts a date of the Jalali calendar to the Julian Day number.\n @param jYear Jalali year (1 to 3100)\n @param jMonth Jalali month (1 to 12)\n @param jDay Jalali day (1 to 29/31)\n @return Julian Day number\n */\nfunction jalaliToJulian(jYear, jMonth, jDay) {\n    let r = jalCal(jYear);\n    return gregorianToJulian(r.gy, 3, r.march) + (jMonth - 1) * 31 - div(jMonth, 7) * (jMonth - 7) + jDay - 1;\n}\n/**\n * Returns the number of days in a specific jalali month.\n */\nfunction getDaysPerMonth(month, year) {\n    if (month <= 6) {\n        return 31;\n    }\n    if (month <= 11) {\n        return 30;\n    }\n    if (jalCal(year).leap === 0) {\n        return 30;\n    }\n    return 29;\n}\n\nclass NgbCalendarPersian extends NgbCalendar {\n    getDaysPerWeek() { return 7; }\n    getMonths() { return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; }\n    getWeeksPerMonth() { return 6; }\n    getNext(date, period = 'd', number = 1) {\n        date = new NgbDate(date.year, date.month, date.day);\n        switch (period) {\n            case 'y':\n                date = setJalaliYear(date, date.year + number);\n                date.month = 1;\n                date.day = 1;\n                return date;\n            case 'm':\n                date = setJalaliMonth(date, date.month + number);\n                date.day = 1;\n                return date;\n            case 'd':\n                return setJalaliDay(date, date.day + number);\n            default:\n                return date;\n        }\n    }\n    getPrev(date, period = 'd', number = 1) { return this.getNext(date, period, -number); }\n    getWeekday(date) {\n        const day = toGregorian$2(date).getDay();\n        // in JS Date Sun=0, in ISO 8601 Sun=7\n        return day === 0 ? 7 : day;\n    }\n    getWeekNumber(week, firstDayOfWeek) {\n        // in JS Date Sun=0, in ISO 8601 Sun=7\n        if (firstDayOfWeek === 7) {\n            firstDayOfWeek = 0;\n        }\n        const thursdayIndex = (4 + 7 - firstDayOfWeek) % 7;\n        const date = week[thursdayIndex];\n        const jsDate = toGregorian$2(date);\n        jsDate.setDate(jsDate.getDate() + 4 - (jsDate.getDay() || 7)); // Thursday\n        const time = jsDate.getTime();\n        const startDate = toGregorian$2(new NgbDate(date.year, 1, 1));\n        return Math.floor(Math.round((time - startDate.getTime()) / 86400000) / 7) + 1;\n    }\n    getToday() { return fromGregorian$2(new Date()); }\n    isValid(date) {\n        return date != null && isInteger(date.year) && isInteger(date.month) && isInteger(date.day) &&\n            !isNaN(toGregorian$2(date).getTime());\n    }\n}\nNgbCalendarPersian.ɵfac = /*@__PURE__*/ function () { let ɵNgbCalendarPersian_BaseFactory; return function NgbCalendarPersian_Factory(t) { return (ɵNgbCalendarPersian_BaseFactory || (ɵNgbCalendarPersian_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NgbCalendarPersian)))(t || NgbCalendarPersian); }; }();\nNgbCalendarPersian.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbCalendarPersian, factory: NgbCalendarPersian.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbCalendarPersian, [{\n        type: Injectable\n    }], null, null); })();\n\nconst PARTS_PER_HOUR = 1080;\nconst PARTS_PER_DAY = 24 * PARTS_PER_HOUR;\nconst PARTS_FRACTIONAL_MONTH = 12 * PARTS_PER_HOUR + 793;\nconst PARTS_PER_MONTH = 29 * PARTS_PER_DAY + PARTS_FRACTIONAL_MONTH;\nconst BAHARAD = 11 * PARTS_PER_HOUR + 204;\nconst HEBREW_DAY_ON_JAN_1_1970 = 2092591;\nconst GREGORIAN_EPOCH = 1721425.5;\nfunction isGregorianLeapYear(year) {\n    return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n}\nfunction numberOfFirstDayInYear(year) {\n    let monthsBeforeYear = Math.floor((235 * year - 234) / 19);\n    let fractionalMonthsBeforeYear = monthsBeforeYear * PARTS_FRACTIONAL_MONTH + BAHARAD;\n    let dayNumber = monthsBeforeYear * 29 + Math.floor(fractionalMonthsBeforeYear / PARTS_PER_DAY);\n    let timeOfDay = fractionalMonthsBeforeYear % PARTS_PER_DAY;\n    let dayOfWeek = dayNumber % 7; // 0 == Monday\n    if (dayOfWeek === 2 || dayOfWeek === 4 || dayOfWeek === 6) {\n        dayNumber++;\n        dayOfWeek = dayNumber % 7;\n    }\n    if (dayOfWeek === 1 && timeOfDay > 15 * PARTS_PER_HOUR + 204 && !isHebrewLeapYear(year)) {\n        dayNumber += 2;\n    }\n    else if (dayOfWeek === 0 && timeOfDay > 21 * PARTS_PER_HOUR + 589 && isHebrewLeapYear(year - 1)) {\n        dayNumber++;\n    }\n    return dayNumber;\n}\nfunction getDaysInGregorianMonth(month, year) {\n    let days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n    if (isGregorianLeapYear(year)) {\n        days[1]++;\n    }\n    return days[month - 1];\n}\nfunction getHebrewMonths(year) {\n    return isHebrewLeapYear(year) ? 13 : 12;\n}\n/**\n * Returns the number of days in a specific Hebrew year.\n * `year` is any Hebrew year.\n */\nfunction getDaysInHebrewYear(year) {\n    return numberOfFirstDayInYear(year + 1) - numberOfFirstDayInYear(year);\n}\nfunction isHebrewLeapYear(year) {\n    if (year != null) {\n        let b = (year * 12 + 17) % 19;\n        return b >= ((b < 0) ? -7 : 12);\n    }\n    return false;\n}\n/**\n * Returns the number of days in a specific Hebrew month.\n * `month` is 1 for Nisan, 2 for Iyar etc. Note: Hebrew leap year contains 13 months.\n * `year` is any Hebrew year.\n */\nfunction getDaysInHebrewMonth(month, year) {\n    let yearLength = numberOfFirstDayInYear(year + 1) - numberOfFirstDayInYear(year);\n    let yearType = (yearLength <= 380 ? yearLength : (yearLength - 30)) - 353;\n    let leapYear = isHebrewLeapYear(year);\n    let daysInMonth = leapYear ? [30, 29, 29, 29, 30, 30, 29, 30, 29, 30, 29, 30, 29] :\n        [30, 29, 29, 29, 30, 29, 30, 29, 30, 29, 30, 29];\n    if (yearType > 0) {\n        daysInMonth[2]++; // Kislev gets an extra day in normal or complete years.\n    }\n    if (yearType > 1) {\n        daysInMonth[1]++; // Heshvan gets an extra day in complete years only.\n    }\n    return daysInMonth[month - 1];\n}\nfunction getDayNumberInHebrewYear(date) {\n    let numberOfDay = 0;\n    for (let i = 1; i < date.month; i++) {\n        numberOfDay += getDaysInHebrewMonth(i, date.year);\n    }\n    return numberOfDay + date.day;\n}\nfunction setHebrewMonth(date, val) {\n    let after = val >= 0;\n    if (!after) {\n        val = -val;\n    }\n    while (val > 0) {\n        if (after) {\n            if (val > getHebrewMonths(date.year) - date.month) {\n                val -= getHebrewMonths(date.year) - date.month + 1;\n                date.year++;\n                date.month = 1;\n            }\n            else {\n                date.month += val;\n                val = 0;\n            }\n        }\n        else {\n            if (val >= date.month) {\n                date.year--;\n                val -= date.month;\n                date.month = getHebrewMonths(date.year);\n            }\n            else {\n                date.month -= val;\n                val = 0;\n            }\n        }\n    }\n    return date;\n}\nfunction setHebrewDay(date, val) {\n    let after = val >= 0;\n    if (!after) {\n        val = -val;\n    }\n    while (val > 0) {\n        if (after) {\n            if (val > getDaysInHebrewYear(date.year) - getDayNumberInHebrewYear(date)) {\n                val -= getDaysInHebrewYear(date.year) - getDayNumberInHebrewYear(date) + 1;\n                date.year++;\n                date.month = 1;\n                date.day = 1;\n            }\n            else if (val > getDaysInHebrewMonth(date.month, date.year) - date.day) {\n                val -= getDaysInHebrewMonth(date.month, date.year) - date.day + 1;\n                date.month++;\n                date.day = 1;\n            }\n            else {\n                date.day += val;\n                val = 0;\n            }\n        }\n        else {\n            if (val >= date.day) {\n                val -= date.day;\n                date.month--;\n                if (date.month === 0) {\n                    date.year--;\n                    date.month = getHebrewMonths(date.year);\n                }\n                date.day = getDaysInHebrewMonth(date.month, date.year);\n            }\n            else {\n                date.day -= val;\n                val = 0;\n            }\n        }\n    }\n    return date;\n}\n/**\n * Returns the equivalent Hebrew date value for a give input Gregorian date.\n * `gdate` is a JS Date to be converted to Hebrew date.\n */\nfunction fromGregorian$1(gdate) {\n    const date = new Date(gdate);\n    const gYear = date.getFullYear(), gMonth = date.getMonth(), gDay = date.getDate();\n    let julianDay = GREGORIAN_EPOCH - 1 + 365 * (gYear - 1) + Math.floor((gYear - 1) / 4) -\n        Math.floor((gYear - 1) / 100) + Math.floor((gYear - 1) / 400) +\n        Math.floor((367 * (gMonth + 1) - 362) / 12 + (gMonth + 1 <= 2 ? 0 : isGregorianLeapYear(gYear) ? -1 : -2) + gDay);\n    julianDay = Math.floor(julianDay + 0.5);\n    let daysSinceHebEpoch = julianDay - 347997;\n    let monthsSinceHebEpoch = Math.floor(daysSinceHebEpoch * PARTS_PER_DAY / PARTS_PER_MONTH);\n    let hYear = Math.floor((monthsSinceHebEpoch * 19 + 234) / 235) + 1;\n    let firstDayOfThisYear = numberOfFirstDayInYear(hYear);\n    let dayOfYear = daysSinceHebEpoch - firstDayOfThisYear;\n    while (dayOfYear < 1) {\n        hYear--;\n        firstDayOfThisYear = numberOfFirstDayInYear(hYear);\n        dayOfYear = daysSinceHebEpoch - firstDayOfThisYear;\n    }\n    let hMonth = 1;\n    let hDay = dayOfYear;\n    while (hDay > getDaysInHebrewMonth(hMonth, hYear)) {\n        hDay -= getDaysInHebrewMonth(hMonth, hYear);\n        hMonth++;\n    }\n    return new NgbDate(hYear, hMonth, hDay);\n}\n/**\n * Returns the equivalent JS date value for a given Hebrew date.\n * `hebrewDate` is an Hebrew date to be converted to Gregorian.\n */\nfunction toGregorian$1(hebrewDate) {\n    const hYear = hebrewDate.year;\n    const hMonth = hebrewDate.month;\n    const hDay = hebrewDate.day;\n    let days = numberOfFirstDayInYear(hYear);\n    for (let i = 1; i < hMonth; i++) {\n        days += getDaysInHebrewMonth(i, hYear);\n    }\n    days += hDay;\n    let diffDays = days - HEBREW_DAY_ON_JAN_1_1970;\n    let after = diffDays >= 0;\n    if (!after) {\n        diffDays = -diffDays;\n    }\n    let gYear = 1970;\n    let gMonth = 1;\n    let gDay = 1;\n    while (diffDays > 0) {\n        if (after) {\n            if (diffDays >= (isGregorianLeapYear(gYear) ? 366 : 365)) {\n                diffDays -= isGregorianLeapYear(gYear) ? 366 : 365;\n                gYear++;\n            }\n            else if (diffDays >= getDaysInGregorianMonth(gMonth, gYear)) {\n                diffDays -= getDaysInGregorianMonth(gMonth, gYear);\n                gMonth++;\n            }\n            else {\n                gDay += diffDays;\n                diffDays = 0;\n            }\n        }\n        else {\n            if (diffDays >= (isGregorianLeapYear(gYear - 1) ? 366 : 365)) {\n                diffDays -= isGregorianLeapYear(gYear - 1) ? 366 : 365;\n                gYear--;\n            }\n            else {\n                if (gMonth > 1) {\n                    gMonth--;\n                }\n                else {\n                    gMonth = 12;\n                    gYear--;\n                }\n                if (diffDays >= getDaysInGregorianMonth(gMonth, gYear)) {\n                    diffDays -= getDaysInGregorianMonth(gMonth, gYear);\n                }\n                else {\n                    gDay = getDaysInGregorianMonth(gMonth, gYear) - diffDays + 1;\n                    diffDays = 0;\n                }\n            }\n        }\n    }\n    return new Date(gYear, gMonth - 1, gDay);\n}\nfunction hebrewNumerals(numerals) {\n    if (!numerals) {\n        return '';\n    }\n    const hArray0_9 = ['', '\\u05d0', '\\u05d1', '\\u05d2', '\\u05d3', '\\u05d4', '\\u05d5', '\\u05d6', '\\u05d7', '\\u05d8'];\n    const hArray10_19 = [\n        '\\u05d9', '\\u05d9\\u05d0', '\\u05d9\\u05d1', '\\u05d9\\u05d2', '\\u05d9\\u05d3', '\\u05d8\\u05d5', '\\u05d8\\u05d6',\n        '\\u05d9\\u05d6', '\\u05d9\\u05d7', '\\u05d9\\u05d8'\n    ];\n    const hArray20_90 = ['', '', '\\u05db', '\\u05dc', '\\u05de', '\\u05e0', '\\u05e1', '\\u05e2', '\\u05e4', '\\u05e6'];\n    const hArray100_900 = [\n        '', '\\u05e7', '\\u05e8', '\\u05e9', '\\u05ea', '\\u05ea\\u05e7', '\\u05ea\\u05e8', '\\u05ea\\u05e9', '\\u05ea\\u05ea',\n        '\\u05ea\\u05ea\\u05e7'\n    ];\n    const hArray1000_9000 = [\n        '', '\\u05d0', '\\u05d1', '\\u05d1\\u05d0', '\\u05d1\\u05d1', '\\u05d4', '\\u05d4\\u05d0', '\\u05d4\\u05d1',\n        '\\u05d4\\u05d1\\u05d0', '\\u05d4\\u05d1\\u05d1'\n    ];\n    const geresh = '\\u05f3', gershaim = '\\u05f4';\n    let mem = 0;\n    let result = [];\n    let step = 0;\n    while (numerals > 0) {\n        let m = numerals % 10;\n        if (step === 0) {\n            mem = m;\n        }\n        else if (step === 1) {\n            if (m !== 1) {\n                result.unshift(hArray20_90[m], hArray0_9[mem]);\n            }\n            else {\n                result.unshift(hArray10_19[mem]);\n            }\n        }\n        else if (step === 2) {\n            result.unshift(hArray100_900[m]);\n        }\n        else {\n            if (m !== 5) {\n                result.unshift(hArray1000_9000[m], geresh, ' ');\n            }\n            break;\n        }\n        numerals = Math.floor(numerals / 10);\n        if (step === 0 && numerals === 0) {\n            result.unshift(hArray0_9[m]);\n        }\n        step++;\n    }\n    result = result.join('').split('');\n    if (result.length === 1) {\n        result.push(geresh);\n    }\n    else if (result.length > 1) {\n        result.splice(result.length - 1, 0, gershaim);\n    }\n    return result.join('');\n}\n\n/**\n * @since 3.2.0\n */\nclass NgbCalendarHebrew extends NgbCalendar {\n    getDaysPerWeek() { return 7; }\n    getMonths(year) {\n        if (year && isHebrewLeapYear(year)) {\n            return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];\n        }\n        else {\n            return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\n        }\n    }\n    getWeeksPerMonth() { return 6; }\n    isValid(date) {\n        if (date != null) {\n            let b = isNumber(date.year) && isNumber(date.month) && isNumber(date.day);\n            b = b && date.month > 0 && date.month <= (isHebrewLeapYear(date.year) ? 13 : 12);\n            b = b && date.day > 0 && date.day <= getDaysInHebrewMonth(date.month, date.year);\n            return b && !isNaN(toGregorian$1(date).getTime());\n        }\n        return false;\n    }\n    getNext(date, period = 'd', number = 1) {\n        date = new NgbDate(date.year, date.month, date.day);\n        switch (period) {\n            case 'y':\n                date.year += number;\n                date.month = 1;\n                date.day = 1;\n                return date;\n            case 'm':\n                date = setHebrewMonth(date, number);\n                date.day = 1;\n                return date;\n            case 'd':\n                return setHebrewDay(date, number);\n            default:\n                return date;\n        }\n    }\n    getPrev(date, period = 'd', number = 1) { return this.getNext(date, period, -number); }\n    getWeekday(date) {\n        const day = toGregorian$1(date).getDay();\n        // in JS Date Sun=0, in ISO 8601 Sun=7\n        return day === 0 ? 7 : day;\n    }\n    getWeekNumber(week, firstDayOfWeek) {\n        const date = week[week.length - 1];\n        return Math.ceil(getDayNumberInHebrewYear(date) / 7);\n    }\n    getToday() { return fromGregorian$1(new Date()); }\n    /**\n     * @since 3.4.0\n     */\n    toGregorian(date) { return fromJSDate(toGregorian$1(date)); }\n    /**\n     * @since 3.4.0\n     */\n    fromGregorian(date) { return fromGregorian$1(toJSDate(date)); }\n}\nNgbCalendarHebrew.ɵfac = /*@__PURE__*/ function () { let ɵNgbCalendarHebrew_BaseFactory; return function NgbCalendarHebrew_Factory(t) { return (ɵNgbCalendarHebrew_BaseFactory || (ɵNgbCalendarHebrew_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NgbCalendarHebrew)))(t || NgbCalendarHebrew); }; }();\nNgbCalendarHebrew.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbCalendarHebrew, factory: NgbCalendarHebrew.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbCalendarHebrew, [{\n        type: Injectable\n    }], null, null); })();\n\nconst WEEKDAYS = ['שני', 'שלישי', 'רביעי', 'חמישי', 'שישי', 'שבת', 'ראשון'];\nconst MONTHS = ['תשרי', 'חשון', 'כסלו', 'טבת', 'שבט', 'אדר', 'ניסן', 'אייר', 'סיון', 'תמוז', 'אב', 'אלול'];\nconst MONTHS_LEAP = ['תשרי', 'חשון', 'כסלו', 'טבת', 'שבט', 'אדר א׳', 'אדר ב׳', 'ניסן', 'אייר', 'סיון', 'תמוז', 'אב', 'אלול'];\n/**\n * @since 3.2.0\n */\nclass NgbDatepickerI18nHebrew extends NgbDatepickerI18n {\n    getMonthShortName(month, year) { return this.getMonthFullName(month, year); }\n    getMonthFullName(month, year) {\n        return isHebrewLeapYear(year) ? MONTHS_LEAP[month - 1] || '' : MONTHS[month - 1] || '';\n    }\n    getWeekdayLabel(weekday, width) { return WEEKDAYS[weekday - 1] || ''; }\n    getDayAriaLabel(date) {\n        return `${hebrewNumerals(date.day)} ${this.getMonthFullName(date.month, date.year)} ${hebrewNumerals(date.year)}`;\n    }\n    getDayNumerals(date) { return hebrewNumerals(date.day); }\n    getWeekNumerals(weekNumber) { return hebrewNumerals(weekNumber); }\n    getYearNumerals(year) { return hebrewNumerals(year); }\n}\nNgbDatepickerI18nHebrew.ɵfac = /*@__PURE__*/ function () { let ɵNgbDatepickerI18nHebrew_BaseFactory; return function NgbDatepickerI18nHebrew_Factory(t) { return (ɵNgbDatepickerI18nHebrew_BaseFactory || (ɵNgbDatepickerI18nHebrew_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NgbDatepickerI18nHebrew)))(t || NgbDatepickerI18nHebrew); }; }();\nNgbDatepickerI18nHebrew.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbDatepickerI18nHebrew, factory: NgbDatepickerI18nHebrew.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDatepickerI18nHebrew, [{\n        type: Injectable\n    }], null, null); })();\n\n/**\n * Returns the equivalent JS date value for a give input Buddhist date.\n * `date` is an Buddhist date to be converted to Gregorian.\n */\nfunction toGregorian(date) {\n    return new Date(date.year - 543, date.month - 1, date.day);\n}\n/**\n * Returns the equivalent Buddhist date value for a give input Gregorian date.\n * `gdate` is a JS Date to be converted to Buddhist.\n * utc to local\n */\nfunction fromGregorian(gdate) {\n    return new NgbDate(gdate.getFullYear() + 543, gdate.getMonth() + 1, gdate.getDate());\n}\n\n/**\n * @since 9.1.0\n */\nclass NgbCalendarBuddhist extends NgbCalendarGregorian {\n    getToday() { return fromGregorian(new Date()); }\n    getNext(date, period = 'd', number = 1) {\n        let jsDate = toGregorian(date);\n        let checkMonth = true;\n        let expectedMonth = jsDate.getMonth();\n        switch (period) {\n            case 'y':\n                jsDate.setFullYear(jsDate.getFullYear() + number);\n                break;\n            case 'm':\n                expectedMonth += number;\n                jsDate.setMonth(expectedMonth);\n                expectedMonth = expectedMonth % 12;\n                if (expectedMonth < 0) {\n                    expectedMonth = expectedMonth + 12;\n                }\n                break;\n            case 'd':\n                jsDate.setDate(jsDate.getDate() + number);\n                checkMonth = false;\n                break;\n            default:\n                return date;\n        }\n        if (checkMonth && jsDate.getMonth() !== expectedMonth) {\n            // this means the destination month has less days than the initial month\n            // let's go back to the end of the previous month:\n            jsDate.setDate(0);\n        }\n        return fromGregorian(jsDate);\n    }\n    getPrev(date, period = 'd', number = 1) { return this.getNext(date, period, -number); }\n    getWeekday(date) {\n        let jsDate = toGregorian(date);\n        let day = jsDate.getDay();\n        // in JS Date Sun=0, in ISO 8601 Sun=7\n        return day === 0 ? 7 : day;\n    }\n    getWeekNumber(week, firstDayOfWeek) {\n        // in JS Date Sun=0, in ISO 8601 Sun=7\n        if (firstDayOfWeek === 7) {\n            firstDayOfWeek = 0;\n        }\n        const thursdayIndex = (4 + 7 - firstDayOfWeek) % 7;\n        let date = week[thursdayIndex];\n        const jsDate = toGregorian(date);\n        jsDate.setDate(jsDate.getDate() + 4 - (jsDate.getDay() || 7)); // Thursday\n        const time = jsDate.getTime();\n        jsDate.setMonth(0); // Compare with Jan 1\n        jsDate.setDate(1);\n        return Math.floor(Math.round((time - jsDate.getTime()) / 86400000) / 7) + 1;\n    }\n    isValid(date) {\n        if (!date || !isInteger(date.year) || !isInteger(date.month) || !isInteger(date.day)) {\n            return false;\n        }\n        // year 0 doesn't exist in Gregorian calendar\n        if (date.year === 0) {\n            return false;\n        }\n        const jsDate = toGregorian(date);\n        return !isNaN(jsDate.getTime()) && jsDate.getFullYear() === date.year - 543 &&\n            jsDate.getMonth() + 1 === date.month && jsDate.getDate() === date.day;\n    }\n}\nNgbCalendarBuddhist.ɵfac = /*@__PURE__*/ function () { let ɵNgbCalendarBuddhist_BaseFactory; return function NgbCalendarBuddhist_Factory(t) { return (ɵNgbCalendarBuddhist_BaseFactory || (ɵNgbCalendarBuddhist_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NgbCalendarBuddhist)))(t || NgbCalendarBuddhist); }; }();\nNgbCalendarBuddhist.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbCalendarBuddhist, factory: NgbCalendarBuddhist.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbCalendarBuddhist, [{\n        type: Injectable\n    }], null, null); })();\n\n/**\n * [`NgbDateAdapter`](#/components/datepicker/api#NgbDateAdapter) implementation that uses\n * native javascript dates as a user date model.\n */\nclass NgbDateNativeAdapter extends NgbDateAdapter {\n    /**\n     * Converts a native `Date` to a `NgbDateStruct`.\n     */\n    fromModel(date) {\n        return (date instanceof Date && !isNaN(date.getTime())) ? this._fromNativeDate(date) : null;\n    }\n    /**\n     * Converts a `NgbDateStruct` to a native `Date`.\n     */\n    toModel(date) {\n        return date && isInteger(date.year) && isInteger(date.month) && isInteger(date.day) ? this._toNativeDate(date) :\n            null;\n    }\n    _fromNativeDate(date) {\n        return { year: date.getFullYear(), month: date.getMonth() + 1, day: date.getDate() };\n    }\n    _toNativeDate(date) {\n        const jsDate = new Date(date.year, date.month - 1, date.day, 12);\n        // avoid 30 -> 1930 conversion\n        jsDate.setFullYear(date.year);\n        return jsDate;\n    }\n}\nNgbDateNativeAdapter.ɵfac = /*@__PURE__*/ function () { let ɵNgbDateNativeAdapter_BaseFactory; return function NgbDateNativeAdapter_Factory(t) { return (ɵNgbDateNativeAdapter_BaseFactory || (ɵNgbDateNativeAdapter_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NgbDateNativeAdapter)))(t || NgbDateNativeAdapter); }; }();\nNgbDateNativeAdapter.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbDateNativeAdapter, factory: NgbDateNativeAdapter.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDateNativeAdapter, [{\n        type: Injectable\n    }], null, null); })();\n\n/**\n * Same as [`NgbDateNativeAdapter`](#/components/datepicker/api#NgbDateNativeAdapter), but with UTC dates.\n *\n * @since 3.2.0\n */\nclass NgbDateNativeUTCAdapter extends NgbDateNativeAdapter {\n    _fromNativeDate(date) {\n        return { year: date.getUTCFullYear(), month: date.getUTCMonth() + 1, day: date.getUTCDate() };\n    }\n    _toNativeDate(date) {\n        const jsDate = new Date(Date.UTC(date.year, date.month - 1, date.day));\n        // avoid 30 -> 1930 conversion\n        jsDate.setUTCFullYear(date.year);\n        return jsDate;\n    }\n}\nNgbDateNativeUTCAdapter.ɵfac = /*@__PURE__*/ function () { let ɵNgbDateNativeUTCAdapter_BaseFactory; return function NgbDateNativeUTCAdapter_Factory(t) { return (ɵNgbDateNativeUTCAdapter_BaseFactory || (ɵNgbDateNativeUTCAdapter_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NgbDateNativeUTCAdapter)))(t || NgbDateNativeUTCAdapter); }; }();\nNgbDateNativeUTCAdapter.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbDateNativeUTCAdapter, factory: NgbDateNativeUTCAdapter.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDateNativeUTCAdapter, [{\n        type: Injectable\n    }], null, null); })();\n\nclass NgbDatepickerModule {\n}\nNgbDatepickerModule.ɵfac = function NgbDatepickerModule_Factory(t) { return new (t || NgbDatepickerModule)(); };\nNgbDatepickerModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbDatepickerModule });\nNgbDatepickerModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [[CommonModule, FormsModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDatepickerModule, [{\n        type: NgModule,\n        args: [{\n                declarations: [\n                    NgbDatepicker, NgbDatepickerContent, NgbDatepickerMonth, NgbDatepickerNavigation, NgbDatepickerNavigationSelect,\n                    NgbDatepickerDayView, NgbInputDatepicker\n                ],\n                exports: [NgbDatepicker, NgbDatepickerContent, NgbInputDatepicker, NgbDatepickerMonth],\n                imports: [CommonModule, FormsModule],\n                entryComponents: [NgbDatepicker]\n            }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbDatepickerModule, { declarations: function () { return [NgbDatepicker, NgbDatepickerContent, NgbDatepickerMonth, NgbDatepickerNavigation, NgbDatepickerNavigationSelect, NgbDatepickerDayView, NgbInputDatepicker]; }, imports: function () { return [CommonModule, FormsModule]; }, exports: function () { return [NgbDatepicker, NgbDatepickerContent, NgbInputDatepicker, NgbDatepickerMonth]; } }); })();\n\n/**\n * A configuration service for the [`NgbDropdown`](#/components/dropdown/api#NgbDropdown) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the dropdowns used in the application.\n */\nclass NgbDropdownConfig {\n    constructor() {\n        this.autoClose = true;\n        this.placement = ['bottom-left', 'bottom-right', 'top-left', 'top-right'];\n    }\n}\nNgbDropdownConfig.ɵfac = function NgbDropdownConfig_Factory(t) { return new (t || NgbDropdownConfig)(); };\nNgbDropdownConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbDropdownConfig_Factory() { return new NgbDropdownConfig(); }, token: NgbDropdownConfig, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDropdownConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return []; }, null); })();\n\nclass NgbNavbar {\n}\nNgbNavbar.ɵfac = function NgbNavbar_Factory(t) { return new (t || NgbNavbar)(); };\nNgbNavbar.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbNavbar, selectors: [[\"\", 8, \"navbar\"]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbNavbar, [{\n        type: Directive,\n        args: [{ selector: '.navbar' }]\n    }], null, null); })();\n/**\n * A directive you should put on a dropdown item to enable keyboard navigation.\n * Arrow keys will move focus between items marked with this directive.\n *\n * @since 4.1.0\n */\nclass NgbDropdownItem {\n    constructor(elementRef) {\n        this.elementRef = elementRef;\n        this._disabled = false;\n    }\n    set disabled(value) {\n        this._disabled = value === '' || value === true; // accept an empty attribute as true\n    }\n    get disabled() { return this._disabled; }\n}\nNgbDropdownItem.ɵfac = function NgbDropdownItem_Factory(t) { return new (t || NgbDropdownItem)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nNgbDropdownItem.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbDropdownItem, selectors: [[\"\", \"ngbDropdownItem\", \"\"]], hostAttrs: [1, \"dropdown-item\"], hostVars: 2, hostBindings: function NgbDropdownItem_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵclassProp(\"disabled\", ctx.disabled);\n    } }, inputs: { disabled: \"disabled\" } });\nNgbDropdownItem.ctorParameters = () => [\n    { type: ElementRef }\n];\nNgbDropdownItem.propDecorators = {\n    disabled: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDropdownItem, [{\n        type: Directive,\n        args: [{ selector: '[ngbDropdownItem]', host: { 'class': 'dropdown-item', '[class.disabled]': 'disabled' } }]\n    }], function () { return [{ type: ɵngcc0.ElementRef }]; }, { disabled: [{\n            type: Input\n        }] }); })();\n/**\n * A directive that wraps dropdown menu content and dropdown items.\n */\nclass NgbDropdownMenu {\n    constructor(dropdown, _elementRef) {\n        this.dropdown = dropdown;\n        this.placement = 'bottom';\n        this.isOpen = false;\n        this.nativeElement = _elementRef.nativeElement;\n    }\n}\nNgbDropdownMenu.ɵfac = function NgbDropdownMenu_Factory(t) { return new (t || NgbDropdownMenu)(ɵngcc0.ɵɵdirectiveInject(forwardRef(() => NgbDropdown)), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nNgbDropdownMenu.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbDropdownMenu, selectors: [[\"\", \"ngbDropdownMenu\", \"\"]], contentQueries: function NgbDropdownMenu_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbDropdownItem, 4);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.menuItems = _t);\n    } }, hostVars: 5, hostBindings: function NgbDropdownMenu_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"keydown.ArrowUp\", function NgbDropdownMenu_keydown_ArrowUp_HostBindingHandler($event) { return ctx.dropdown.onKeyDown($event); })(\"keydown.ArrowDown\", function NgbDropdownMenu_keydown_ArrowDown_HostBindingHandler($event) { return ctx.dropdown.onKeyDown($event); })(\"keydown.Home\", function NgbDropdownMenu_keydown_Home_HostBindingHandler($event) { return ctx.dropdown.onKeyDown($event); })(\"keydown.End\", function NgbDropdownMenu_keydown_End_HostBindingHandler($event) { return ctx.dropdown.onKeyDown($event); })(\"keydown.Enter\", function NgbDropdownMenu_keydown_Enter_HostBindingHandler($event) { return ctx.dropdown.onKeyDown($event); })(\"keydown.Space\", function NgbDropdownMenu_keydown_Space_HostBindingHandler($event) { return ctx.dropdown.onKeyDown($event); })(\"keydown.Tab\", function NgbDropdownMenu_keydown_Tab_HostBindingHandler($event) { return ctx.dropdown.onKeyDown($event); })(\"keydown.Shift.Tab\", function NgbDropdownMenu_keydown_Shift_Tab_HostBindingHandler($event) { return ctx.dropdown.onKeyDown($event); });\n    } if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"x-placement\", ctx.placement);\n        ɵngcc0.ɵɵclassProp(\"dropdown-menu\", true)(\"show\", ctx.dropdown.isOpen());\n    } } });\nNgbDropdownMenu.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [forwardRef(() => NgbDropdown),] }] },\n    { type: ElementRef }\n];\nNgbDropdownMenu.propDecorators = {\n    menuItems: [{ type: ContentChildren, args: [NgbDropdownItem,] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDropdownMenu, [{\n        type: Directive,\n        args: [{\n                selector: '[ngbDropdownMenu]',\n                host: {\n                    '[class.dropdown-menu]': 'true',\n                    '[class.show]': 'dropdown.isOpen()',\n                    '[attr.x-placement]': 'placement',\n                    '(keydown.ArrowUp)': 'dropdown.onKeyDown($event)',\n                    '(keydown.ArrowDown)': 'dropdown.onKeyDown($event)',\n                    '(keydown.Home)': 'dropdown.onKeyDown($event)',\n                    '(keydown.End)': 'dropdown.onKeyDown($event)',\n                    '(keydown.Enter)': 'dropdown.onKeyDown($event)',\n                    '(keydown.Space)': 'dropdown.onKeyDown($event)',\n                    '(keydown.Tab)': 'dropdown.onKeyDown($event)',\n                    '(keydown.Shift.Tab)': 'dropdown.onKeyDown($event)'\n                }\n            }]\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [forwardRef(() => NgbDropdown)]\n            }] }, { type: ɵngcc0.ElementRef }]; }, { menuItems: [{\n            type: ContentChildren,\n            args: [NgbDropdownItem]\n        }] }); })();\n/**\n * A directive to mark an element to which dropdown menu will be anchored.\n *\n * This is a simple version of the `NgbDropdownToggle` directive.\n * It plays the same role, but doesn't listen to click events to toggle dropdown menu thus enabling support\n * for events other than click.\n *\n * @since 1.1.0\n */\nclass NgbDropdownAnchor {\n    constructor(dropdown, _elementRef) {\n        this.dropdown = dropdown;\n        this.nativeElement = _elementRef.nativeElement;\n    }\n}\nNgbDropdownAnchor.ɵfac = function NgbDropdownAnchor_Factory(t) { return new (t || NgbDropdownAnchor)(ɵngcc0.ɵɵdirectiveInject(forwardRef(() => NgbDropdown)), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nNgbDropdownAnchor.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbDropdownAnchor, selectors: [[\"\", \"ngbDropdownAnchor\", \"\"]], hostAttrs: [1, \"dropdown-toggle\"], hostVars: 1, hostBindings: function NgbDropdownAnchor_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"aria-expanded\", ctx.dropdown.isOpen());\n    } } });\nNgbDropdownAnchor.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [forwardRef(() => NgbDropdown),] }] },\n    { type: ElementRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDropdownAnchor, [{\n        type: Directive,\n        args: [{ selector: '[ngbDropdownAnchor]', host: { 'class': 'dropdown-toggle', '[attr.aria-expanded]': 'dropdown.isOpen()' } }]\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [forwardRef(() => NgbDropdown)]\n            }] }, { type: ɵngcc0.ElementRef }]; }, null); })();\n/**\n * A directive to mark an element that will toggle dropdown via the `click` event.\n *\n * You can also use `NgbDropdownAnchor` as an alternative.\n */\nclass NgbDropdownToggle extends NgbDropdownAnchor {\n    constructor(dropdown, elementRef) {\n        super(dropdown, elementRef);\n    }\n}\nNgbDropdownToggle.ɵfac = function NgbDropdownToggle_Factory(t) { return new (t || NgbDropdownToggle)(ɵngcc0.ɵɵdirectiveInject(forwardRef(() => NgbDropdown)), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nNgbDropdownToggle.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbDropdownToggle, selectors: [[\"\", \"ngbDropdownToggle\", \"\"]], hostAttrs: [1, \"dropdown-toggle\"], hostVars: 1, hostBindings: function NgbDropdownToggle_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"click\", function NgbDropdownToggle_click_HostBindingHandler() { return ctx.dropdown.toggle(); })(\"keydown.ArrowUp\", function NgbDropdownToggle_keydown_ArrowUp_HostBindingHandler($event) { return ctx.dropdown.onKeyDown($event); })(\"keydown.ArrowDown\", function NgbDropdownToggle_keydown_ArrowDown_HostBindingHandler($event) { return ctx.dropdown.onKeyDown($event); })(\"keydown.Home\", function NgbDropdownToggle_keydown_Home_HostBindingHandler($event) { return ctx.dropdown.onKeyDown($event); })(\"keydown.End\", function NgbDropdownToggle_keydown_End_HostBindingHandler($event) { return ctx.dropdown.onKeyDown($event); })(\"keydown.Tab\", function NgbDropdownToggle_keydown_Tab_HostBindingHandler($event) { return ctx.dropdown.onKeyDown($event); })(\"keydown.Shift.Tab\", function NgbDropdownToggle_keydown_Shift_Tab_HostBindingHandler($event) { return ctx.dropdown.onKeyDown($event); });\n    } if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"aria-expanded\", ctx.dropdown.isOpen());\n    } }, features: [ɵngcc0.ɵɵProvidersFeature([{ provide: NgbDropdownAnchor, useExisting: forwardRef(() => NgbDropdownToggle) }]), ɵngcc0.ɵɵInheritDefinitionFeature] });\nNgbDropdownToggle.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [forwardRef(() => NgbDropdown),] }] },\n    { type: ElementRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDropdownToggle, [{\n        type: Directive,\n        args: [{\n                selector: '[ngbDropdownToggle]',\n                host: {\n                    'class': 'dropdown-toggle',\n                    '[attr.aria-expanded]': 'dropdown.isOpen()',\n                    '(click)': 'dropdown.toggle()',\n                    '(keydown.ArrowUp)': 'dropdown.onKeyDown($event)',\n                    '(keydown.ArrowDown)': 'dropdown.onKeyDown($event)',\n                    '(keydown.Home)': 'dropdown.onKeyDown($event)',\n                    '(keydown.End)': 'dropdown.onKeyDown($event)',\n                    '(keydown.Tab)': 'dropdown.onKeyDown($event)',\n                    '(keydown.Shift.Tab)': 'dropdown.onKeyDown($event)'\n                },\n                providers: [{ provide: NgbDropdownAnchor, useExisting: forwardRef(() => NgbDropdownToggle) }]\n            }]\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [forwardRef(() => NgbDropdown)]\n            }] }, { type: ɵngcc0.ElementRef }]; }, null); })();\n/**\n * A directive that provides contextual overlays for displaying lists of links and more.\n */\nclass NgbDropdown {\n    constructor(_changeDetector, config, _document, _ngZone, _elementRef, _renderer, ngbNavbar) {\n        this._changeDetector = _changeDetector;\n        this._document = _document;\n        this._ngZone = _ngZone;\n        this._elementRef = _elementRef;\n        this._renderer = _renderer;\n        this._closed$ = new Subject();\n        this._bodyContainer = null;\n        /**\n         * Defines whether or not the dropdown menu is opened initially.\n         */\n        this._open = false;\n        /**\n         * An event fired when the dropdown is opened or closed.\n         *\n         * The event payload is a `boolean`:\n         * * `true` - the dropdown was opened\n         * * `false` - the dropdown was closed\n         */\n        this.openChange = new EventEmitter();\n        this.placement = config.placement;\n        this.container = config.container;\n        this.autoClose = config.autoClose;\n        this.display = ngbNavbar ? 'static' : 'dynamic';\n        this._zoneSubscription = _ngZone.onStable.subscribe(() => { this._positionMenu(); });\n    }\n    ngAfterContentInit() {\n        this._ngZone.onStable.pipe(take(1)).subscribe(() => {\n            this._applyPlacementClasses();\n            if (this._open) {\n                this._setCloseHandlers();\n            }\n        });\n    }\n    ngOnChanges(changes) {\n        if (changes.container && this._open) {\n            this._applyContainer(this.container);\n        }\n        if (changes.placement && !changes.placement.isFirstChange) {\n            this._applyPlacementClasses();\n        }\n        if (changes.dropdownClass) {\n            const { currentValue, previousValue } = changes.dropdownClass;\n            this._applyCustomDropdownClass(currentValue, previousValue);\n        }\n    }\n    /**\n     * Checks if the dropdown menu is open.\n     */\n    isOpen() { return this._open; }\n    /**\n     * Opens the dropdown menu.\n     */\n    open() {\n        if (!this._open) {\n            this._open = true;\n            this._applyContainer(this.container);\n            this.openChange.emit(true);\n            this._setCloseHandlers();\n            if (this._anchor) {\n                this._anchor.nativeElement.focus();\n            }\n        }\n    }\n    _setCloseHandlers() {\n        ngbAutoClose(this._ngZone, this._document, this.autoClose, (source) => {\n            this.close();\n            if (source === 0 /* ESCAPE */) {\n                this._anchor.nativeElement.focus();\n            }\n        }, this._closed$, this._menu ? [this._menu.nativeElement] : [], this._anchor ? [this._anchor.nativeElement] : [], '.dropdown-item,.dropdown-divider');\n    }\n    /**\n     * Closes the dropdown menu.\n     */\n    close() {\n        if (this._open) {\n            this._open = false;\n            this._resetContainer();\n            this._closed$.next();\n            this.openChange.emit(false);\n            this._changeDetector.markForCheck();\n        }\n    }\n    /**\n     * Toggles the dropdown menu.\n     */\n    toggle() {\n        if (this.isOpen()) {\n            this.close();\n        }\n        else {\n            this.open();\n        }\n    }\n    ngOnDestroy() {\n        this._resetContainer();\n        this._closed$.next();\n        this._zoneSubscription.unsubscribe();\n    }\n    onKeyDown(event) {\n        // tslint:disable-next-line:deprecation\n        const key = event.which;\n        const itemElements = this._getMenuElements();\n        let position = -1;\n        let itemElement = null;\n        const isEventFromToggle = this._isEventFromToggle(event);\n        if (!isEventFromToggle && itemElements.length) {\n            itemElements.forEach((item, index) => {\n                if (item.contains(event.target)) {\n                    itemElement = item;\n                }\n                if (item === this._document.activeElement) {\n                    position = index;\n                }\n            });\n        }\n        // closing on Enter / Space\n        if (key === Key.Space || key === Key.Enter) {\n            if (itemElement && (this.autoClose === true || this.autoClose === 'inside')) {\n                // Item is either a button or a link, so click will be triggered by the browser on Enter or Space.\n                // So we have to register a one-time click handler that will fire after any user defined click handlers\n                // to close the dropdown\n                fromEvent(itemElement, 'click').pipe(take(1)).subscribe(() => this.close());\n            }\n            return;\n        }\n        if (key === Key.Tab) {\n            if (event.target && this.isOpen() && this.autoClose) {\n                if (this._anchor.nativeElement === event.target) {\n                    if (this.container === 'body' && !event.shiftKey) {\n                        /* This case is special: user is using [Tab] from the anchor/toggle.\n                           User expects the next focusable element in the dropdown menu to get focus.\n                           But the menu is not a sibling to anchor/toggle, it is at the end of the body.\n                           Trick is to synchronously focus the menu element, and let the [keydown.Tab] go\n                           so that browser will focus the proper element (first one focusable in the menu) */\n                        this._renderer.setAttribute(this._menu.nativeElement, 'tabindex', '0');\n                        this._menu.nativeElement.focus();\n                        this._renderer.removeAttribute(this._menu.nativeElement, 'tabindex');\n                    }\n                    else if (event.shiftKey) {\n                        this.close();\n                    }\n                    return;\n                }\n                else if (this.container === 'body') {\n                    const focusableElements = this._menu.nativeElement.querySelectorAll(FOCUSABLE_ELEMENTS_SELECTOR);\n                    if (event.shiftKey && event.target === focusableElements[0]) {\n                        this._anchor.nativeElement.focus();\n                        event.preventDefault();\n                    }\n                    else if (!event.shiftKey && event.target === focusableElements[focusableElements.length - 1]) {\n                        this._anchor.nativeElement.focus();\n                        this.close();\n                    }\n                }\n                else {\n                    fromEvent(event.target, 'focusout').pipe(take(1)).subscribe(({ relatedTarget }) => {\n                        if (!this._elementRef.nativeElement.contains(relatedTarget)) {\n                            this.close();\n                        }\n                    });\n                }\n            }\n            return;\n        }\n        // opening / navigating\n        if (isEventFromToggle || itemElement) {\n            this.open();\n            if (itemElements.length) {\n                switch (key) {\n                    case Key.ArrowDown:\n                        position = Math.min(position + 1, itemElements.length - 1);\n                        break;\n                    case Key.ArrowUp:\n                        if (this._isDropup() && position === -1) {\n                            position = itemElements.length - 1;\n                            break;\n                        }\n                        position = Math.max(position - 1, 0);\n                        break;\n                    case Key.Home:\n                        position = 0;\n                        break;\n                    case Key.End:\n                        position = itemElements.length - 1;\n                        break;\n                }\n                itemElements[position].focus();\n            }\n            event.preventDefault();\n        }\n    }\n    _isDropup() { return this._elementRef.nativeElement.classList.contains('dropup'); }\n    _isEventFromToggle(event) {\n        return this._anchor.nativeElement.contains(event.target);\n    }\n    _getMenuElements() {\n        const menu = this._menu;\n        if (menu == null) {\n            return [];\n        }\n        return menu.menuItems.filter(item => !item.disabled).map(item => item.elementRef.nativeElement);\n    }\n    _positionMenu() {\n        const menu = this._menu;\n        if (this.isOpen() && menu) {\n            this._applyPlacementClasses(this.display === 'dynamic' ? positionElements(this._anchor.nativeElement, this._bodyContainer || this._menu.nativeElement, this.placement, this.container === 'body') :\n                this._getFirstPlacement(this.placement));\n        }\n    }\n    _getFirstPlacement(placement) {\n        return Array.isArray(placement) ? placement[0] : placement.split(' ')[0];\n    }\n    _resetContainer() {\n        const renderer = this._renderer;\n        if (this._menu) {\n            const dropdownElement = this._elementRef.nativeElement;\n            const dropdownMenuElement = this._menu.nativeElement;\n            renderer.appendChild(dropdownElement, dropdownMenuElement);\n            renderer.removeStyle(dropdownMenuElement, 'position');\n            renderer.removeStyle(dropdownMenuElement, 'transform');\n        }\n        if (this._bodyContainer) {\n            renderer.removeChild(this._document.body, this._bodyContainer);\n            this._bodyContainer = null;\n        }\n    }\n    _applyContainer(container = null) {\n        this._resetContainer();\n        if (container === 'body') {\n            const renderer = this._renderer;\n            const dropdownMenuElement = this._menu.nativeElement;\n            const bodyContainer = this._bodyContainer = this._bodyContainer || renderer.createElement('div');\n            // Override some styles to have the positioning working\n            renderer.setStyle(bodyContainer, 'position', 'absolute');\n            renderer.setStyle(dropdownMenuElement, 'position', 'static');\n            renderer.setStyle(bodyContainer, 'z-index', '1050');\n            renderer.appendChild(bodyContainer, dropdownMenuElement);\n            renderer.appendChild(this._document.body, bodyContainer);\n        }\n        this._applyCustomDropdownClass(this.dropdownClass);\n    }\n    _applyCustomDropdownClass(newClass, oldClass) {\n        const targetElement = this.container === 'body' ? this._bodyContainer : this._elementRef.nativeElement;\n        if (targetElement) {\n            if (oldClass) {\n                this._renderer.removeClass(targetElement, oldClass);\n            }\n            if (newClass) {\n                this._renderer.addClass(targetElement, newClass);\n            }\n        }\n    }\n    _applyPlacementClasses(placement) {\n        const menu = this._menu;\n        if (menu) {\n            if (!placement) {\n                placement = this._getFirstPlacement(this.placement);\n            }\n            const renderer = this._renderer;\n            const dropdownElement = this._elementRef.nativeElement;\n            // remove the current placement classes\n            renderer.removeClass(dropdownElement, 'dropup');\n            renderer.removeClass(dropdownElement, 'dropdown');\n            menu.placement = this.display === 'static' ? null : placement;\n            /*\n            * apply the new placement\n            * in case of top use up-arrow or down-arrow otherwise\n            */\n            const dropdownClass = placement.search('^top') !== -1 ? 'dropup' : 'dropdown';\n            renderer.addClass(dropdownElement, dropdownClass);\n            const bodyContainer = this._bodyContainer;\n            if (bodyContainer) {\n                renderer.removeClass(bodyContainer, 'dropup');\n                renderer.removeClass(bodyContainer, 'dropdown');\n                renderer.addClass(bodyContainer, dropdownClass);\n            }\n        }\n    }\n}\nNgbDropdown.ɵfac = function NgbDropdown_Factory(t) { return new (t || NgbDropdown)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(NgbDropdownConfig), ɵngcc0.ɵɵdirectiveInject(DOCUMENT), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(NgbNavbar, 8)); };\nNgbDropdown.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbDropdown, selectors: [[\"\", \"ngbDropdown\", \"\"]], contentQueries: function NgbDropdown_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbDropdownMenu, 5);\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbDropdownAnchor, 5);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx._menu = _t.first);\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx._anchor = _t.first);\n    } }, hostVars: 2, hostBindings: function NgbDropdown_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵclassProp(\"show\", ctx.isOpen());\n    } }, inputs: { _open: [\"open\", \"_open\"], placement: \"placement\", container: \"container\", autoClose: \"autoClose\", display: \"display\", dropdownClass: \"dropdownClass\" }, outputs: { openChange: \"openChange\" }, exportAs: [\"ngbDropdown\"], features: [ɵngcc0.ɵɵNgOnChangesFeature] });\nNgbDropdown.ctorParameters = () => [\n    { type: ChangeDetectorRef },\n    { type: NgbDropdownConfig },\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n    { type: NgZone },\n    { type: ElementRef },\n    { type: Renderer2 },\n    { type: NgbNavbar, decorators: [{ type: Optional }] }\n];\nNgbDropdown.propDecorators = {\n    _menu: [{ type: ContentChild, args: [NgbDropdownMenu, { static: false },] }],\n    _anchor: [{ type: ContentChild, args: [NgbDropdownAnchor, { static: false },] }],\n    autoClose: [{ type: Input }],\n    dropdownClass: [{ type: Input }],\n    _open: [{ type: Input, args: ['open',] }],\n    placement: [{ type: Input }],\n    container: [{ type: Input }],\n    display: [{ type: Input }],\n    openChange: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDropdown, [{\n        type: Directive,\n        args: [{ selector: '[ngbDropdown]', exportAs: 'ngbDropdown', host: { '[class.show]': 'isOpen()' } }]\n    }], function () { return [{ type: ɵngcc0.ChangeDetectorRef }, { type: NgbDropdownConfig }, { type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }, { type: ɵngcc0.NgZone }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: NgbNavbar, decorators: [{\n                type: Optional\n            }] }]; }, { _open: [{\n            type: Input,\n            args: ['open']\n        }], openChange: [{\n            type: Output\n        }], placement: [{\n            type: Input\n        }], container: [{\n            type: Input\n        }], autoClose: [{\n            type: Input\n        }], display: [{\n            type: Input\n        }], _menu: [{\n            type: ContentChild,\n            args: [NgbDropdownMenu, { static: false }]\n        }], _anchor: [{\n            type: ContentChild,\n            args: [NgbDropdownAnchor, { static: false }]\n        }], dropdownClass: [{\n            type: Input\n        }] }); })();\n\nconst NGB_DROPDOWN_DIRECTIVES = [NgbDropdown, NgbDropdownAnchor, NgbDropdownToggle, NgbDropdownMenu, NgbDropdownItem, NgbNavbar];\nclass NgbDropdownModule {\n}\nNgbDropdownModule.ɵfac = function NgbDropdownModule_Factory(t) { return new (t || NgbDropdownModule)(); };\nNgbDropdownModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbDropdownModule });\nNgbDropdownModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({});\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbDropdownModule, [{\n        type: NgModule,\n        args: [{ declarations: NGB_DROPDOWN_DIRECTIVES, exports: NGB_DROPDOWN_DIRECTIVES }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbDropdownModule, { declarations: [NgbDropdown, NgbDropdownAnchor, NgbDropdownToggle, NgbDropdownMenu, NgbDropdownItem, NgbNavbar], exports: [NgbDropdown, NgbDropdownAnchor, NgbDropdownToggle, NgbDropdownMenu, NgbDropdownItem, NgbNavbar] }); })();\n\n/**\n * A configuration service for the [`NgbModal`](#/components/modal/api#NgbModal) service.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all modals used in the application.\n*\n* @since 3.1.0\n*/\nclass NgbModalConfig {\n    constructor(_ngbConfig) {\n        this._ngbConfig = _ngbConfig;\n        this.backdrop = true;\n        this.keyboard = true;\n    }\n    get animation() { return (this._animation === undefined) ? this._ngbConfig.animation : this._animation; }\n    set animation(animation) { this._animation = animation; }\n}\nNgbModalConfig.ɵfac = function NgbModalConfig_Factory(t) { return new (t || NgbModalConfig)(ɵngcc0.ɵɵinject(NgbConfig)); };\nNgbModalConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbModalConfig_Factory() { return new NgbModalConfig(i0.ɵɵinject(NgbConfig)); }, token: NgbModalConfig, providedIn: \"root\" });\nNgbModalConfig.ctorParameters = () => [\n    { type: NgbConfig }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbModalConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return [{ type: NgbConfig }]; }, null); })();\n\nclass ContentRef {\n    constructor(nodes, viewRef, componentRef) {\n        this.nodes = nodes;\n        this.viewRef = viewRef;\n        this.componentRef = componentRef;\n    }\n}\nclass PopupService {\n    constructor(_type, _injector, _viewContainerRef, _renderer, _ngZone, _componentFactoryResolver, _applicationRef) {\n        this._type = _type;\n        this._injector = _injector;\n        this._viewContainerRef = _viewContainerRef;\n        this._renderer = _renderer;\n        this._ngZone = _ngZone;\n        this._componentFactoryResolver = _componentFactoryResolver;\n        this._applicationRef = _applicationRef;\n        this._windowRef = null;\n        this._contentRef = null;\n    }\n    open(content, context, animation = false) {\n        if (!this._windowRef) {\n            this._contentRef = this._getContentRef(content, context);\n            this._windowRef = this._viewContainerRef.createComponent(this._componentFactoryResolver.resolveComponentFactory(this._type), this._viewContainerRef.length, this._injector, this._contentRef.nodes);\n        }\n        const { nativeElement } = this._windowRef.location;\n        const transition$ = this._ngZone.onStable.pipe(take(1), mergeMap(() => ngbRunTransition(this._ngZone, nativeElement, ({ classList }) => classList.add('show'), { animation, runningTransition: 'continue' })));\n        return { windowRef: this._windowRef, transition$ };\n    }\n    close(animation = false) {\n        if (!this._windowRef) {\n            return of(undefined);\n        }\n        return ngbRunTransition(this._ngZone, this._windowRef.location.nativeElement, ({ classList }) => classList.remove('show'), { animation, runningTransition: 'stop' })\n            .pipe(tap(() => {\n            var _a;\n            if (this._windowRef) {\n                // this is required because of the container='body' option\n                this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView));\n                this._windowRef = null;\n            }\n            if ((_a = this._contentRef) === null || _a === void 0 ? void 0 : _a.viewRef) {\n                this._applicationRef.detachView(this._contentRef.viewRef);\n                this._contentRef.viewRef.destroy();\n                this._contentRef = null;\n            }\n        }));\n    }\n    _getContentRef(content, context) {\n        if (!content) {\n            return new ContentRef([]);\n        }\n        else if (content instanceof TemplateRef) {\n            const viewRef = content.createEmbeddedView(context);\n            this._applicationRef.attachView(viewRef);\n            return new ContentRef([viewRef.rootNodes], viewRef);\n        }\n        else {\n            return new ContentRef([[this._renderer.createText(`${content}`)]]);\n        }\n    }\n}\n\nconst noop = () => { };\nconst ɵ0$2 = noop;\n/**\n * Utility to handle the scrollbar.\n *\n * It allows to compensate the lack of a vertical scrollbar by adding an\n * equivalent padding on the right of the body, and to remove this compensation.\n */\nclass ScrollBar {\n    constructor(_document) {\n        this._document = _document;\n    }\n    /**\n     * To be called right before a potential vertical scrollbar would be removed:\n     *\n     * - if there was a scrollbar, adds some compensation padding to the body\n     * to keep the same layout as when the scrollbar is there\n     * - if there was none, there is nothing to do\n     *\n     * @return a callback used to revert the compensation (noop if there was none,\n     * otherwise a function removing the padding)\n     */\n    compensate() {\n        const width = this._getWidth();\n        return !this._isPresent(width) ? noop : this._adjustBody(width);\n    }\n    /**\n     * Adds a padding of the given width on the right of the body.\n     *\n     * @return a callback used to revert the padding to its previous value\n     */\n    _adjustBody(scrollbarWidth) {\n        const body = this._document.body;\n        const userSetPaddingStyle = body.style.paddingRight;\n        const actualPadding = parseFloat(window.getComputedStyle(body)['padding-right']);\n        body.style['padding-right'] = `${actualPadding + scrollbarWidth}px`;\n        return () => body.style['padding-right'] = userSetPaddingStyle;\n    }\n    /**\n     * Tells whether a scrollbar is currently present on the body.\n     *\n     * @return true if scrollbar is present, false otherwise\n     */\n    _isPresent(scrollbarWidth) {\n        const rect = this._document.body.getBoundingClientRect();\n        const bodyToViewportGap = window.innerWidth - (rect.left + rect.right);\n        const uncertainty = 0.1 * scrollbarWidth;\n        return bodyToViewportGap >= scrollbarWidth - uncertainty;\n    }\n    /**\n     * Calculates and returns the width of a scrollbar.\n     *\n     * @return the width of a scrollbar on this page\n     */\n    _getWidth() {\n        const measurer = this._document.createElement('div');\n        measurer.className = 'modal-scrollbar-measure';\n        const body = this._document.body;\n        body.appendChild(measurer);\n        const width = measurer.getBoundingClientRect().width - measurer.clientWidth;\n        body.removeChild(measurer);\n        return width;\n    }\n}\nScrollBar.ɵfac = function ScrollBar_Factory(t) { return new (t || ScrollBar)(ɵngcc0.ɵɵinject(DOCUMENT)); };\nScrollBar.ɵprov = i0.ɵɵdefineInjectable({ factory: function ScrollBar_Factory() { return new ScrollBar(i0.ɵɵinject(i1.DOCUMENT)); }, token: ScrollBar, providedIn: \"root\" });\nScrollBar.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ScrollBar, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }]; }, null); })();\n\nclass NgbModalBackdrop {\n    constructor(_el, _zone) {\n        this._el = _el;\n        this._zone = _zone;\n    }\n    ngOnInit() {\n        this._zone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n            ngbRunTransition(this._zone, this._el.nativeElement, (element, animation) => {\n                if (animation) {\n                    reflow(element);\n                }\n                element.classList.add('show');\n            }, { animation: this.animation, runningTransition: 'continue' });\n        });\n    }\n    hide() {\n        return ngbRunTransition(this._zone, this._el.nativeElement, ({ classList }) => classList.remove('show'), { animation: this.animation, runningTransition: 'stop' });\n    }\n}\nNgbModalBackdrop.ɵfac = function NgbModalBackdrop_Factory(t) { return new (t || NgbModalBackdrop)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone)); };\nNgbModalBackdrop.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbModalBackdrop, selectors: [[\"ngb-modal-backdrop\"]], hostAttrs: [2, \"z-index\", \"1050\"], hostVars: 6, hostBindings: function NgbModalBackdrop_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵclassMap(\"modal-backdrop\" + (ctx.backdropClass ? \" \" + ctx.backdropClass : \"\"));\n        ɵngcc0.ɵɵclassProp(\"show\", !ctx.animation)(\"fade\", ctx.animation);\n    } }, inputs: { animation: \"animation\", backdropClass: \"backdropClass\" }, decls: 0, vars: 0, template: function NgbModalBackdrop_Template(rf, ctx) { }, encapsulation: 2 });\nNgbModalBackdrop.ctorParameters = () => [\n    { type: ElementRef },\n    { type: NgZone }\n];\nNgbModalBackdrop.propDecorators = {\n    animation: [{ type: Input }],\n    backdropClass: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbModalBackdrop, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-modal-backdrop',\n                encapsulation: ViewEncapsulation.None,\n                template: '',\n                host: {\n                    '[class]': '\"modal-backdrop\" + (backdropClass ? \" \" + backdropClass : \"\")',\n                    '[class.show]': '!animation',\n                    '[class.fade]': 'animation',\n                    'style': 'z-index: 1050'\n                }\n            }]\n    }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.NgZone }]; }, { animation: [{\n            type: Input\n        }], backdropClass: [{\n            type: Input\n        }] }); })();\n\n/**\n * A reference to the currently opened (active) modal.\n *\n * Instances of this class can be injected into your component passed as modal content.\n * So you can `.close()` or `.dismiss()` the modal window from your component.\n */\nclass NgbActiveModal {\n    /**\n     * Closes the modal with an optional `result` value.\n     *\n     * The `NgbModalRef.result` promise will be resolved with the provided value.\n     */\n    close(result) { }\n    /**\n     * Dismisses the modal with an optional `reason` value.\n     *\n     * The `NgbModalRef.result` promise will be rejected with the provided value.\n     */\n    dismiss(reason) { }\n}\n/**\n * A reference to the newly opened modal returned by the `NgbModal.open()` method.\n */\nclass NgbModalRef {\n    constructor(_windowCmptRef, _contentRef, _backdropCmptRef, _beforeDismiss) {\n        this._windowCmptRef = _windowCmptRef;\n        this._contentRef = _contentRef;\n        this._backdropCmptRef = _backdropCmptRef;\n        this._beforeDismiss = _beforeDismiss;\n        this._closed = new Subject();\n        this._dismissed = new Subject();\n        this._hidden = new Subject();\n        _windowCmptRef.instance.dismissEvent.subscribe((reason) => { this.dismiss(reason); });\n        this.result = new Promise((resolve, reject) => {\n            this._resolve = resolve;\n            this._reject = reject;\n        });\n        this.result.then(null, () => { });\n    }\n    /**\n     * The instance of a component used for the modal content.\n     *\n     * When a `TemplateRef` is used as the content or when the modal is closed, will return `undefined`.\n     */\n    get componentInstance() {\n        if (this._contentRef && this._contentRef.componentRef) {\n            return this._contentRef.componentRef.instance;\n        }\n    }\n    /**\n     * The observable that emits when the modal is closed via the `.close()` method.\n     *\n     * It will emit the result passed to the `.close()` method.\n     *\n     * @since 8.0.0\n     */\n    get closed() { return this._closed.asObservable().pipe(takeUntil(this._hidden)); }\n    /**\n     * The observable that emits when the modal is dismissed via the `.dismiss()` method.\n     *\n     * It will emit the reason passed to the `.dismissed()` method by the user, or one of the internal\n     * reasons like backdrop click or ESC key press.\n     *\n     * @since 8.0.0\n     */\n    get dismissed() { return this._dismissed.asObservable().pipe(takeUntil(this._hidden)); }\n    /**\n     * The observable that emits when both modal window and backdrop are closed and animations were finished.\n     * At this point modal and backdrop elements will be removed from the DOM tree.\n     *\n     * This observable will be completed after emitting.\n     *\n     * @since 8.0.0\n     */\n    get hidden() { return this._hidden.asObservable(); }\n    /**\n     * The observable that emits when modal is fully visible and animation was finished.\n     * Modal DOM element is always available synchronously after calling 'modal.open()' service.\n     *\n     * This observable will be completed after emitting.\n     * It will not emit, if modal is closed before open animation is finished.\n     *\n     * @since 8.0.0\n     */\n    get shown() { return this._windowCmptRef.instance.shown.asObservable(); }\n    /**\n     * Closes the modal with an optional `result` value.\n     *\n     * The `NgbMobalRef.result` promise will be resolved with the provided value.\n     */\n    close(result) {\n        if (this._windowCmptRef) {\n            this._closed.next(result);\n            this._resolve(result);\n            this._removeModalElements();\n        }\n    }\n    _dismiss(reason) {\n        this._dismissed.next(reason);\n        this._reject(reason);\n        this._removeModalElements();\n    }\n    /**\n     * Dismisses the modal with an optional `reason` value.\n     *\n     * The `NgbModalRef.result` promise will be rejected with the provided value.\n     */\n    dismiss(reason) {\n        if (this._windowCmptRef) {\n            if (!this._beforeDismiss) {\n                this._dismiss(reason);\n            }\n            else {\n                const dismiss = this._beforeDismiss();\n                if (dismiss && dismiss.then) {\n                    dismiss.then(result => {\n                        if (result !== false) {\n                            this._dismiss(reason);\n                        }\n                    }, () => { });\n                }\n                else if (dismiss !== false) {\n                    this._dismiss(reason);\n                }\n            }\n        }\n    }\n    _removeModalElements() {\n        const windowTransition$ = this._windowCmptRef.instance.hide();\n        const backdropTransition$ = this._backdropCmptRef ? this._backdropCmptRef.instance.hide() : of(undefined);\n        // hiding window\n        windowTransition$.subscribe(() => {\n            const { nativeElement } = this._windowCmptRef.location;\n            nativeElement.parentNode.removeChild(nativeElement);\n            this._windowCmptRef.destroy();\n            if (this._contentRef && this._contentRef.viewRef) {\n                this._contentRef.viewRef.destroy();\n            }\n            this._windowCmptRef = null;\n            this._contentRef = null;\n        });\n        // hiding backdrop\n        backdropTransition$.subscribe(() => {\n            if (this._backdropCmptRef) {\n                const { nativeElement } = this._backdropCmptRef.location;\n                nativeElement.parentNode.removeChild(nativeElement);\n                this._backdropCmptRef.destroy();\n                this._backdropCmptRef = null;\n            }\n        });\n        // all done\n        zip(windowTransition$, backdropTransition$).subscribe(() => {\n            this._hidden.next();\n            this._hidden.complete();\n        });\n    }\n}\n\nvar ModalDismissReasons;\n(function (ModalDismissReasons) {\n    ModalDismissReasons[ModalDismissReasons[\"BACKDROP_CLICK\"] = 0] = \"BACKDROP_CLICK\";\n    ModalDismissReasons[ModalDismissReasons[\"ESC\"] = 1] = \"ESC\";\n})(ModalDismissReasons || (ModalDismissReasons = {}));\n\nclass NgbModalWindow {\n    constructor(_document, _elRef, _zone) {\n        this._document = _document;\n        this._elRef = _elRef;\n        this._zone = _zone;\n        this._closed$ = new Subject();\n        this._elWithFocus = null; // element that is focused prior to modal opening\n        this.backdrop = true;\n        this.keyboard = true;\n        this.dismissEvent = new EventEmitter();\n        this.shown = new Subject();\n        this.hidden = new Subject();\n    }\n    dismiss(reason) { this.dismissEvent.emit(reason); }\n    ngOnInit() {\n        this._elWithFocus = this._document.activeElement;\n        this._zone.onStable.asObservable().pipe(take(1)).subscribe(() => { this._show(); });\n    }\n    ngOnDestroy() { this._disableEventHandling(); }\n    hide() {\n        const { nativeElement } = this._elRef;\n        const context = { animation: this.animation, runningTransition: 'stop' };\n        const windowTransition$ = ngbRunTransition(this._zone, nativeElement, () => nativeElement.classList.remove('show'), context);\n        const dialogTransition$ = ngbRunTransition(this._zone, this._dialogEl.nativeElement, () => { }, context);\n        const transitions$ = zip(windowTransition$, dialogTransition$);\n        transitions$.subscribe(() => {\n            this.hidden.next();\n            this.hidden.complete();\n        });\n        this._disableEventHandling();\n        this._restoreFocus();\n        return transitions$;\n    }\n    _show() {\n        const context = { animation: this.animation, runningTransition: 'continue' };\n        const windowTransition$ = ngbRunTransition(this._zone, this._elRef.nativeElement, (element, animation) => {\n            if (animation) {\n                reflow(element);\n            }\n            element.classList.add('show');\n        }, context);\n        const dialogTransition$ = ngbRunTransition(this._zone, this._dialogEl.nativeElement, () => { }, context);\n        zip(windowTransition$, dialogTransition$).subscribe(() => {\n            this.shown.next();\n            this.shown.complete();\n        });\n        this._enableEventHandling();\n        this._setFocus();\n    }\n    _enableEventHandling() {\n        const { nativeElement } = this._elRef;\n        this._zone.runOutsideAngular(() => {\n            fromEvent(nativeElement, 'keydown')\n                .pipe(takeUntil(this._closed$), \n            // tslint:disable-next-line:deprecation\n            filter(e => e.which === Key.Escape))\n                .subscribe(event => {\n                if (this.keyboard) {\n                    requestAnimationFrame(() => {\n                        if (!event.defaultPrevented) {\n                            this._zone.run(() => this.dismiss(ModalDismissReasons.ESC));\n                        }\n                    });\n                }\n                else if (this.backdrop === 'static') {\n                    this._bumpBackdrop();\n                }\n            });\n            // We're listening to 'mousedown' and 'mouseup' to prevent modal from closing when pressing the mouse\n            // inside the modal dialog and releasing it outside\n            let preventClose = false;\n            fromEvent(this._dialogEl.nativeElement, 'mousedown')\n                .pipe(takeUntil(this._closed$), tap(() => preventClose = false), switchMap(() => fromEvent(nativeElement, 'mouseup').pipe(takeUntil(this._closed$), take(1))), filter(({ target }) => nativeElement === target))\n                .subscribe(() => { preventClose = true; });\n            // We're listening to 'click' to dismiss modal on modal window click, except when:\n            // 1. clicking on modal dialog itself\n            // 2. closing was prevented by mousedown/up handlers\n            // 3. clicking on scrollbar when the viewport is too small and modal doesn't fit (click is not triggered at all)\n            fromEvent(nativeElement, 'click').pipe(takeUntil(this._closed$)).subscribe(({ target }) => {\n                if (nativeElement === target) {\n                    if (this.backdrop === 'static') {\n                        this._bumpBackdrop();\n                    }\n                    else if (this.backdrop === true && !preventClose) {\n                        this._zone.run(() => this.dismiss(ModalDismissReasons.BACKDROP_CLICK));\n                    }\n                }\n                preventClose = false;\n            });\n        });\n    }\n    _disableEventHandling() { this._closed$.next(); }\n    _setFocus() {\n        const { nativeElement } = this._elRef;\n        if (!nativeElement.contains(document.activeElement)) {\n            const autoFocusable = nativeElement.querySelector(`[ngbAutofocus]`);\n            const firstFocusable = getFocusableBoundaryElements(nativeElement)[0];\n            const elementToFocus = autoFocusable || firstFocusable || nativeElement;\n            elementToFocus.focus();\n        }\n    }\n    _restoreFocus() {\n        const body = this._document.body;\n        const elWithFocus = this._elWithFocus;\n        let elementToFocus;\n        if (elWithFocus && elWithFocus['focus'] && body.contains(elWithFocus)) {\n            elementToFocus = elWithFocus;\n        }\n        else {\n            elementToFocus = body;\n        }\n        this._zone.runOutsideAngular(() => {\n            setTimeout(() => elementToFocus.focus());\n            this._elWithFocus = null;\n        });\n    }\n    _bumpBackdrop() {\n        if (this.backdrop === 'static') {\n            ngbRunTransition(this._zone, this._elRef.nativeElement, ({ classList }) => {\n                classList.add('modal-static');\n                return () => classList.remove('modal-static');\n            }, { animation: this.animation, runningTransition: 'continue' });\n        }\n    }\n}\nNgbModalWindow.ɵfac = function NgbModalWindow_Factory(t) { return new (t || NgbModalWindow)(ɵngcc0.ɵɵdirectiveInject(DOCUMENT), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone)); };\nNgbModalWindow.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbModalWindow, selectors: [[\"ngb-modal-window\"]], viewQuery: function NgbModalWindow_Query(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵviewQuery(_c31, 7);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx._dialogEl = _t.first);\n    } }, hostAttrs: [\"role\", \"dialog\", \"tabindex\", \"-1\"], hostVars: 7, hostBindings: function NgbModalWindow_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"aria-modal\", true)(\"aria-labelledby\", ctx.ariaLabelledBy)(\"aria-describedby\", ctx.ariaDescribedBy);\n        ɵngcc0.ɵɵclassMap(\"modal d-block\" + (ctx.windowClass ? \" \" + ctx.windowClass : \"\"));\n        ɵngcc0.ɵɵclassProp(\"fade\", ctx.animation);\n    } }, inputs: { backdrop: \"backdrop\", keyboard: \"keyboard\", animation: \"animation\", ariaLabelledBy: \"ariaLabelledBy\", ariaDescribedBy: \"ariaDescribedBy\", centered: \"centered\", scrollable: \"scrollable\", size: \"size\", windowClass: \"windowClass\", modalDialogClass: \"modalDialogClass\" }, outputs: { dismissEvent: \"dismiss\" }, ngContentSelectors: _c3, decls: 4, vars: 2, consts: [[\"role\", \"document\"], [\"dialog\", \"\"], [1, \"modal-content\"]], template: function NgbModalWindow_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵprojectionDef();\n        ɵngcc0.ɵɵelementStart(0, \"div\", 0, 1);\n        ɵngcc0.ɵɵelementStart(2, \"div\", 2);\n        ɵngcc0.ɵɵprojection(3);\n        ɵngcc0.ɵɵelementEnd();\n        ɵngcc0.ɵɵelementEnd();\n    } if (rf & 2) {\n        ɵngcc0.ɵɵclassMap(\"modal-dialog\" + (ctx.size ? \" modal-\" + ctx.size : \"\") + (ctx.centered ? \" modal-dialog-centered\" : \"\") + (ctx.scrollable ? \" modal-dialog-scrollable\" : \"\") + (ctx.modalDialogClass ? \" \" + ctx.modalDialogClass : \"\"));\n    } }, styles: [\"ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\"], encapsulation: 2 });\nNgbModalWindow.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n    { type: ElementRef },\n    { type: NgZone }\n];\nNgbModalWindow.propDecorators = {\n    _dialogEl: [{ type: ViewChild, args: ['dialog', { static: true },] }],\n    animation: [{ type: Input }],\n    ariaLabelledBy: [{ type: Input }],\n    ariaDescribedBy: [{ type: Input }],\n    backdrop: [{ type: Input }],\n    centered: [{ type: Input }],\n    keyboard: [{ type: Input }],\n    scrollable: [{ type: Input }],\n    size: [{ type: Input }],\n    windowClass: [{ type: Input }],\n    modalDialogClass: [{ type: Input }],\n    dismissEvent: [{ type: Output, args: ['dismiss',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbModalWindow, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-modal-window',\n                host: {\n                    '[class]': '\"modal d-block\" + (windowClass ? \" \" + windowClass : \"\")',\n                    '[class.fade]': 'animation',\n                    'role': 'dialog',\n                    'tabindex': '-1',\n                    '[attr.aria-modal]': 'true',\n                    '[attr.aria-labelledby]': 'ariaLabelledBy',\n                    '[attr.aria-describedby]': 'ariaDescribedBy'\n                },\n                template: `\n    <div #dialog [class]=\"'modal-dialog' + (size ? ' modal-' + size : '') + (centered ? ' modal-dialog-centered' : '') +\n     (scrollable ? ' modal-dialog-scrollable' : '') + (modalDialogClass ? ' ' + modalDialogClass : '')\" role=\"document\">\n        <div class=\"modal-content\"><ng-content></ng-content></div>\n    </div>\n    `,\n                encapsulation: ViewEncapsulation.None,\n                styles: [\"ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\"]\n            }]\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.NgZone }]; }, { backdrop: [{\n            type: Input\n        }], keyboard: [{\n            type: Input\n        }], dismissEvent: [{\n            type: Output,\n            args: ['dismiss']\n        }], _dialogEl: [{\n            type: ViewChild,\n            args: ['dialog', { static: true }]\n        }], animation: [{\n            type: Input\n        }], ariaLabelledBy: [{\n            type: Input\n        }], ariaDescribedBy: [{\n            type: Input\n        }], centered: [{\n            type: Input\n        }], scrollable: [{\n            type: Input\n        }], size: [{\n            type: Input\n        }], windowClass: [{\n            type: Input\n        }], modalDialogClass: [{\n            type: Input\n        }] }); })();\n\nclass NgbModalStack {\n    constructor(_applicationRef, _injector, _document, _scrollBar, _rendererFactory, _ngZone) {\n        this._applicationRef = _applicationRef;\n        this._injector = _injector;\n        this._document = _document;\n        this._scrollBar = _scrollBar;\n        this._rendererFactory = _rendererFactory;\n        this._ngZone = _ngZone;\n        this._activeWindowCmptHasChanged = new Subject();\n        this._ariaHiddenValues = new Map();\n        this._backdropAttributes = ['animation', 'backdropClass'];\n        this._modalRefs = [];\n        this._windowAttributes = [\n            'animation', 'ariaLabelledBy', 'ariaDescribedBy', 'backdrop', 'centered', 'keyboard', 'scrollable', 'size',\n            'windowClass', 'modalDialogClass'\n        ];\n        this._windowCmpts = [];\n        this._activeInstances = new EventEmitter();\n        // Trap focus on active WindowCmpt\n        this._activeWindowCmptHasChanged.subscribe(() => {\n            if (this._windowCmpts.length) {\n                const activeWindowCmpt = this._windowCmpts[this._windowCmpts.length - 1];\n                ngbFocusTrap(this._ngZone, activeWindowCmpt.location.nativeElement, this._activeWindowCmptHasChanged);\n                this._revertAriaHidden();\n                this._setAriaHidden(activeWindowCmpt.location.nativeElement);\n            }\n        });\n    }\n    open(moduleCFR, contentInjector, content, options) {\n        const containerEl = options.container instanceof HTMLElement ? options.container : isDefined(options.container) ?\n            this._document.querySelector(options.container) :\n            this._document.body;\n        const renderer = this._rendererFactory.createRenderer(null, null);\n        const revertPaddingForScrollBar = this._scrollBar.compensate();\n        const removeBodyClass = () => {\n            if (!this._modalRefs.length) {\n                renderer.removeClass(this._document.body, 'modal-open');\n                this._revertAriaHidden();\n            }\n        };\n        if (!containerEl) {\n            throw new Error(`The specified modal container \"${options.container || 'body'}\" was not found in the DOM.`);\n        }\n        const activeModal = new NgbActiveModal();\n        const contentRef = this._getContentRef(moduleCFR, options.injector || contentInjector, content, activeModal, options);\n        let backdropCmptRef = options.backdrop !== false ? this._attachBackdrop(moduleCFR, containerEl) : undefined;\n        let windowCmptRef = this._attachWindowComponent(moduleCFR, containerEl, contentRef);\n        let ngbModalRef = new NgbModalRef(windowCmptRef, contentRef, backdropCmptRef, options.beforeDismiss);\n        this._registerModalRef(ngbModalRef);\n        this._registerWindowCmpt(windowCmptRef);\n        ngbModalRef.result.then(revertPaddingForScrollBar, revertPaddingForScrollBar);\n        ngbModalRef.result.then(removeBodyClass, removeBodyClass);\n        activeModal.close = (result) => { ngbModalRef.close(result); };\n        activeModal.dismiss = (reason) => { ngbModalRef.dismiss(reason); };\n        this._applyWindowOptions(windowCmptRef.instance, options);\n        if (this._modalRefs.length === 1) {\n            renderer.addClass(this._document.body, 'modal-open');\n        }\n        if (backdropCmptRef && backdropCmptRef.instance) {\n            this._applyBackdropOptions(backdropCmptRef.instance, options);\n            backdropCmptRef.changeDetectorRef.detectChanges();\n        }\n        windowCmptRef.changeDetectorRef.detectChanges();\n        return ngbModalRef;\n    }\n    get activeInstances() { return this._activeInstances; }\n    dismissAll(reason) { this._modalRefs.forEach(ngbModalRef => ngbModalRef.dismiss(reason)); }\n    hasOpenModals() { return this._modalRefs.length > 0; }\n    _attachBackdrop(moduleCFR, containerEl) {\n        let backdropFactory = moduleCFR.resolveComponentFactory(NgbModalBackdrop);\n        let backdropCmptRef = backdropFactory.create(this._injector);\n        this._applicationRef.attachView(backdropCmptRef.hostView);\n        containerEl.appendChild(backdropCmptRef.location.nativeElement);\n        return backdropCmptRef;\n    }\n    _attachWindowComponent(moduleCFR, containerEl, contentRef) {\n        let windowFactory = moduleCFR.resolveComponentFactory(NgbModalWindow);\n        let windowCmptRef = windowFactory.create(this._injector, contentRef.nodes);\n        this._applicationRef.attachView(windowCmptRef.hostView);\n        containerEl.appendChild(windowCmptRef.location.nativeElement);\n        return windowCmptRef;\n    }\n    _applyWindowOptions(windowInstance, options) {\n        this._windowAttributes.forEach((optionName) => {\n            if (isDefined(options[optionName])) {\n                windowInstance[optionName] = options[optionName];\n            }\n        });\n    }\n    _applyBackdropOptions(backdropInstance, options) {\n        this._backdropAttributes.forEach((optionName) => {\n            if (isDefined(options[optionName])) {\n                backdropInstance[optionName] = options[optionName];\n            }\n        });\n    }\n    _getContentRef(moduleCFR, contentInjector, content, activeModal, options) {\n        if (!content) {\n            return new ContentRef([]);\n        }\n        else if (content instanceof TemplateRef) {\n            return this._createFromTemplateRef(content, activeModal);\n        }\n        else if (isString(content)) {\n            return this._createFromString(content);\n        }\n        else {\n            return this._createFromComponent(moduleCFR, contentInjector, content, activeModal, options);\n        }\n    }\n    _createFromTemplateRef(content, activeModal) {\n        const context = {\n            $implicit: activeModal,\n            close(result) { activeModal.close(result); },\n            dismiss(reason) { activeModal.dismiss(reason); }\n        };\n        const viewRef = content.createEmbeddedView(context);\n        this._applicationRef.attachView(viewRef);\n        return new ContentRef([viewRef.rootNodes], viewRef);\n    }\n    _createFromString(content) {\n        const component = this._document.createTextNode(`${content}`);\n        return new ContentRef([[component]]);\n    }\n    _createFromComponent(moduleCFR, contentInjector, content, context, options) {\n        const contentCmptFactory = moduleCFR.resolveComponentFactory(content);\n        const modalContentInjector = Injector.create({ providers: [{ provide: NgbActiveModal, useValue: context }], parent: contentInjector });\n        const componentRef = contentCmptFactory.create(modalContentInjector);\n        const componentNativeEl = componentRef.location.nativeElement;\n        if (options.scrollable) {\n            componentNativeEl.classList.add('component-host-scrollable');\n        }\n        this._applicationRef.attachView(componentRef.hostView);\n        // FIXME: we should here get rid of the component nativeElement\n        // and use `[Array.from(componentNativeEl.childNodes)]` instead and remove the above CSS class.\n        return new ContentRef([[componentNativeEl]], componentRef.hostView, componentRef);\n    }\n    _setAriaHidden(element) {\n        const parent = element.parentElement;\n        if (parent && element !== this._document.body) {\n            Array.from(parent.children).forEach(sibling => {\n                if (sibling !== element && sibling.nodeName !== 'SCRIPT') {\n                    this._ariaHiddenValues.set(sibling, sibling.getAttribute('aria-hidden'));\n                    sibling.setAttribute('aria-hidden', 'true');\n                }\n            });\n            this._setAriaHidden(parent);\n        }\n    }\n    _revertAriaHidden() {\n        this._ariaHiddenValues.forEach((value, element) => {\n            if (value) {\n                element.setAttribute('aria-hidden', value);\n            }\n            else {\n                element.removeAttribute('aria-hidden');\n            }\n        });\n        this._ariaHiddenValues.clear();\n    }\n    _registerModalRef(ngbModalRef) {\n        const unregisterModalRef = () => {\n            const index = this._modalRefs.indexOf(ngbModalRef);\n            if (index > -1) {\n                this._modalRefs.splice(index, 1);\n                this._activeInstances.emit(this._modalRefs);\n            }\n        };\n        this._modalRefs.push(ngbModalRef);\n        this._activeInstances.emit(this._modalRefs);\n        ngbModalRef.result.then(unregisterModalRef, unregisterModalRef);\n    }\n    _registerWindowCmpt(ngbWindowCmpt) {\n        this._windowCmpts.push(ngbWindowCmpt);\n        this._activeWindowCmptHasChanged.next();\n        ngbWindowCmpt.onDestroy(() => {\n            const index = this._windowCmpts.indexOf(ngbWindowCmpt);\n            if (index > -1) {\n                this._windowCmpts.splice(index, 1);\n                this._activeWindowCmptHasChanged.next();\n            }\n        });\n    }\n}\nNgbModalStack.ɵfac = function NgbModalStack_Factory(t) { return new (t || NgbModalStack)(ɵngcc0.ɵɵinject(ɵngcc0.ApplicationRef), ɵngcc0.ɵɵinject(ɵngcc0.Injector), ɵngcc0.ɵɵinject(DOCUMENT), ɵngcc0.ɵɵinject(ScrollBar), ɵngcc0.ɵɵinject(ɵngcc0.RendererFactory2), ɵngcc0.ɵɵinject(ɵngcc0.NgZone)); };\nNgbModalStack.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbModalStack_Factory() { return new NgbModalStack(i0.ɵɵinject(i0.ApplicationRef), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i1.DOCUMENT), i0.ɵɵinject(ScrollBar), i0.ɵɵinject(i0.RendererFactory2), i0.ɵɵinject(i0.NgZone)); }, token: NgbModalStack, providedIn: \"root\" });\nNgbModalStack.ctorParameters = () => [\n    { type: ApplicationRef },\n    { type: Injector },\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n    { type: ScrollBar },\n    { type: RendererFactory2 },\n    { type: NgZone }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbModalStack, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return [{ type: ɵngcc0.ApplicationRef }, { type: ɵngcc0.Injector }, { type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }, { type: ScrollBar }, { type: ɵngcc0.RendererFactory2 }, { type: ɵngcc0.NgZone }]; }, null); })();\n\n/**\n * A service for opening modal windows.\n *\n * Creating a modal is straightforward: create a component or a template and pass it as an argument to\n * the `.open()` method.\n */\nclass NgbModal {\n    constructor(_moduleCFR, _injector, _modalStack, _config) {\n        this._moduleCFR = _moduleCFR;\n        this._injector = _injector;\n        this._modalStack = _modalStack;\n        this._config = _config;\n    }\n    /**\n     * Opens a new modal window with the specified content and supplied options.\n     *\n     * Content can be provided as a `TemplateRef` or a component type. If you pass a component type as content,\n     * then instances of those components can be injected with an instance of the `NgbActiveModal` class. You can then\n     * use `NgbActiveModal` methods to close / dismiss modals from \"inside\" of your component.\n     *\n     * Also see the [`NgbModalOptions`](#/components/modal/api#NgbModalOptions) for the list of supported options.\n     */\n    open(content, options = {}) {\n        const combinedOptions = Object.assign(Object.assign(Object.assign({}, this._config), { animation: this._config.animation }), options);\n        return this._modalStack.open(this._moduleCFR, this._injector, content, combinedOptions);\n    }\n    /**\n     * Returns an observable that holds the active modal instances.\n     */\n    get activeInstances() { return this._modalStack.activeInstances; }\n    /**\n     * Dismisses all currently displayed modal windows with the supplied reason.\n     *\n     * @since 3.1.0\n     */\n    dismissAll(reason) { this._modalStack.dismissAll(reason); }\n    /**\n     * Indicates if there are currently any open modal windows in the application.\n     *\n     * @since 3.3.0\n     */\n    hasOpenModals() { return this._modalStack.hasOpenModals(); }\n}\nNgbModal.ɵfac = function NgbModal_Factory(t) { return new (t || NgbModal)(ɵngcc0.ɵɵinject(ɵngcc0.ComponentFactoryResolver), ɵngcc0.ɵɵinject(ɵngcc0.Injector), ɵngcc0.ɵɵinject(NgbModalStack), ɵngcc0.ɵɵinject(NgbModalConfig)); };\nNgbModal.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbModal_Factory() { return new NgbModal(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(NgbModalStack), i0.ɵɵinject(NgbModalConfig)); }, token: NgbModal, providedIn: \"root\" });\nNgbModal.ctorParameters = () => [\n    { type: ComponentFactoryResolver },\n    { type: Injector },\n    { type: NgbModalStack },\n    { type: NgbModalConfig }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbModal, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return [{ type: ɵngcc0.ComponentFactoryResolver }, { type: ɵngcc0.Injector }, { type: NgbModalStack }, { type: NgbModalConfig }]; }, null); })();\n\nclass NgbModalModule {\n}\nNgbModalModule.ɵfac = function NgbModalModule_Factory(t) { return new (t || NgbModalModule)(); };\nNgbModalModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbModalModule });\nNgbModalModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [NgbModal] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbModalModule, [{\n        type: NgModule,\n        args: [{\n                declarations: [NgbModalBackdrop, NgbModalWindow],\n                entryComponents: [NgbModalBackdrop, NgbModalWindow],\n                providers: [NgbModal]\n            }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbModalModule, { declarations: [NgbModalBackdrop, NgbModalWindow] }); })();\n\n/**\n * A configuration service for the [`NgbNav`](#/components/nav/api#NgbNav) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the navs used in the application.\n *\n * @since 5.2.0\n */\nclass NgbNavConfig {\n    constructor(_ngbConfig) {\n        this._ngbConfig = _ngbConfig;\n        this.destroyOnHide = true;\n        this.orientation = 'horizontal';\n        this.roles = 'tablist';\n        this.keyboard = false;\n    }\n    get animation() { return (this._animation === undefined) ? this._ngbConfig.animation : this._animation; }\n    set animation(animation) { this._animation = animation; }\n}\nNgbNavConfig.ɵfac = function NgbNavConfig_Factory(t) { return new (t || NgbNavConfig)(ɵngcc0.ɵɵinject(NgbConfig)); };\nNgbNavConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbNavConfig_Factory() { return new NgbNavConfig(i0.ɵɵinject(NgbConfig)); }, token: NgbNavConfig, providedIn: \"root\" });\nNgbNavConfig.ctorParameters = () => [\n    { type: NgbConfig }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbNavConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return [{ type: NgbConfig }]; }, null); })();\n\nconst isValidNavId = (id) => isDefined(id) && id !== '';\nconst ɵ0$1 = isValidNavId;\nlet navCounter = 0;\n/**\n * This directive must be used to wrap content to be displayed in the nav.\n *\n * @since 5.2.0\n */\nclass NgbNavContent {\n    constructor(templateRef) {\n        this.templateRef = templateRef;\n    }\n}\nNgbNavContent.ɵfac = function NgbNavContent_Factory(t) { return new (t || NgbNavContent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgbNavContent.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbNavContent, selectors: [[\"ng-template\", \"ngbNavContent\", \"\"]] });\nNgbNavContent.ctorParameters = () => [\n    { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbNavContent, [{\n        type: Directive,\n        args: [{ selector: 'ng-template[ngbNavContent]' }]\n    }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\n/**\n * The directive used to group nav link and related nav content. As well as set nav identifier and some options.\n *\n * @since 5.2.0\n */\nclass NgbNavItem {\n    constructor(nav, elementRef) {\n        this.elementRef = elementRef;\n        /**\n         * If `true`, the current nav item is disabled and can't be toggled by user.\n         *\n         * Nevertheless disabled nav can be selected programmatically via the `.select()` method and the `[activeId]` binding.\n         */\n        this.disabled = false;\n        /**\n         * An event emitted when the fade in transition is finished on the related nav content\n         *\n         * @since 8.0.0\n         */\n        this.shown = new EventEmitter();\n        /**\n         * An event emitted when the fade out transition is finished on the related nav content\n         *\n         * @since 8.0.0\n         */\n        this.hidden = new EventEmitter();\n        // TODO: cf https://github.com/angular/angular/issues/30106\n        this._nav = nav;\n    }\n    ngAfterContentChecked() {\n        // We are using @ContentChildren instead of @ContentChild as in the Angular version being used\n        // only @ContentChildren allows us to specify the {descendants: false} option.\n        // Without {descendants: false} we are hitting bugs described in:\n        // https://github.com/ng-bootstrap/ng-bootstrap/issues/2240\n        this.contentTpl = this.contentTpls.first;\n    }\n    ngOnInit() {\n        if (!isDefined(this.domId)) {\n            this.domId = `ngb-nav-${navCounter++}`;\n        }\n    }\n    get active() { return this._nav.activeId === this.id; }\n    get id() { return isValidNavId(this._id) ? this._id : this.domId; }\n    get panelDomId() { return `${this.domId}-panel`; }\n    isPanelInDom() {\n        return (isDefined(this.destroyOnHide) ? !this.destroyOnHide : !this._nav.destroyOnHide) || this.active;\n    }\n}\nNgbNavItem.ɵfac = function NgbNavItem_Factory(t) { return new (t || NgbNavItem)(ɵngcc0.ɵɵdirectiveInject(forwardRef(() => NgbNav)), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nNgbNavItem.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbNavItem, selectors: [[\"\", \"ngbNavItem\", \"\"]], contentQueries: function NgbNavItem_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbNavContent, 4);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.contentTpls = _t);\n    } }, hostVars: 2, hostBindings: function NgbNavItem_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵclassProp(\"nav-item\", true);\n    } }, inputs: { disabled: \"disabled\", domId: \"domId\", destroyOnHide: \"destroyOnHide\", _id: [\"ngbNavItem\", \"_id\"] }, outputs: { shown: \"shown\", hidden: \"hidden\" }, exportAs: [\"ngbNavItem\"] });\nNgbNavItem.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [forwardRef(() => NgbNav),] }] },\n    { type: ElementRef }\n];\nNgbNavItem.propDecorators = {\n    destroyOnHide: [{ type: Input }],\n    disabled: [{ type: Input }],\n    domId: [{ type: Input }],\n    _id: [{ type: Input, args: ['ngbNavItem',] }],\n    shown: [{ type: Output }],\n    hidden: [{ type: Output }],\n    contentTpls: [{ type: ContentChildren, args: [NgbNavContent, { descendants: false },] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbNavItem, [{\n        type: Directive,\n        args: [{ selector: '[ngbNavItem]', exportAs: 'ngbNavItem', host: { '[class.nav-item]': 'true' } }]\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [forwardRef(() => NgbNav)]\n            }] }, { type: ɵngcc0.ElementRef }]; }, { disabled: [{\n            type: Input\n        }], shown: [{\n            type: Output\n        }], hidden: [{\n            type: Output\n        }], domId: [{\n            type: Input\n        }], destroyOnHide: [{\n            type: Input\n        }], _id: [{\n            type: Input,\n            args: ['ngbNavItem']\n        }], contentTpls: [{\n            type: ContentChildren,\n            args: [NgbNavContent, { descendants: false }]\n        }] }); })();\n/**\n * A nav directive that helps with implementing tabbed navigation components.\n *\n * @since 5.2.0\n */\nclass NgbNav {\n    constructor(role, config, _cd, _document) {\n        this.role = role;\n        this._cd = _cd;\n        this._document = _document;\n        /**\n         * The event emitted after the active nav changes\n         * The payload of the event is the newly active nav id\n         *\n         * If you want to prevent nav change, you should use `(navChange)` event\n         */\n        this.activeIdChange = new EventEmitter();\n        /**\n         * An event emitted when the fade in transition is finished for one of the items.\n         *\n         * Payload of the event is the nav id that was just shown.\n         *\n         * @since 8.0.0\n         */\n        this.shown = new EventEmitter();\n        /**\n         * An event emitted when the fade out transition is finished for one of the items.\n         *\n         * Payload of the event is the nav id that was just hidden.\n         *\n         * @since 8.0.0\n         */\n        this.hidden = new EventEmitter();\n        this.destroy$ = new Subject();\n        this.navItemChange$ = new Subject();\n        /**\n         * The nav change event emitted right before the nav change happens on user click.\n         *\n         * This event won't be emitted if nav is changed programmatically via `[activeId]` or `.select()`.\n         *\n         * See [`NgbNavChangeEvent`](#/components/nav/api#NgbNavChangeEvent) for payload details.\n         */\n        this.navChange = new EventEmitter();\n        this.animation = config.animation;\n        this.destroyOnHide = config.destroyOnHide;\n        this.orientation = config.orientation;\n        this.roles = config.roles;\n        this.keyboard = config.keyboard;\n    }\n    click(item) {\n        if (!item.disabled) {\n            this._updateActiveId(item.id);\n        }\n    }\n    onKeyDown(event) {\n        if (this.roles !== 'tablist' || !this.keyboard) {\n            return;\n        }\n        // tslint:disable-next-line: deprecation\n        const key = event.which;\n        const enabledLinks = this.links.filter(link => !link.navItem.disabled);\n        const { length } = enabledLinks;\n        let position = -1;\n        enabledLinks.forEach((link, index) => {\n            if (link.elRef.nativeElement === this._document.activeElement) {\n                position = index;\n            }\n        });\n        if (length) {\n            switch (key) {\n                case Key.ArrowLeft:\n                    if (this.orientation === 'vertical') {\n                        return;\n                    }\n                    position = (position - 1 + length) % length;\n                    break;\n                case Key.ArrowRight:\n                    if (this.orientation === 'vertical') {\n                        return;\n                    }\n                    position = (position + 1) % length;\n                    break;\n                case Key.ArrowDown:\n                    if (this.orientation === 'horizontal') {\n                        return;\n                    }\n                    position = (position + 1) % length;\n                    break;\n                case Key.ArrowUp:\n                    if (this.orientation === 'horizontal') {\n                        return;\n                    }\n                    position = (position - 1 + length) % length;\n                    break;\n                case Key.Home:\n                    position = 0;\n                    break;\n                case Key.End:\n                    position = length - 1;\n                    break;\n            }\n            if (this.keyboard === 'changeWithArrows') {\n                this.select(enabledLinks[position].navItem.id);\n            }\n            enabledLinks[position].elRef.nativeElement.focus();\n            event.preventDefault();\n        }\n    }\n    /**\n     * Selects the nav with the given id and shows its associated pane.\n     * Any other nav that was previously selected becomes unselected and its associated pane is hidden.\n     */\n    select(id) { this._updateActiveId(id, false); }\n    ngAfterContentInit() {\n        if (!isDefined(this.activeId)) {\n            const nextId = this.items.first ? this.items.first.id : null;\n            if (isValidNavId(nextId)) {\n                this._updateActiveId(nextId, false);\n                this._cd.detectChanges();\n            }\n        }\n        this.items.changes.pipe(takeUntil(this.destroy$)).subscribe(() => this._notifyItemChanged(this.activeId));\n    }\n    ngOnChanges({ activeId }) {\n        if (activeId && !activeId.firstChange) {\n            this._notifyItemChanged(activeId.currentValue);\n        }\n    }\n    ngOnDestroy() { this.destroy$.next(); }\n    _updateActiveId(nextId, emitNavChange = true) {\n        if (this.activeId !== nextId) {\n            let defaultPrevented = false;\n            if (emitNavChange) {\n                this.navChange.emit({ activeId: this.activeId, nextId, preventDefault: () => { defaultPrevented = true; } });\n            }\n            if (!defaultPrevented) {\n                this.activeId = nextId;\n                this.activeIdChange.emit(nextId);\n                this._notifyItemChanged(nextId);\n            }\n        }\n    }\n    _notifyItemChanged(nextItemId) { this.navItemChange$.next(this._getItemById(nextItemId)); }\n    _getItemById(itemId) {\n        return this.items && this.items.find(item => item.id === itemId) || null;\n    }\n}\nNgbNav.ɵfac = function NgbNav_Factory(t) { return new (t || NgbNav)(ɵngcc0.ɵɵinjectAttribute('role'), ɵngcc0.ɵɵdirectiveInject(NgbNavConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(DOCUMENT)); };\nNgbNav.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbNav, selectors: [[\"\", \"ngbNav\", \"\"]], contentQueries: function NgbNav_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbNavItem, 4);\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbNavLink, 5);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.items = _t);\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.links = _t);\n    } }, hostVars: 6, hostBindings: function NgbNav_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"keydown.arrowLeft\", function NgbNav_keydown_arrowLeft_HostBindingHandler($event) { return ctx.onKeyDown($event); })(\"keydown.arrowRight\", function NgbNav_keydown_arrowRight_HostBindingHandler($event) { return ctx.onKeyDown($event); })(\"keydown.arrowDown\", function NgbNav_keydown_arrowDown_HostBindingHandler($event) { return ctx.onKeyDown($event); })(\"keydown.arrowUp\", function NgbNav_keydown_arrowUp_HostBindingHandler($event) { return ctx.onKeyDown($event); })(\"keydown.Home\", function NgbNav_keydown_Home_HostBindingHandler($event) { return ctx.onKeyDown($event); })(\"keydown.End\", function NgbNav_keydown_End_HostBindingHandler($event) { return ctx.onKeyDown($event); });\n    } if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"aria-orientation\", ctx.orientation === \"vertical\" && ctx.roles === \"tablist\" ? \"vertical\" : undefined)(\"role\", ctx.role ? ctx.role : ctx.roles ? \"tablist\" : undefined);\n        ɵngcc0.ɵɵclassProp(\"nav\", true)(\"flex-column\", ctx.orientation === \"vertical\");\n    } }, inputs: { animation: \"animation\", destroyOnHide: \"destroyOnHide\", orientation: \"orientation\", roles: \"roles\", keyboard: \"keyboard\", activeId: \"activeId\" }, outputs: { activeIdChange: \"activeIdChange\", shown: \"shown\", hidden: \"hidden\", navChange: \"navChange\" }, exportAs: [\"ngbNav\"], features: [ɵngcc0.ɵɵNgOnChangesFeature] });\nNgbNav.ctorParameters = () => [\n    { type: String, decorators: [{ type: Attribute, args: ['role',] }] },\n    { type: NgbNavConfig },\n    { type: ChangeDetectorRef },\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\nNgbNav.propDecorators = {\n    activeId: [{ type: Input }],\n    activeIdChange: [{ type: Output }],\n    animation: [{ type: Input }],\n    destroyOnHide: [{ type: Input }],\n    orientation: [{ type: Input }],\n    roles: [{ type: Input }],\n    keyboard: [{ type: Input }],\n    shown: [{ type: Output }],\n    hidden: [{ type: Output }],\n    items: [{ type: ContentChildren, args: [NgbNavItem,] }],\n    links: [{ type: ContentChildren, args: [forwardRef(() => NgbNavLink), { descendants: true },] }],\n    navChange: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbNav, [{\n        type: Directive,\n        args: [{\n                selector: '[ngbNav]',\n                exportAs: 'ngbNav',\n                host: {\n                    '[class.nav]': 'true',\n                    '[class.flex-column]': `orientation === 'vertical'`,\n                    '[attr.aria-orientation]': `orientation === 'vertical' && roles === 'tablist' ? 'vertical' : undefined`,\n                    '[attr.role]': `role ? role : roles ? 'tablist' : undefined`,\n                    '(keydown.arrowLeft)': 'onKeyDown($event)',\n                    '(keydown.arrowRight)': 'onKeyDown($event)',\n                    '(keydown.arrowDown)': 'onKeyDown($event)',\n                    '(keydown.arrowUp)': 'onKeyDown($event)',\n                    '(keydown.Home)': 'onKeyDown($event)',\n                    '(keydown.End)': 'onKeyDown($event)'\n                }\n            }]\n    }], function () { return [{ type: String, decorators: [{\n                type: Attribute,\n                args: ['role']\n            }] }, { type: NgbNavConfig }, { type: ɵngcc0.ChangeDetectorRef }, { type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }]; }, { activeIdChange: [{\n            type: Output\n        }], shown: [{\n            type: Output\n        }], hidden: [{\n            type: Output\n        }], navChange: [{\n            type: Output\n        }], animation: [{\n            type: Input\n        }], destroyOnHide: [{\n            type: Input\n        }], orientation: [{\n            type: Input\n        }], roles: [{\n            type: Input\n        }], keyboard: [{\n            type: Input\n        }], activeId: [{\n            type: Input\n        }], items: [{\n            type: ContentChildren,\n            args: [NgbNavItem]\n        }], links: [{\n            type: ContentChildren,\n            args: [forwardRef(() => NgbNavLink), { descendants: true }]\n        }] }); })();\n/**\n * A directive to put on the nav link.\n *\n * @since 5.2.0\n */\nclass NgbNavLink {\n    constructor(role, navItem, nav, elRef) {\n        this.role = role;\n        this.navItem = navItem;\n        this.nav = nav;\n        this.elRef = elRef;\n    }\n    hasNavItemClass() {\n        // with alternative markup we have to add `.nav-item` class, because `ngbNavItem` is on the ng-container\n        return this.navItem.elementRef.nativeElement.nodeType === Node.COMMENT_NODE;\n    }\n}\nNgbNavLink.ɵfac = function NgbNavLink_Factory(t) { return new (t || NgbNavLink)(ɵngcc0.ɵɵinjectAttribute('role'), ɵngcc0.ɵɵdirectiveInject(NgbNavItem), ɵngcc0.ɵɵdirectiveInject(NgbNav), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nNgbNavLink.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbNavLink, selectors: [[\"a\", \"ngbNavLink\", \"\"]], hostAttrs: [\"href\", \"\"], hostVars: 14, hostBindings: function NgbNavLink_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"click\", function NgbNavLink_click_HostBindingHandler($event) { ctx.nav.click(ctx.navItem); return $event.preventDefault(); });\n    } if (rf & 2) {\n        ɵngcc0.ɵɵhostProperty(\"id\", ctx.navItem.domId);\n        ɵngcc0.ɵɵattribute(\"role\", ctx.role ? ctx.role : ctx.nav.roles ? \"tab\" : undefined)(\"tabindex\", ctx.navItem.disabled ? -1 : undefined)(\"aria-controls\", ctx.navItem.isPanelInDom() ? ctx.navItem.panelDomId : null)(\"aria-selected\", ctx.navItem.active)(\"aria-disabled\", ctx.navItem.disabled);\n        ɵngcc0.ɵɵclassProp(\"nav-link\", true)(\"nav-item\", ctx.hasNavItemClass())(\"active\", ctx.navItem.active)(\"disabled\", ctx.navItem.disabled);\n    } } });\nNgbNavLink.ctorParameters = () => [\n    { type: String, decorators: [{ type: Attribute, args: ['role',] }] },\n    { type: NgbNavItem },\n    { type: NgbNav },\n    { type: ElementRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbNavLink, [{\n        type: Directive,\n        args: [{\n                selector: 'a[ngbNavLink]',\n                host: {\n                    '[id]': 'navItem.domId',\n                    '[class.nav-link]': 'true',\n                    '[class.nav-item]': 'hasNavItemClass()',\n                    '[attr.role]': `role ? role : nav.roles ? 'tab' : undefined`,\n                    'href': '',\n                    '[class.active]': 'navItem.active',\n                    '[class.disabled]': 'navItem.disabled',\n                    '[attr.tabindex]': 'navItem.disabled ? -1 : undefined',\n                    '[attr.aria-controls]': 'navItem.isPanelInDom() ? navItem.panelDomId : null',\n                    '[attr.aria-selected]': 'navItem.active',\n                    '[attr.aria-disabled]': 'navItem.disabled',\n                    '(click)': 'nav.click(navItem); $event.preventDefault()'\n                }\n            }]\n    }], function () { return [{ type: String, decorators: [{\n                type: Attribute,\n                args: ['role']\n            }] }, { type: NgbNavItem }, { type: NgbNav }, { type: ɵngcc0.ElementRef }]; }, null); })();\n\nconst ngbNavFadeOutTransition = ({ classList }) => {\n    classList.remove('show');\n    return () => classList.remove('active');\n};\nconst ngbNavFadeInTransition = (element, animation) => {\n    if (animation) {\n        reflow(element);\n    }\n    element.classList.add('show');\n};\n\nclass NgbNavPane {\n    constructor(elRef) {\n        this.elRef = elRef;\n    }\n}\nNgbNavPane.ɵfac = function NgbNavPane_Factory(t) { return new (t || NgbNavPane)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nNgbNavPane.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbNavPane, selectors: [[\"\", \"ngbNavPane\", \"\"]], hostAttrs: [1, \"tab-pane\"], hostVars: 5, hostBindings: function NgbNavPane_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵhostProperty(\"id\", ctx.item.panelDomId);\n        ɵngcc0.ɵɵattribute(\"role\", ctx.role ? ctx.role : ctx.nav.roles ? \"tabpanel\" : undefined)(\"aria-labelledby\", ctx.item.domId);\n        ɵngcc0.ɵɵclassProp(\"fade\", ctx.nav.animation);\n    } }, inputs: { item: \"item\", nav: \"nav\", role: \"role\" } });\nNgbNavPane.ctorParameters = () => [\n    { type: ElementRef }\n];\nNgbNavPane.propDecorators = {\n    item: [{ type: Input }],\n    nav: [{ type: Input }],\n    role: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbNavPane, [{\n        type: Directive,\n        args: [{\n                selector: '[ngbNavPane]',\n                host: {\n                    '[id]': 'item.panelDomId',\n                    'class': 'tab-pane',\n                    '[class.fade]': 'nav.animation',\n                    '[attr.role]': 'role ? role : nav.roles ? \"tabpanel\" : undefined',\n                    '[attr.aria-labelledby]': 'item.domId'\n                }\n            }]\n    }], function () { return [{ type: ɵngcc0.ElementRef }]; }, { item: [{\n            type: Input\n        }], nav: [{\n            type: Input\n        }], role: [{\n            type: Input\n        }] }); })();\n/**\n * The outlet where currently active nav content will be displayed.\n *\n * @since 5.2.0\n */\nclass NgbNavOutlet {\n    constructor(_cd, _ngZone) {\n        this._cd = _cd;\n        this._ngZone = _ngZone;\n        this._activePane = null;\n    }\n    isPanelTransitioning(item) { var _a; return ((_a = this._activePane) === null || _a === void 0 ? void 0 : _a.item) === item; }\n    ngAfterViewInit() {\n        var _a;\n        // initial display\n        this._updateActivePane();\n        // this will be emitted for all 3 types of nav changes: .select(), [activeId] or (click)\n        this.nav.navItemChange$\n            .pipe(takeUntil(this.nav.destroy$), startWith(((_a = this._activePane) === null || _a === void 0 ? void 0 : _a.item) || null), distinctUntilChanged(), skip(1))\n            .subscribe(nextItem => {\n            const options = { animation: this.nav.animation, runningTransition: 'stop' };\n            // next panel we're switching to will only appear in DOM after the change detection is done\n            // and `this._panes` will be updated\n            this._cd.detectChanges();\n            // fading out\n            if (this._activePane) {\n                ngbRunTransition(this._ngZone, this._activePane.elRef.nativeElement, ngbNavFadeOutTransition, options)\n                    .subscribe(() => {\n                    var _a;\n                    const activeItem = (_a = this._activePane) === null || _a === void 0 ? void 0 : _a.item;\n                    this._activePane = this._getPaneForItem(nextItem);\n                    // mark for check when transition finishes as outlet or parent containers might be OnPush\n                    // without this the panes that have \"faded out\" will stay in DOM\n                    this._cd.markForCheck();\n                    // fading in\n                    if (this._activePane) {\n                        // we have to add the '.active' class before running the transition,\n                        // because it should be in place before `ngbRunTransition` does `reflow()`\n                        this._activePane.elRef.nativeElement.classList.add('active');\n                        ngbRunTransition(this._ngZone, this._activePane.elRef.nativeElement, ngbNavFadeInTransition, options)\n                            .subscribe(() => {\n                            if (nextItem) {\n                                nextItem.shown.emit();\n                                this.nav.shown.emit(nextItem.id);\n                            }\n                        });\n                    }\n                    if (activeItem) {\n                        activeItem.hidden.emit();\n                        this.nav.hidden.emit(activeItem.id);\n                    }\n                });\n            }\n            else {\n                this._updateActivePane();\n            }\n        });\n    }\n    _updateActivePane() {\n        var _a, _b;\n        this._activePane = this._getActivePane();\n        (_a = this._activePane) === null || _a === void 0 ? void 0 : _a.elRef.nativeElement.classList.add('show');\n        (_b = this._activePane) === null || _b === void 0 ? void 0 : _b.elRef.nativeElement.classList.add('active');\n    }\n    _getPaneForItem(item) {\n        return this._panes && this._panes.find(pane => pane.item === item) || null;\n    }\n    _getActivePane() {\n        return this._panes && this._panes.find(pane => pane.item.active) || null;\n    }\n}\nNgbNavOutlet.ɵfac = function NgbNavOutlet_Factory(t) { return new (t || NgbNavOutlet)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone)); };\nNgbNavOutlet.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbNavOutlet, selectors: [[\"\", \"ngbNavOutlet\", \"\"]], viewQuery: function NgbNavOutlet_Query(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵviewQuery(NgbNavPane, 5);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx._panes = _t);\n    } }, hostVars: 2, hostBindings: function NgbNavOutlet_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵclassProp(\"tab-content\", true);\n    } }, inputs: { paneRole: \"paneRole\", nav: [\"ngbNavOutlet\", \"nav\"] }, attrs: _c32, decls: 1, vars: 1, consts: [[\"ngFor\", \"\", 3, \"ngForOf\"], [\"ngbNavPane\", \"\", 3, \"item\", \"nav\", \"role\", 4, \"ngIf\"], [\"ngbNavPane\", \"\", 3, \"item\", \"nav\", \"role\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"]], template: function NgbNavOutlet_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵtemplate(0, NgbNavOutlet_ng_template_0_Template, 1, 1, \"ng-template\", 0);\n    } if (rf & 2) {\n        ɵngcc0.ɵɵproperty(\"ngForOf\", ctx.nav.items);\n    } }, directives: [ɵngcc1.NgForOf, ɵngcc1.NgIf, NgbNavPane, ɵngcc1.NgTemplateOutlet], encapsulation: 2, changeDetection: 0 });\nNgbNavOutlet.ctorParameters = () => [\n    { type: ChangeDetectorRef },\n    { type: NgZone }\n];\nNgbNavOutlet.propDecorators = {\n    _panes: [{ type: ViewChildren, args: [NgbNavPane,] }],\n    paneRole: [{ type: Input }],\n    nav: [{ type: Input, args: ['ngbNavOutlet',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbNavOutlet, [{\n        type: Component,\n        args: [{\n                selector: '[ngbNavOutlet]',\n                host: { '[class.tab-content]': 'true' },\n                encapsulation: ViewEncapsulation.None,\n                changeDetection: ChangeDetectionStrategy.OnPush,\n                template: `\n    <ng-template ngFor let-item [ngForOf]=\"nav.items\">\n      <div ngbNavPane *ngIf=\"item.isPanelInDom() || isPanelTransitioning(item)\" [item]=\"item\" [nav]=\"nav\" [role]=\"paneRole\">\n        <ng-template [ngTemplateOutlet]=\"item.contentTpl?.templateRef || null\"\n                     [ngTemplateOutletContext]=\"{$implicit: item.active || isPanelTransitioning(item)}\"></ng-template>\n      </div>\n    </ng-template>\n  `\n            }]\n    }], function () { return [{ type: ɵngcc0.ChangeDetectorRef }, { type: ɵngcc0.NgZone }]; }, { _panes: [{\n            type: ViewChildren,\n            args: [NgbNavPane]\n        }], paneRole: [{\n            type: Input\n        }], nav: [{\n            type: Input,\n            args: ['ngbNavOutlet']\n        }] }); })();\n\nconst NGB_NAV_DIRECTIVES = [NgbNavContent, NgbNav, NgbNavItem, NgbNavLink, NgbNavOutlet, NgbNavPane];\nclass NgbNavModule {\n}\nNgbNavModule.ɵfac = function NgbNavModule_Factory(t) { return new (t || NgbNavModule)(); };\nNgbNavModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbNavModule });\nNgbNavModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [[CommonModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbNavModule, [{\n        type: NgModule,\n        args: [{ declarations: NGB_NAV_DIRECTIVES, exports: NGB_NAV_DIRECTIVES, imports: [CommonModule] }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbNavModule, { declarations: function () { return [NgbNavContent, NgbNav, NgbNavItem, NgbNavLink, NgbNavOutlet, NgbNavPane]; }, imports: function () { return [CommonModule]; }, exports: function () { return [NgbNavContent, NgbNav, NgbNavItem, NgbNavLink, NgbNavOutlet, NgbNavPane]; } }); })();\n\n/**\n * A configuration service for the [`NgbPagination`](#/components/pagination/api#NgbPagination) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the paginations used in the application.\n */\nclass NgbPaginationConfig {\n    constructor() {\n        this.disabled = false;\n        this.boundaryLinks = false;\n        this.directionLinks = true;\n        this.ellipses = true;\n        this.maxSize = 0;\n        this.pageSize = 10;\n        this.rotate = false;\n    }\n}\nNgbPaginationConfig.ɵfac = function NgbPaginationConfig_Factory(t) { return new (t || NgbPaginationConfig)(); };\nNgbPaginationConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbPaginationConfig_Factory() { return new NgbPaginationConfig(); }, token: NgbPaginationConfig, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPaginationConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return []; }, null); })();\n\n/**\n * A directive to match the 'ellipsis' link template\n *\n * @since 4.1.0\n */\nclass NgbPaginationEllipsis {\n    constructor(templateRef) {\n        this.templateRef = templateRef;\n    }\n}\nNgbPaginationEllipsis.ɵfac = function NgbPaginationEllipsis_Factory(t) { return new (t || NgbPaginationEllipsis)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgbPaginationEllipsis.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbPaginationEllipsis, selectors: [[\"ng-template\", \"ngbPaginationEllipsis\", \"\"]] });\nNgbPaginationEllipsis.ctorParameters = () => [\n    { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPaginationEllipsis, [{\n        type: Directive,\n        args: [{ selector: 'ng-template[ngbPaginationEllipsis]' }]\n    }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\n/**\n * A directive to match the 'first' link template\n *\n * @since 4.1.0\n */\nclass NgbPaginationFirst {\n    constructor(templateRef) {\n        this.templateRef = templateRef;\n    }\n}\nNgbPaginationFirst.ɵfac = function NgbPaginationFirst_Factory(t) { return new (t || NgbPaginationFirst)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgbPaginationFirst.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbPaginationFirst, selectors: [[\"ng-template\", \"ngbPaginationFirst\", \"\"]] });\nNgbPaginationFirst.ctorParameters = () => [\n    { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPaginationFirst, [{\n        type: Directive,\n        args: [{ selector: 'ng-template[ngbPaginationFirst]' }]\n    }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\n/**\n * A directive to match the 'last' link template\n *\n * @since 4.1.0\n */\nclass NgbPaginationLast {\n    constructor(templateRef) {\n        this.templateRef = templateRef;\n    }\n}\nNgbPaginationLast.ɵfac = function NgbPaginationLast_Factory(t) { return new (t || NgbPaginationLast)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgbPaginationLast.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbPaginationLast, selectors: [[\"ng-template\", \"ngbPaginationLast\", \"\"]] });\nNgbPaginationLast.ctorParameters = () => [\n    { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPaginationLast, [{\n        type: Directive,\n        args: [{ selector: 'ng-template[ngbPaginationLast]' }]\n    }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\n/**\n * A directive to match the 'next' link template\n *\n * @since 4.1.0\n */\nclass NgbPaginationNext {\n    constructor(templateRef) {\n        this.templateRef = templateRef;\n    }\n}\nNgbPaginationNext.ɵfac = function NgbPaginationNext_Factory(t) { return new (t || NgbPaginationNext)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgbPaginationNext.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbPaginationNext, selectors: [[\"ng-template\", \"ngbPaginationNext\", \"\"]] });\nNgbPaginationNext.ctorParameters = () => [\n    { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPaginationNext, [{\n        type: Directive,\n        args: [{ selector: 'ng-template[ngbPaginationNext]' }]\n    }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\n/**\n * A directive to match the page 'number' link template\n *\n * @since 4.1.0\n */\nclass NgbPaginationNumber {\n    constructor(templateRef) {\n        this.templateRef = templateRef;\n    }\n}\nNgbPaginationNumber.ɵfac = function NgbPaginationNumber_Factory(t) { return new (t || NgbPaginationNumber)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgbPaginationNumber.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbPaginationNumber, selectors: [[\"ng-template\", \"ngbPaginationNumber\", \"\"]] });\nNgbPaginationNumber.ctorParameters = () => [\n    { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPaginationNumber, [{\n        type: Directive,\n        args: [{ selector: 'ng-template[ngbPaginationNumber]' }]\n    }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\n/**\n * A directive to match the 'previous' link template\n *\n * @since 4.1.0\n */\nclass NgbPaginationPrevious {\n    constructor(templateRef) {\n        this.templateRef = templateRef;\n    }\n}\nNgbPaginationPrevious.ɵfac = function NgbPaginationPrevious_Factory(t) { return new (t || NgbPaginationPrevious)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgbPaginationPrevious.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbPaginationPrevious, selectors: [[\"ng-template\", \"ngbPaginationPrevious\", \"\"]] });\nNgbPaginationPrevious.ctorParameters = () => [\n    { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPaginationPrevious, [{\n        type: Directive,\n        args: [{ selector: 'ng-template[ngbPaginationPrevious]' }]\n    }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\n/**\n * A directive to match the 'pages' whole content\n *\n * @since 9.1.0\n */\nclass NgbPaginationPages {\n    constructor(templateRef) {\n        this.templateRef = templateRef;\n    }\n}\nNgbPaginationPages.ɵfac = function NgbPaginationPages_Factory(t) { return new (t || NgbPaginationPages)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgbPaginationPages.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbPaginationPages, selectors: [[\"ng-template\", \"ngbPaginationPages\", \"\"]] });\nNgbPaginationPages.ctorParameters = () => [\n    { type: TemplateRef }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPaginationPages, [{\n        type: Directive,\n        args: [{ selector: 'ng-template[ngbPaginationPages]' }]\n    }], function () { return [{ type: ɵngcc0.TemplateRef }]; }, null); })();\n/**\n * A component that displays page numbers and allows to customize them in several ways.\n */\nclass NgbPagination {\n    constructor(config) {\n        this.pageCount = 0;\n        this.pages = [];\n        /**\n         *  The current page.\n         *\n         *  Page numbers start with `1`.\n         */\n        this.page = 1;\n        /**\n         *  An event fired when the page is changed. Will fire only if collection size is set and all values are valid.\n         *\n         *  Event payload is the number of the newly selected page.\n         *\n         *  Page numbers start with `1`.\n         */\n        this.pageChange = new EventEmitter(true);\n        this.disabled = config.disabled;\n        this.boundaryLinks = config.boundaryLinks;\n        this.directionLinks = config.directionLinks;\n        this.ellipses = config.ellipses;\n        this.maxSize = config.maxSize;\n        this.pageSize = config.pageSize;\n        this.rotate = config.rotate;\n        this.size = config.size;\n    }\n    hasPrevious() { return this.page > 1; }\n    hasNext() { return this.page < this.pageCount; }\n    nextDisabled() { return !this.hasNext() || this.disabled; }\n    previousDisabled() { return !this.hasPrevious() || this.disabled; }\n    selectPage(pageNumber) { this._updatePages(pageNumber); }\n    ngOnChanges(changes) { this._updatePages(this.page); }\n    isEllipsis(pageNumber) { return pageNumber === -1; }\n    /**\n     * Appends ellipses and first/last page number to the displayed pages\n     */\n    _applyEllipses(start, end) {\n        if (this.ellipses) {\n            if (start > 0) {\n                // The first page will always be included. If the displayed range\n                // starts after the third page, then add ellipsis. But if the range\n                // starts on the third page, then add the second page instead of\n                // an ellipsis, because the ellipsis would only hide a single page.\n                if (start > 2) {\n                    this.pages.unshift(-1);\n                }\n                else if (start === 2) {\n                    this.pages.unshift(2);\n                }\n                this.pages.unshift(1);\n            }\n            if (end < this.pageCount) {\n                // The last page will always be included. If the displayed range\n                // ends before the third-last page, then add ellipsis. But if the range\n                // ends on third-last page, then add the second-last page instead of\n                // an ellipsis, because the ellipsis would only hide a single page.\n                if (end < (this.pageCount - 2)) {\n                    this.pages.push(-1);\n                }\n                else if (end === (this.pageCount - 2)) {\n                    this.pages.push(this.pageCount - 1);\n                }\n                this.pages.push(this.pageCount);\n            }\n        }\n    }\n    /**\n     * Rotates page numbers based on maxSize items visible.\n     * Currently selected page stays in the middle:\n     *\n     * Ex. for selected page = 6:\n     * [5,*6*,7] for maxSize = 3\n     * [4,5,*6*,7] for maxSize = 4\n     */\n    _applyRotation() {\n        let start = 0;\n        let end = this.pageCount;\n        let leftOffset = Math.floor(this.maxSize / 2);\n        let rightOffset = this.maxSize % 2 === 0 ? leftOffset - 1 : leftOffset;\n        if (this.page <= leftOffset) {\n            // very beginning, no rotation -> [0..maxSize]\n            end = this.maxSize;\n        }\n        else if (this.pageCount - this.page < leftOffset) {\n            // very end, no rotation -> [len-maxSize..len]\n            start = this.pageCount - this.maxSize;\n        }\n        else {\n            // rotate\n            start = this.page - leftOffset - 1;\n            end = this.page + rightOffset;\n        }\n        return [start, end];\n    }\n    /**\n     * Paginates page numbers based on maxSize items per page.\n     */\n    _applyPagination() {\n        let page = Math.ceil(this.page / this.maxSize) - 1;\n        let start = page * this.maxSize;\n        let end = start + this.maxSize;\n        return [start, end];\n    }\n    _setPageInRange(newPageNo) {\n        const prevPageNo = this.page;\n        this.page = getValueInRange(newPageNo, this.pageCount, 1);\n        if (this.page !== prevPageNo && isNumber(this.collectionSize)) {\n            this.pageChange.emit(this.page);\n        }\n    }\n    _updatePages(newPage) {\n        this.pageCount = Math.ceil(this.collectionSize / this.pageSize);\n        if (!isNumber(this.pageCount)) {\n            this.pageCount = 0;\n        }\n        // fill-in model needed to render pages\n        this.pages.length = 0;\n        for (let i = 1; i <= this.pageCount; i++) {\n            this.pages.push(i);\n        }\n        // set page within 1..max range\n        this._setPageInRange(newPage);\n        // apply maxSize if necessary\n        if (this.maxSize > 0 && this.pageCount > this.maxSize) {\n            let start = 0;\n            let end = this.pageCount;\n            // either paginating or rotating page numbers\n            if (this.rotate) {\n                [start, end] = this._applyRotation();\n            }\n            else {\n                [start, end] = this._applyPagination();\n            }\n            this.pages = this.pages.slice(start, end);\n            // adding ellipses\n            this._applyEllipses(start, end);\n        }\n    }\n}\nNgbPagination.ɵfac = function NgbPagination_Factory(t) { return new (t || NgbPagination)(ɵngcc0.ɵɵdirectiveInject(NgbPaginationConfig)); };\nNgbPagination.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbPagination, selectors: [[\"ngb-pagination\"]], contentQueries: function NgbPagination_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbPaginationEllipsis, 5);\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbPaginationFirst, 5);\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbPaginationLast, 5);\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbPaginationNext, 5);\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbPaginationNumber, 5);\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbPaginationPrevious, 5);\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbPaginationPages, 5);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.tplEllipsis = _t.first);\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.tplFirst = _t.first);\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.tplLast = _t.first);\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.tplNext = _t.first);\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.tplNumber = _t.first);\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.tplPrevious = _t.first);\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.tplPages = _t.first);\n    } }, hostAttrs: [\"role\", \"navigation\"], inputs: { page: \"page\", disabled: \"disabled\", boundaryLinks: \"boundaryLinks\", directionLinks: \"directionLinks\", ellipses: \"ellipses\", maxSize: \"maxSize\", pageSize: \"pageSize\", rotate: \"rotate\", size: \"size\", collectionSize: \"collectionSize\" }, outputs: { pageChange: \"pageChange\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature], decls: 20, vars: 12, consts: function () { let i18n_34; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_pagination_first$$FESM2015_NG_BOOTSTRAP_JS__35 = goog.getMsg(\"\\u00AB\\u00AB\");\n        i18n_34 = MSG_EXTERNAL_ngb_pagination_first$$FESM2015_NG_BOOTSTRAP_JS__35;\n    }\n    else {\n        i18n_34 = $localize `:@@ngb.pagination.first␟656506dfd46380956a655f919f1498d018f75ca0␟6867721956102594380:««`;\n    } let i18n_36; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_pagination_previous$$FESM2015_NG_BOOTSTRAP_JS__37 = goog.getMsg(\"\\u00AB\");\n        i18n_36 = MSG_EXTERNAL_ngb_pagination_previous$$FESM2015_NG_BOOTSTRAP_JS__37;\n    }\n    else {\n        i18n_36 = $localize `:@@ngb.pagination.previous␟6e52b6ee77a4848d899dd21b591c6fd499e3aef3␟6479320895410098858:«`;\n    } let i18n_38; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_pagination_next$$FESM2015_NG_BOOTSTRAP_JS__39 = goog.getMsg(\"\\u00BB\");\n        i18n_38 = MSG_EXTERNAL_ngb_pagination_next$$FESM2015_NG_BOOTSTRAP_JS__39;\n    }\n    else {\n        i18n_38 = $localize `:@@ngb.pagination.next␟ba9cbb4ff311464308a3627e4f1c3345d9fe6d7d␟5458177150283468089:»`;\n    } let i18n_40; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_pagination_last$$FESM2015_NG_BOOTSTRAP_JS__41 = goog.getMsg(\"\\u00BB\\u00BB\");\n        i18n_40 = MSG_EXTERNAL_ngb_pagination_last$$FESM2015_NG_BOOTSTRAP_JS__41;\n    }\n    else {\n        i18n_40 = $localize `:@@ngb.pagination.last␟49f27a460bc97e7e00be5b37098bfa79884fc7d9␟5277020320267646988:»»`;\n    } let i18n_44; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_pagination_first_aria$$FESM2015_NG_BOOTSTRAP_JS__45 = goog.getMsg(\"First\");\n        i18n_44 = MSG_EXTERNAL_ngb_pagination_first_aria$$FESM2015_NG_BOOTSTRAP_JS__45;\n    }\n    else {\n        i18n_44 = $localize `:@@ngb.pagination.first-aria␟f2f852318759c6396b5d3d17031d53817d7b38cc␟2241508602425256033:First`;\n    } let i18n_47; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_pagination_previous_aria$$FESM2015_NG_BOOTSTRAP_JS__48 = goog.getMsg(\"Previous\");\n        i18n_47 = MSG_EXTERNAL_ngb_pagination_previous_aria$$FESM2015_NG_BOOTSTRAP_JS__48;\n    }\n    else {\n        i18n_47 = $localize `:@@ngb.pagination.previous-aria␟680d5c75b7fd8d37961083608b9fcdc4167b4c43␟4452427314943113135:Previous`;\n    } let i18n_50; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_pagination_next_aria$$FESM2015_NG_BOOTSTRAP_JS__51 = goog.getMsg(\"Next\");\n        i18n_50 = MSG_EXTERNAL_ngb_pagination_next_aria$$FESM2015_NG_BOOTSTRAP_JS__51;\n    }\n    else {\n        i18n_50 = $localize `:@@ngb.pagination.next-aria␟f732c304c7433e5a83ffcd862c3dce709a0f4982␟3885497195825665706:Next`;\n    } let i18n_52; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_pagination_last_aria$$FESM2015_NG_BOOTSTRAP_JS__53 = goog.getMsg(\"Last\");\n        i18n_52 = MSG_EXTERNAL_ngb_pagination_last_aria$$FESM2015_NG_BOOTSTRAP_JS__53;\n    }\n    else {\n        i18n_52 = $localize `:@@ngb.pagination.last-aria␟5c729788ba138508aca1bec050b610f7bf81db3e␟4882268002141858767:Last`;\n    } return [[\"first\", \"\"], [\"previous\", \"\"], [\"next\", \"\"], [\"last\", \"\"], [\"ellipsis\", \"\"], [\"defaultNumber\", \"\"], [\"defaultPages\", \"\"], [\"class\", \"page-item\", 3, \"disabled\", 4, \"ngIf\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [\"aria-hidden\", \"true\"], i18n_34, i18n_36, i18n_38, i18n_40, [\"class\", \"sr-only\", 4, \"ngIf\"], [1, \"sr-only\"], [\"class\", \"page-item\", 3, \"active\", \"disabled\", 4, \"ngFor\", \"ngForOf\"], [1, \"page-item\"], [\"class\", \"page-link\", \"tabindex\", \"-1\", \"aria-disabled\", \"true\", 4, \"ngIf\"], [\"class\", \"page-link\", \"href\", \"\", 3, \"click\", 4, \"ngIf\"], [\"tabindex\", \"-1\", \"aria-disabled\", \"true\", 1, \"page-link\"], [\"href\", \"\", 1, \"page-link\", 3, \"click\"], [\"aria-label\", i18n_44, \"href\", \"\", 1, \"page-link\", 3, \"click\"], [\"aria-label\", i18n_47, \"href\", \"\", 1, \"page-link\", 3, \"click\"], [\"aria-label\", i18n_50, \"href\", \"\", 1, \"page-link\", 3, \"click\"], [\"aria-label\", i18n_52, \"href\", \"\", 1, \"page-link\", 3, \"click\"]]; }, template: function NgbPagination_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵtemplate(0, NgbPagination_ng_template_0_Template, 2, 0, \"ng-template\", null, 0, ɵngcc0.ɵɵtemplateRefExtractor);\n        ɵngcc0.ɵɵtemplate(2, NgbPagination_ng_template_2_Template, 2, 0, \"ng-template\", null, 1, ɵngcc0.ɵɵtemplateRefExtractor);\n        ɵngcc0.ɵɵtemplate(4, NgbPagination_ng_template_4_Template, 2, 0, \"ng-template\", null, 2, ɵngcc0.ɵɵtemplateRefExtractor);\n        ɵngcc0.ɵɵtemplate(6, NgbPagination_ng_template_6_Template, 2, 0, \"ng-template\", null, 3, ɵngcc0.ɵɵtemplateRefExtractor);\n        ɵngcc0.ɵɵtemplate(8, NgbPagination_ng_template_8_Template, 1, 0, \"ng-template\", null, 4, ɵngcc0.ɵɵtemplateRefExtractor);\n        ɵngcc0.ɵɵtemplate(10, NgbPagination_ng_template_10_Template, 2, 2, \"ng-template\", null, 5, ɵngcc0.ɵɵtemplateRefExtractor);\n        ɵngcc0.ɵɵtemplate(12, NgbPagination_ng_template_12_Template, 1, 1, \"ng-template\", null, 6, ɵngcc0.ɵɵtemplateRefExtractor);\n        ɵngcc0.ɵɵelementStart(14, \"ul\");\n        ɵngcc0.ɵɵtemplate(15, NgbPagination_li_15_Template, 3, 9, \"li\", 7);\n        ɵngcc0.ɵɵtemplate(16, NgbPagination_li_16_Template, 3, 8, \"li\", 7);\n        ɵngcc0.ɵɵtemplate(17, NgbPagination_ng_template_17_Template, 0, 0, \"ng-template\", 8);\n        ɵngcc0.ɵɵtemplate(18, NgbPagination_li_18_Template, 3, 9, \"li\", 7);\n        ɵngcc0.ɵɵtemplate(19, NgbPagination_li_19_Template, 3, 9, \"li\", 7);\n        ɵngcc0.ɵɵelementEnd();\n    } if (rf & 2) {\n        const _r12 = ɵngcc0.ɵɵreference(13);\n        ɵngcc0.ɵɵadvance(14);\n        ɵngcc0.ɵɵclassMap(\"pagination\" + (ctx.size ? \" pagination-\" + ctx.size : \"\"));\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.boundaryLinks);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.directionLinks);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngTemplateOutlet\", (ctx.tplPages == null ? null : ctx.tplPages.templateRef) || _r12)(\"ngTemplateOutletContext\", ɵngcc0.ɵɵpureFunction3(8, _c54, ctx.page, ctx.pages, ctx.disabled));\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.directionLinks);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.boundaryLinks);\n    } }, directives: [ɵngcc1.NgIf, ɵngcc1.NgTemplateOutlet, ɵngcc1.NgForOf], encapsulation: 2, changeDetection: 0 });\nNgbPagination.ctorParameters = () => [\n    { type: NgbPaginationConfig }\n];\nNgbPagination.propDecorators = {\n    tplEllipsis: [{ type: ContentChild, args: [NgbPaginationEllipsis, { static: false },] }],\n    tplFirst: [{ type: ContentChild, args: [NgbPaginationFirst, { static: false },] }],\n    tplLast: [{ type: ContentChild, args: [NgbPaginationLast, { static: false },] }],\n    tplNext: [{ type: ContentChild, args: [NgbPaginationNext, { static: false },] }],\n    tplNumber: [{ type: ContentChild, args: [NgbPaginationNumber, { static: false },] }],\n    tplPrevious: [{ type: ContentChild, args: [NgbPaginationPrevious, { static: false },] }],\n    tplPages: [{ type: ContentChild, args: [NgbPaginationPages, { static: false },] }],\n    disabled: [{ type: Input }],\n    boundaryLinks: [{ type: Input }],\n    directionLinks: [{ type: Input }],\n    ellipses: [{ type: Input }],\n    rotate: [{ type: Input }],\n    collectionSize: [{ type: Input }],\n    maxSize: [{ type: Input }],\n    page: [{ type: Input }],\n    pageSize: [{ type: Input }],\n    pageChange: [{ type: Output }],\n    size: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPagination, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-pagination',\n                changeDetection: ChangeDetectionStrategy.OnPush,\n                host: { 'role': 'navigation' },\n                template: `\n    <ng-template #first><span aria-hidden=\"true\" i18n=\"@@ngb.pagination.first\">&laquo;&laquo;</span></ng-template>\n    <ng-template #previous><span aria-hidden=\"true\" i18n=\"@@ngb.pagination.previous\">&laquo;</span></ng-template>\n    <ng-template #next><span aria-hidden=\"true\" i18n=\"@@ngb.pagination.next\">&raquo;</span></ng-template>\n    <ng-template #last><span aria-hidden=\"true\" i18n=\"@@ngb.pagination.last\">&raquo;&raquo;</span></ng-template>\n    <ng-template #ellipsis>...</ng-template>\n    <ng-template #defaultNumber let-page let-currentPage=\"currentPage\">\n      {{ page }}\n      <span *ngIf=\"page === currentPage\" class=\"sr-only\">(current)</span>\n    </ng-template>\n    <ng-template #defaultPages let-page let-pages=\"pages\" let-disabled=\"disabled\">\n      <li *ngFor=\"let pageNumber of pages\" class=\"page-item\" [class.active]=\"pageNumber === page\"\n        [class.disabled]=\"isEllipsis(pageNumber) || disabled\" [attr.aria-current]=\"(pageNumber === page ? 'page' : null)\">\n        <a *ngIf=\"isEllipsis(pageNumber)\" class=\"page-link\" tabindex=\"-1\" aria-disabled=\"true\">\n          <ng-template [ngTemplateOutlet]=\"tplEllipsis?.templateRef || ellipsis\"\n                      [ngTemplateOutletContext]=\"{disabled: true, currentPage: page}\"></ng-template>\n        </a>\n        <a *ngIf=\"!isEllipsis(pageNumber)\" class=\"page-link\" href (click)=\"selectPage(pageNumber); $event.preventDefault()\"\n          [attr.tabindex]=\"disabled ? '-1' : null\" [attr.aria-disabled]=\"disabled ? 'true' : null\">\n          <ng-template [ngTemplateOutlet]=\"tplNumber?.templateRef || defaultNumber\"\n                      [ngTemplateOutletContext]=\"{disabled: disabled, $implicit: pageNumber, currentPage: page}\"></ng-template>\n        </a>\n      </li>\n    </ng-template>\n    <ul [class]=\"'pagination' + (size ? ' pagination-' + size : '')\">\n      <li *ngIf=\"boundaryLinks\" class=\"page-item\"\n        [class.disabled]=\"previousDisabled()\">\n        <a aria-label=\"First\" i18n-aria-label=\"@@ngb.pagination.first-aria\" class=\"page-link\" href\n          (click)=\"selectPage(1); $event.preventDefault()\" [attr.tabindex]=\"previousDisabled() ? '-1' : null\"\n          [attr.aria-disabled]=\"previousDisabled() ? 'true' : null\">\n          <ng-template [ngTemplateOutlet]=\"tplFirst?.templateRef || first\"\n                       [ngTemplateOutletContext]=\"{disabled: previousDisabled(), currentPage: page}\"></ng-template>\n        </a>\n      </li>\n\n      <li *ngIf=\"directionLinks\" class=\"page-item\"\n        [class.disabled]=\"previousDisabled()\">\n        <a aria-label=\"Previous\" i18n-aria-label=\"@@ngb.pagination.previous-aria\" class=\"page-link\" href\n          (click)=\"selectPage(page-1); $event.preventDefault()\" [attr.tabindex]=\"previousDisabled() ? '-1' : null\"\n          [attr.aria-disabled]=\"previousDisabled() ? 'true' : null\">\n          <ng-template [ngTemplateOutlet]=\"tplPrevious?.templateRef || previous\"\n                       [ngTemplateOutletContext]=\"{disabled: previousDisabled()}\"></ng-template>\n        </a>\n      </li>\n      <ng-template\n        [ngTemplateOutlet]=\"tplPages?.templateRef || defaultPages\"\n        [ngTemplateOutletContext]=\"{ $implicit: page, pages: pages, disabled: disabled }\"\n      >\n      </ng-template>\n      <li *ngIf=\"directionLinks\" class=\"page-item\" [class.disabled]=\"nextDisabled()\">\n        <a aria-label=\"Next\" i18n-aria-label=\"@@ngb.pagination.next-aria\" class=\"page-link\" href\n          (click)=\"selectPage(page+1); $event.preventDefault()\" [attr.tabindex]=\"nextDisabled() ? '-1' : null\"\n          [attr.aria-disabled]=\"nextDisabled() ? 'true' : null\">\n          <ng-template [ngTemplateOutlet]=\"tplNext?.templateRef || next\"\n                       [ngTemplateOutletContext]=\"{disabled: nextDisabled(), currentPage: page}\"></ng-template>\n        </a>\n      </li>\n\n      <li *ngIf=\"boundaryLinks\" class=\"page-item\" [class.disabled]=\"nextDisabled()\">\n        <a aria-label=\"Last\" i18n-aria-label=\"@@ngb.pagination.last-aria\" class=\"page-link\" href\n          (click)=\"selectPage(pageCount); $event.preventDefault()\" [attr.tabindex]=\"nextDisabled() ? '-1' : null\"\n          [attr.aria-disabled]=\"nextDisabled() ? 'true' : null\">\n          <ng-template [ngTemplateOutlet]=\"tplLast?.templateRef || last\"\n                       [ngTemplateOutletContext]=\"{disabled: nextDisabled(), currentPage: page}\"></ng-template>\n        </a>\n      </li>\n    </ul>\n  `\n            }]\n    }], function () { return [{ type: NgbPaginationConfig }]; }, { page: [{\n            type: Input\n        }], pageChange: [{\n            type: Output\n        }], disabled: [{\n            type: Input\n        }], boundaryLinks: [{\n            type: Input\n        }], directionLinks: [{\n            type: Input\n        }], ellipses: [{\n            type: Input\n        }], maxSize: [{\n            type: Input\n        }], pageSize: [{\n            type: Input\n        }], rotate: [{\n            type: Input\n        }], size: [{\n            type: Input\n        }], tplEllipsis: [{\n            type: ContentChild,\n            args: [NgbPaginationEllipsis, { static: false }]\n        }], tplFirst: [{\n            type: ContentChild,\n            args: [NgbPaginationFirst, { static: false }]\n        }], tplLast: [{\n            type: ContentChild,\n            args: [NgbPaginationLast, { static: false }]\n        }], tplNext: [{\n            type: ContentChild,\n            args: [NgbPaginationNext, { static: false }]\n        }], tplNumber: [{\n            type: ContentChild,\n            args: [NgbPaginationNumber, { static: false }]\n        }], tplPrevious: [{\n            type: ContentChild,\n            args: [NgbPaginationPrevious, { static: false }]\n        }], tplPages: [{\n            type: ContentChild,\n            args: [NgbPaginationPages, { static: false }]\n        }], collectionSize: [{\n            type: Input\n        }] }); })();\n\nconst DIRECTIVES = [\n    NgbPagination, NgbPaginationEllipsis, NgbPaginationFirst, NgbPaginationLast, NgbPaginationNext, NgbPaginationNumber,\n    NgbPaginationPrevious, NgbPaginationPages\n];\nclass NgbPaginationModule {\n}\nNgbPaginationModule.ɵfac = function NgbPaginationModule_Factory(t) { return new (t || NgbPaginationModule)(); };\nNgbPaginationModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbPaginationModule });\nNgbPaginationModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [[CommonModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPaginationModule, [{\n        type: NgModule,\n        args: [{ declarations: DIRECTIVES, exports: DIRECTIVES, imports: [CommonModule] }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbPaginationModule, { declarations: function () { return [NgbPagination, NgbPaginationEllipsis, NgbPaginationFirst, NgbPaginationLast, NgbPaginationNext, NgbPaginationNumber, NgbPaginationPrevious, NgbPaginationPages]; }, imports: function () { return [CommonModule]; }, exports: function () { return [NgbPagination, NgbPaginationEllipsis, NgbPaginationFirst, NgbPaginationLast, NgbPaginationNext, NgbPaginationNumber, NgbPaginationPrevious, NgbPaginationPages]; } }); })();\n\nclass Trigger {\n    constructor(open, close) {\n        this.open = open;\n        this.close = close;\n        if (!close) {\n            this.close = open;\n        }\n    }\n    isManual() { return this.open === 'manual' || this.close === 'manual'; }\n}\nconst DEFAULT_ALIASES = {\n    'hover': ['mouseenter', 'mouseleave'],\n    'focus': ['focusin', 'focusout'],\n};\nfunction parseTriggers(triggers, aliases = DEFAULT_ALIASES) {\n    const trimmedTriggers = (triggers || '').trim();\n    if (trimmedTriggers.length === 0) {\n        return [];\n    }\n    const parsedTriggers = trimmedTriggers.split(/\\s+/).map(trigger => trigger.split(':')).map((triggerPair) => {\n        let alias = aliases[triggerPair[0]] || triggerPair;\n        return new Trigger(alias[0], alias[1]);\n    });\n    const manualTriggers = parsedTriggers.filter(triggerPair => triggerPair.isManual());\n    if (manualTriggers.length > 1) {\n        throw 'Triggers parse error: only one manual trigger is allowed';\n    }\n    if (manualTriggers.length === 1 && parsedTriggers.length > 1) {\n        throw 'Triggers parse error: manual trigger can\\'t be mixed with other triggers';\n    }\n    return parsedTriggers;\n}\nfunction observeTriggers(renderer, nativeElement, triggers, isOpenedFn) {\n    return new Observable(subscriber => {\n        const listeners = [];\n        const openFn = () => subscriber.next(true);\n        const closeFn = () => subscriber.next(false);\n        const toggleFn = () => subscriber.next(!isOpenedFn());\n        triggers.forEach((trigger) => {\n            if (trigger.open === trigger.close) {\n                listeners.push(renderer.listen(nativeElement, trigger.open, toggleFn));\n            }\n            else {\n                listeners.push(renderer.listen(nativeElement, trigger.open, openFn), renderer.listen(nativeElement, trigger.close, closeFn));\n            }\n        });\n        return () => { listeners.forEach(unsubscribeFn => unsubscribeFn()); };\n    });\n}\nconst delayOrNoop = (time) => time > 0 ? delay(time) : (a) => a;\nconst ɵ0 = delayOrNoop;\nfunction triggerDelay(openDelay, closeDelay, isOpenedFn) {\n    return (input$) => {\n        let pending = null;\n        const filteredInput$ = input$.pipe(map(open => ({ open })), filter(event => {\n            const currentlyOpen = isOpenedFn();\n            if (currentlyOpen !== event.open && (!pending || pending.open === currentlyOpen)) {\n                pending = event;\n                return true;\n            }\n            if (pending && pending.open !== event.open) {\n                pending = null;\n            }\n            return false;\n        }), share());\n        const delayedOpen$ = filteredInput$.pipe(filter(event => event.open), delayOrNoop(openDelay));\n        const delayedClose$ = filteredInput$.pipe(filter(event => !event.open), delayOrNoop(closeDelay));\n        return merge(delayedOpen$, delayedClose$)\n            .pipe(filter(event => {\n            if (event === pending) {\n                pending = null;\n                return event.open !== isOpenedFn();\n            }\n            return false;\n        }), map(event => event.open));\n    };\n}\nfunction listenToTriggers(renderer, nativeElement, triggers, isOpenedFn, openFn, closeFn, openDelay = 0, closeDelay = 0) {\n    const parsedTriggers = parseTriggers(triggers);\n    if (parsedTriggers.length === 1 && parsedTriggers[0].isManual()) {\n        return () => { };\n    }\n    const subscription = observeTriggers(renderer, nativeElement, parsedTriggers, isOpenedFn)\n        .pipe(triggerDelay(openDelay, closeDelay, isOpenedFn))\n        .subscribe(open => (open ? openFn() : closeFn()));\n    return () => subscription.unsubscribe();\n}\n\n/**\n * A configuration service for the [`NgbPopover`](#/components/popover/api#NgbPopover) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the popovers used in the application.\n */\nclass NgbPopoverConfig {\n    constructor(_ngbConfig) {\n        this._ngbConfig = _ngbConfig;\n        this.autoClose = true;\n        this.placement = 'auto';\n        this.triggers = 'click';\n        this.disablePopover = false;\n        this.openDelay = 0;\n        this.closeDelay = 0;\n    }\n    get animation() { return (this._animation === undefined) ? this._ngbConfig.animation : this._animation; }\n    set animation(animation) { this._animation = animation; }\n}\nNgbPopoverConfig.ɵfac = function NgbPopoverConfig_Factory(t) { return new (t || NgbPopoverConfig)(ɵngcc0.ɵɵinject(NgbConfig)); };\nNgbPopoverConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbPopoverConfig_Factory() { return new NgbPopoverConfig(i0.ɵɵinject(NgbConfig)); }, token: NgbPopoverConfig, providedIn: \"root\" });\nNgbPopoverConfig.ctorParameters = () => [\n    { type: NgbConfig }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPopoverConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return [{ type: NgbConfig }]; }, null); })();\n\nlet nextId$1 = 0;\nclass NgbPopoverWindow {\n    isTitleTemplate() { return this.title instanceof TemplateRef; }\n}\nNgbPopoverWindow.ɵfac = function NgbPopoverWindow_Factory(t) { return new (t || NgbPopoverWindow)(); };\nNgbPopoverWindow.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbPopoverWindow, selectors: [[\"ngb-popover-window\"]], hostAttrs: [\"role\", \"tooltip\"], hostVars: 5, hostBindings: function NgbPopoverWindow_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵhostProperty(\"id\", ctx.id);\n        ɵngcc0.ɵɵclassMap(\"popover\" + (ctx.popoverClass ? \" \" + ctx.popoverClass : \"\"));\n        ɵngcc0.ɵɵclassProp(\"fade\", ctx.animation);\n    } }, inputs: { animation: \"animation\", title: \"title\", id: \"id\", popoverClass: \"popoverClass\", context: \"context\" }, ngContentSelectors: _c3, decls: 4, vars: 1, consts: [[1, \"arrow\"], [\"class\", \"popover-header\", 4, \"ngIf\"], [1, \"popover-body\"], [1, \"popover-header\"], [\"simpleTitle\", \"\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"]], template: function NgbPopoverWindow_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵprojectionDef();\n        ɵngcc0.ɵɵelement(0, \"div\", 0);\n        ɵngcc0.ɵɵtemplate(1, NgbPopoverWindow_h3_1_Template, 4, 2, \"h3\", 1);\n        ɵngcc0.ɵɵelementStart(2, \"div\", 2);\n        ɵngcc0.ɵɵprojection(3);\n        ɵngcc0.ɵɵelementEnd();\n    } if (rf & 2) {\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.title);\n    } }, directives: [ɵngcc1.NgIf, ɵngcc1.NgTemplateOutlet], styles: [\"ngb-popover-window.bs-popover-bottom>.arrow,ngb-popover-window.bs-popover-top>.arrow{left:50%;margin-left:-.5rem}ngb-popover-window.bs-popover-bottom-left>.arrow,ngb-popover-window.bs-popover-top-left>.arrow{left:2em}ngb-popover-window.bs-popover-bottom-right>.arrow,ngb-popover-window.bs-popover-top-right>.arrow{left:auto;right:2em}ngb-popover-window.bs-popover-left>.arrow,ngb-popover-window.bs-popover-right>.arrow{top:50%;margin-top:-.5rem}ngb-popover-window.bs-popover-left-top>.arrow,ngb-popover-window.bs-popover-right-top>.arrow{top:.7em}ngb-popover-window.bs-popover-left-bottom>.arrow,ngb-popover-window.bs-popover-right-bottom>.arrow{top:auto;bottom:.7em}\"], encapsulation: 2, changeDetection: 0 });\nNgbPopoverWindow.propDecorators = {\n    animation: [{ type: Input }],\n    title: [{ type: Input }],\n    id: [{ type: Input }],\n    popoverClass: [{ type: Input }],\n    context: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPopoverWindow, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-popover-window',\n                changeDetection: ChangeDetectionStrategy.OnPush,\n                encapsulation: ViewEncapsulation.None,\n                host: {\n                    '[class]': '\"popover\" + (popoverClass ? \" \" + popoverClass : \"\")',\n                    '[class.fade]': 'animation',\n                    'role': 'tooltip',\n                    '[id]': 'id'\n                },\n                template: `\n    <div class=\"arrow\"></div>\n    <h3 class=\"popover-header\" *ngIf=\"title\">\n      <ng-template #simpleTitle>{{title}}</ng-template>\n      <ng-template [ngTemplateOutlet]=\"isTitleTemplate() ? $any(title) : simpleTitle\" [ngTemplateOutletContext]=\"context\"></ng-template>\n    </h3>\n    <div class=\"popover-body\"><ng-content></ng-content></div>`,\n                styles: [\"ngb-popover-window.bs-popover-bottom>.arrow,ngb-popover-window.bs-popover-top>.arrow{left:50%;margin-left:-.5rem}ngb-popover-window.bs-popover-bottom-left>.arrow,ngb-popover-window.bs-popover-top-left>.arrow{left:2em}ngb-popover-window.bs-popover-bottom-right>.arrow,ngb-popover-window.bs-popover-top-right>.arrow{left:auto;right:2em}ngb-popover-window.bs-popover-left>.arrow,ngb-popover-window.bs-popover-right>.arrow{top:50%;margin-top:-.5rem}ngb-popover-window.bs-popover-left-top>.arrow,ngb-popover-window.bs-popover-right-top>.arrow{top:.7em}ngb-popover-window.bs-popover-left-bottom>.arrow,ngb-popover-window.bs-popover-right-bottom>.arrow{top:auto;bottom:.7em}\"]\n            }]\n    }], null, { animation: [{\n            type: Input\n        }], title: [{\n            type: Input\n        }], id: [{\n            type: Input\n        }], popoverClass: [{\n            type: Input\n        }], context: [{\n            type: Input\n        }] }); })();\n/**\n * A lightweight and extensible directive for fancy popover creation.\n */\nclass NgbPopover {\n    constructor(_elementRef, _renderer, injector, componentFactoryResolver, viewContainerRef, config, _ngZone, _document, _changeDetector, applicationRef) {\n        this._elementRef = _elementRef;\n        this._renderer = _renderer;\n        this._ngZone = _ngZone;\n        this._document = _document;\n        this._changeDetector = _changeDetector;\n        /**\n         * An event emitted when the popover opening animation has finished. Contains no payload.\n         */\n        this.shown = new EventEmitter();\n        /**\n         * An event emitted when the popover closing animation has finished. Contains no payload.\n         *\n         * At this point popover is not in the DOM anymore.\n         */\n        this.hidden = new EventEmitter();\n        this._ngbPopoverWindowId = `ngb-popover-${nextId$1++}`;\n        this._windowRef = null;\n        this.animation = config.animation;\n        this.autoClose = config.autoClose;\n        this.placement = config.placement;\n        this.triggers = config.triggers;\n        this.container = config.container;\n        this.disablePopover = config.disablePopover;\n        this.popoverClass = config.popoverClass;\n        this.openDelay = config.openDelay;\n        this.closeDelay = config.closeDelay;\n        this._popupService = new PopupService(NgbPopoverWindow, injector, viewContainerRef, _renderer, this._ngZone, componentFactoryResolver, applicationRef);\n        this._zoneSubscription = _ngZone.onStable.subscribe(() => {\n            if (this._windowRef) {\n                positionElements(this._elementRef.nativeElement, this._windowRef.location.nativeElement, this.placement, this.container === 'body', 'bs-popover');\n            }\n        });\n    }\n    _isDisabled() {\n        if (this.disablePopover) {\n            return true;\n        }\n        if (!this.ngbPopover && !this.popoverTitle) {\n            return true;\n        }\n        return false;\n    }\n    /**\n     * Opens the popover.\n     *\n     * This is considered to be a \"manual\" triggering.\n     * The `context` is an optional value to be injected into the popover template when it is created.\n     */\n    open(context) {\n        if (!this._windowRef && !this._isDisabled()) {\n            // this type assertion is safe because otherwise _isDisabled would return true\n            const { windowRef, transition$ } = this._popupService.open(this.ngbPopover, context, this.animation);\n            this._windowRef = windowRef;\n            this._windowRef.instance.animation = this.animation;\n            this._windowRef.instance.title = this.popoverTitle;\n            this._windowRef.instance.context = context;\n            this._windowRef.instance.popoverClass = this.popoverClass;\n            this._windowRef.instance.id = this._ngbPopoverWindowId;\n            this._renderer.setAttribute(this._elementRef.nativeElement, 'aria-describedby', this._ngbPopoverWindowId);\n            if (this.container === 'body') {\n                this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement);\n            }\n            // We need to detect changes, because we don't know where .open() might be called from.\n            // Ex. opening popover from one of lifecycle hooks that run after the CD\n            // (say from ngAfterViewInit) will result in 'ExpressionHasChanged' exception\n            this._windowRef.changeDetectorRef.detectChanges();\n            // We need to mark for check, because popover won't work inside the OnPush component.\n            // Ex. when we use expression like `{{ popover.isOpen() : 'opened' : 'closed' }}`\n            // inside the template of an OnPush component and we change the popover from\n            // open -> closed, the expression in question won't be updated unless we explicitly\n            // mark the parent component to be checked.\n            this._windowRef.changeDetectorRef.markForCheck();\n            ngbAutoClose(this._ngZone, this._document, this.autoClose, () => this.close(), this.hidden, [this._windowRef.location.nativeElement]);\n            transition$.subscribe(() => this.shown.emit());\n        }\n    }\n    /**\n     * Closes the popover.\n     *\n     * This is considered to be a \"manual\" triggering of the popover.\n     */\n    close() {\n        if (this._windowRef) {\n            this._renderer.removeAttribute(this._elementRef.nativeElement, 'aria-describedby');\n            this._popupService.close(this.animation).subscribe(() => {\n                this._windowRef = null;\n                this.hidden.emit();\n                this._changeDetector.markForCheck();\n            });\n        }\n    }\n    /**\n     * Toggles the popover.\n     *\n     * This is considered to be a \"manual\" triggering of the popover.\n     */\n    toggle() {\n        if (this._windowRef) {\n            this.close();\n        }\n        else {\n            this.open();\n        }\n    }\n    /**\n     * Returns `true`, if the popover is currently shown.\n     */\n    isOpen() { return this._windowRef != null; }\n    ngOnInit() {\n        this._unregisterListenersFn = listenToTriggers(this._renderer, this._elementRef.nativeElement, this.triggers, this.isOpen.bind(this), this.open.bind(this), this.close.bind(this), +this.openDelay, +this.closeDelay);\n    }\n    ngOnChanges({ ngbPopover, popoverTitle, disablePopover, popoverClass }) {\n        if (popoverClass && this.isOpen()) {\n            this._windowRef.instance.popoverClass = popoverClass.currentValue;\n        }\n        // close popover if title and content become empty, or disablePopover set to true\n        if ((ngbPopover || popoverTitle || disablePopover) && this._isDisabled()) {\n            this.close();\n        }\n    }\n    ngOnDestroy() {\n        this.close();\n        // This check is needed as it might happen that ngOnDestroy is called before ngOnInit\n        // under certain conditions, see: https://github.com/ng-bootstrap/ng-bootstrap/issues/2199\n        if (this._unregisterListenersFn) {\n            this._unregisterListenersFn();\n        }\n        this._zoneSubscription.unsubscribe();\n    }\n}\nNgbPopover.ɵfac = function NgbPopover_Factory(t) { return new (t || NgbPopover)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Injector), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ComponentFactoryResolver), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(NgbPopoverConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(DOCUMENT), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ApplicationRef)); };\nNgbPopover.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbPopover, selectors: [[\"\", \"ngbPopover\", \"\"]], inputs: { animation: \"animation\", autoClose: \"autoClose\", placement: \"placement\", triggers: \"triggers\", container: \"container\", disablePopover: \"disablePopover\", popoverClass: \"popoverClass\", openDelay: \"openDelay\", closeDelay: \"closeDelay\", ngbPopover: \"ngbPopover\", popoverTitle: \"popoverTitle\" }, outputs: { shown: \"shown\", hidden: \"hidden\" }, exportAs: [\"ngbPopover\"], features: [ɵngcc0.ɵɵNgOnChangesFeature] });\nNgbPopover.ctorParameters = () => [\n    { type: ElementRef },\n    { type: Renderer2 },\n    { type: Injector },\n    { type: ComponentFactoryResolver },\n    { type: ViewContainerRef },\n    { type: NgbPopoverConfig },\n    { type: NgZone },\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n    { type: ChangeDetectorRef },\n    { type: ApplicationRef }\n];\nNgbPopover.propDecorators = {\n    animation: [{ type: Input }],\n    autoClose: [{ type: Input }],\n    ngbPopover: [{ type: Input }],\n    popoverTitle: [{ type: Input }],\n    placement: [{ type: Input }],\n    triggers: [{ type: Input }],\n    container: [{ type: Input }],\n    disablePopover: [{ type: Input }],\n    popoverClass: [{ type: Input }],\n    openDelay: [{ type: Input }],\n    closeDelay: [{ type: Input }],\n    shown: [{ type: Output }],\n    hidden: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPopover, [{\n        type: Directive,\n        args: [{ selector: '[ngbPopover]', exportAs: 'ngbPopover' }]\n    }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.Injector }, { type: ɵngcc0.ComponentFactoryResolver }, { type: ɵngcc0.ViewContainerRef }, { type: NgbPopoverConfig }, { type: ɵngcc0.NgZone }, { type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }, { type: ɵngcc0.ChangeDetectorRef }, { type: ɵngcc0.ApplicationRef }]; }, { shown: [{\n            type: Output\n        }], hidden: [{\n            type: Output\n        }], animation: [{\n            type: Input\n        }], autoClose: [{\n            type: Input\n        }], placement: [{\n            type: Input\n        }], triggers: [{\n            type: Input\n        }], container: [{\n            type: Input\n        }], disablePopover: [{\n            type: Input\n        }], popoverClass: [{\n            type: Input\n        }], openDelay: [{\n            type: Input\n        }], closeDelay: [{\n            type: Input\n        }], ngbPopover: [{\n            type: Input\n        }], popoverTitle: [{\n            type: Input\n        }] }); })();\n\nclass NgbPopoverModule {\n}\nNgbPopoverModule.ɵfac = function NgbPopoverModule_Factory(t) { return new (t || NgbPopoverModule)(); };\nNgbPopoverModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbPopoverModule });\nNgbPopoverModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [[CommonModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbPopoverModule, [{\n        type: NgModule,\n        args: [{\n                declarations: [NgbPopover, NgbPopoverWindow],\n                exports: [NgbPopover],\n                imports: [CommonModule],\n                entryComponents: [NgbPopoverWindow]\n            }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbPopoverModule, { declarations: function () { return [NgbPopover, NgbPopoverWindow]; }, imports: function () { return [CommonModule]; }, exports: function () { return [NgbPopover]; } }); })();\n\n/**\n * A configuration service for the [`NgbProgressbar`](#/components/progressbar/api#NgbProgressbar) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the progress bars used in the application.\n */\nclass NgbProgressbarConfig {\n    constructor() {\n        this.max = 100;\n        this.animated = false;\n        this.striped = false;\n        this.showValue = false;\n    }\n}\nNgbProgressbarConfig.ɵfac = function NgbProgressbarConfig_Factory(t) { return new (t || NgbProgressbarConfig)(); };\nNgbProgressbarConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbProgressbarConfig_Factory() { return new NgbProgressbarConfig(); }, token: NgbProgressbarConfig, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbProgressbarConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return []; }, null); })();\n\n/**\n * A directive that provides feedback on the progress of a workflow or an action.\n */\nclass NgbProgressbar {\n    constructor(config) {\n        /**\n         * The current value for the progress bar.\n         *\n         * Should be in the `[0, max]` range.\n         */\n        this.value = 0;\n        this.max = config.max;\n        this.animated = config.animated;\n        this.striped = config.striped;\n        this.textType = config.textType;\n        this.type = config.type;\n        this.showValue = config.showValue;\n        this.height = config.height;\n    }\n    /**\n     * The maximal value to be displayed in the progress bar.\n     *\n     * Should be a positive number. Will default to 100 otherwise.\n     */\n    set max(max) {\n        this._max = !isNumber(max) || max <= 0 ? 100 : max;\n    }\n    get max() { return this._max; }\n    getValue() { return getValueInRange(this.value, this.max); }\n    getPercentValue() { return 100 * this.getValue() / this.max; }\n}\nNgbProgressbar.ɵfac = function NgbProgressbar_Factory(t) { return new (t || NgbProgressbar)(ɵngcc0.ɵɵdirectiveInject(NgbProgressbarConfig)); };\nNgbProgressbar.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbProgressbar, selectors: [[\"ngb-progressbar\"]], hostAttrs: [1, \"progress\"], hostVars: 2, hostBindings: function NgbProgressbar_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵstyleProp(\"height\", ctx.height);\n    } }, inputs: { value: \"value\", max: \"max\", animated: \"animated\", striped: \"striped\", textType: \"textType\", type: \"type\", showValue: \"showValue\", height: \"height\" }, ngContentSelectors: _c3, decls: 3, vars: 11, consts: function () { let i18n_55; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_progressbar_value$$FESM2015_NG_BOOTSTRAP_JS__56 = goog.getMsg(\"{$interpolation}\", { \"interpolation\": \"\\uFFFD0\\uFFFD\" });\n        i18n_55 = MSG_EXTERNAL_ngb_progressbar_value$$FESM2015_NG_BOOTSTRAP_JS__56;\n    }\n    else {\n        i18n_55 = $localize `:@@ngb.progressbar.value␟f8e9a947b9db4252c0e9905765338712f2fd032f␟3720830768741091151:${\"\\uFFFD0\\uFFFD\"}:INTERPOLATION:`;\n    } return [[\"role\", \"progressbar\", \"aria-valuemin\", \"0\"], [4, \"ngIf\"], i18n_55]; }, template: function NgbProgressbar_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵprojectionDef();\n        ɵngcc0.ɵɵelementStart(0, \"div\", 0);\n        ɵngcc0.ɵɵtemplate(1, NgbProgressbar_span_1_Template, 3, 3, \"span\", 1);\n        ɵngcc0.ɵɵprojection(2);\n        ɵngcc0.ɵɵelementEnd();\n    } if (rf & 2) {\n        ɵngcc0.ɵɵclassMapInterpolate4(\"progress-bar\", ctx.type ? \" bg-\" + ctx.type : \"\", \"\", ctx.textType ? \" text-\" + ctx.textType : \"\", \"\\n    \", ctx.animated ? \" progress-bar-animated\" : \"\", \"\", ctx.striped ? \" progress-bar-striped\" : \"\", \"\");\n        ɵngcc0.ɵɵstyleProp(\"width\", ctx.getPercentValue(), \"%\");\n        ɵngcc0.ɵɵattribute(\"aria-valuenow\", ctx.getValue())(\"aria-valuemax\", ctx.max);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.showValue);\n    } }, directives: [ɵngcc1.NgIf], pipes: [ɵngcc1.PercentPipe], encapsulation: 2, changeDetection: 0 });\nNgbProgressbar.ctorParameters = () => [\n    { type: NgbProgressbarConfig }\n];\nNgbProgressbar.propDecorators = {\n    max: [{ type: Input }],\n    animated: [{ type: Input }],\n    striped: [{ type: Input }],\n    showValue: [{ type: Input }],\n    textType: [{ type: Input }],\n    type: [{ type: Input }],\n    value: [{ type: Input }],\n    height: [{ type: Input }, { type: HostBinding, args: ['style.height',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbProgressbar, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-progressbar',\n                changeDetection: ChangeDetectionStrategy.OnPush,\n                encapsulation: ViewEncapsulation.None,\n                host: { class: 'progress' },\n                template: `\n    <div class=\"progress-bar{{type ? ' bg-' + type : ''}}{{textType ? ' text-' + textType : ''}}\n    {{animated ? ' progress-bar-animated' : ''}}{{striped ? ' progress-bar-striped' : ''}}\"\n    role=\"progressbar\" [style.width.%]=\"getPercentValue()\"\n    [attr.aria-valuenow]=\"getValue()\" aria-valuemin=\"0\" [attr.aria-valuemax]=\"max\">\n      <span *ngIf=\"showValue\" i18n=\"@@ngb.progressbar.value\">{{getValue() / max | percent}}</span><ng-content></ng-content>\n    </div>\n  `\n            }]\n    }], function () { return [{ type: NgbProgressbarConfig }]; }, { value: [{\n            type: Input\n        }], max: [{\n            type: Input\n        }], animated: [{\n            type: Input\n        }], striped: [{\n            type: Input\n        }], textType: [{\n            type: Input\n        }], type: [{\n            type: Input\n        }], showValue: [{\n            type: Input\n        }], height: [{\n            type: Input\n        }, {\n            type: HostBinding,\n            args: ['style.height']\n        }] }); })();\n\nclass NgbProgressbarModule {\n}\nNgbProgressbarModule.ɵfac = function NgbProgressbarModule_Factory(t) { return new (t || NgbProgressbarModule)(); };\nNgbProgressbarModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbProgressbarModule });\nNgbProgressbarModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [[CommonModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbProgressbarModule, [{\n        type: NgModule,\n        args: [{ declarations: [NgbProgressbar], exports: [NgbProgressbar], imports: [CommonModule] }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbProgressbarModule, { declarations: function () { return [NgbProgressbar]; }, imports: function () { return [CommonModule]; }, exports: function () { return [NgbProgressbar]; } }); })();\n\n/**\n * A configuration service for the [`NgbRating`](#/components/rating/api#NgbRating) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the ratings used in the application.\n */\nclass NgbRatingConfig {\n    constructor() {\n        this.max = 10;\n        this.readonly = false;\n        this.resettable = false;\n    }\n}\nNgbRatingConfig.ɵfac = function NgbRatingConfig_Factory(t) { return new (t || NgbRatingConfig)(); };\nNgbRatingConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbRatingConfig_Factory() { return new NgbRatingConfig(); }, token: NgbRatingConfig, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbRatingConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return []; }, null); })();\n\n/**\n * A directive that helps visualising and interacting with a star rating bar.\n */\nclass NgbRating {\n    constructor(config, _changeDetectorRef) {\n        this._changeDetectorRef = _changeDetectorRef;\n        this.contexts = [];\n        this.disabled = false;\n        /**\n         * An event emitted when the user is hovering over a given rating.\n         *\n         * Event payload equals to the rating being hovered over.\n         */\n        this.hover = new EventEmitter();\n        /**\n         * An event emitted when the user stops hovering over a given rating.\n         *\n         * Event payload equals to the rating of the last item being hovered over.\n         */\n        this.leave = new EventEmitter();\n        /**\n         * An event emitted when the user selects a new rating.\n         *\n         * Event payload equals to the newly selected rating.\n         */\n        this.rateChange = new EventEmitter(true);\n        this.onChange = (_) => { };\n        this.onTouched = () => { };\n        this.max = config.max;\n        this.readonly = config.readonly;\n    }\n    ariaValueText() { return `${this.nextRate} out of ${this.max}`; }\n    isInteractive() { return !this.readonly && !this.disabled; }\n    enter(value) {\n        if (this.isInteractive()) {\n            this._updateState(value);\n        }\n        this.hover.emit(value);\n    }\n    handleBlur() { this.onTouched(); }\n    handleClick(value) {\n        if (this.isInteractive()) {\n            this.update(this.resettable && this.rate === value ? 0 : value);\n        }\n    }\n    handleKeyDown(event) {\n        // tslint:disable-next-line:deprecation\n        switch (event.which) {\n            case Key.ArrowDown:\n            case Key.ArrowLeft:\n                this.update(this.rate - 1);\n                break;\n            case Key.ArrowUp:\n            case Key.ArrowRight:\n                this.update(this.rate + 1);\n                break;\n            case Key.Home:\n                this.update(0);\n                break;\n            case Key.End:\n                this.update(this.max);\n                break;\n            default:\n                return;\n        }\n        // note 'return' in default case\n        event.preventDefault();\n    }\n    ngOnChanges(changes) {\n        if (changes['rate']) {\n            this.update(this.rate);\n        }\n    }\n    ngOnInit() {\n        this.contexts = Array.from({ length: this.max }, (v, k) => ({ fill: 0, index: k }));\n        this._updateState(this.rate);\n    }\n    registerOnChange(fn) { this.onChange = fn; }\n    registerOnTouched(fn) { this.onTouched = fn; }\n    reset() {\n        this.leave.emit(this.nextRate);\n        this._updateState(this.rate);\n    }\n    setDisabledState(isDisabled) { this.disabled = isDisabled; }\n    update(value, internalChange = true) {\n        const newRate = getValueInRange(value, this.max, 0);\n        if (this.isInteractive() && this.rate !== newRate) {\n            this.rate = newRate;\n            this.rateChange.emit(this.rate);\n        }\n        if (internalChange) {\n            this.onChange(this.rate);\n            this.onTouched();\n        }\n        this._updateState(this.rate);\n    }\n    writeValue(value) {\n        this.update(value, false);\n        this._changeDetectorRef.markForCheck();\n    }\n    _updateState(nextValue) {\n        this.nextRate = nextValue;\n        this.contexts.forEach((context, index) => context.fill = Math.round(getValueInRange(nextValue - index, 1, 0) * 100));\n    }\n}\nNgbRating.ɵfac = function NgbRating_Factory(t) { return new (t || NgbRating)(ɵngcc0.ɵɵdirectiveInject(NgbRatingConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef)); };\nNgbRating.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbRating, selectors: [[\"ngb-rating\"]], contentQueries: function NgbRating_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n        ɵngcc0.ɵɵcontentQuery(dirIndex, TemplateRef, 5);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.starTemplateFromContent = _t.first);\n    } }, hostAttrs: [\"role\", \"slider\", \"aria-valuemin\", \"0\", 1, \"d-inline-flex\"], hostVars: 5, hostBindings: function NgbRating_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"blur\", function NgbRating_blur_HostBindingHandler() { return ctx.handleBlur(); })(\"keydown\", function NgbRating_keydown_HostBindingHandler($event) { return ctx.handleKeyDown($event); })(\"mouseleave\", function NgbRating_mouseleave_HostBindingHandler() { return ctx.reset(); });\n    } if (rf & 2) {\n        ɵngcc0.ɵɵhostProperty(\"tabindex\", ctx.disabled ? -1 : 0);\n        ɵngcc0.ɵɵattribute(\"aria-valuemax\", ctx.max)(\"aria-valuenow\", ctx.nextRate)(\"aria-valuetext\", ctx.ariaValueText())(\"aria-disabled\", ctx.readonly ? true : null);\n    } }, inputs: { max: \"max\", readonly: \"readonly\", rate: \"rate\", resettable: \"resettable\", starTemplate: \"starTemplate\" }, outputs: { hover: \"hover\", leave: \"leave\", rateChange: \"rateChange\" }, features: [ɵngcc0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbRating), multi: true }]), ɵngcc0.ɵɵNgOnChangesFeature], decls: 3, vars: 1, consts: [[\"t\", \"\"], [\"ngFor\", \"\", 3, \"ngForOf\"], [1, \"sr-only\"], [3, \"mouseenter\", \"click\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"]], template: function NgbRating_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵtemplate(0, NgbRating_ng_template_0_Template, 1, 1, \"ng-template\", null, 0, ɵngcc0.ɵɵtemplateRefExtractor);\n        ɵngcc0.ɵɵtemplate(2, NgbRating_ng_template_2_Template, 4, 5, \"ng-template\", 1);\n    } if (rf & 2) {\n        ɵngcc0.ɵɵadvance(2);\n        ɵngcc0.ɵɵproperty(\"ngForOf\", ctx.contexts);\n    } }, directives: [ɵngcc1.NgForOf, ɵngcc1.NgTemplateOutlet], encapsulation: 2, changeDetection: 0 });\nNgbRating.ctorParameters = () => [\n    { type: NgbRatingConfig },\n    { type: ChangeDetectorRef }\n];\nNgbRating.propDecorators = {\n    max: [{ type: Input }],\n    rate: [{ type: Input }],\n    readonly: [{ type: Input }],\n    resettable: [{ type: Input }],\n    starTemplate: [{ type: Input }],\n    starTemplateFromContent: [{ type: ContentChild, args: [TemplateRef, { static: false },] }],\n    hover: [{ type: Output }],\n    leave: [{ type: Output }],\n    rateChange: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbRating, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-rating',\n                changeDetection: ChangeDetectionStrategy.OnPush,\n                encapsulation: ViewEncapsulation.None,\n                host: {\n                    'class': 'd-inline-flex',\n                    '[tabindex]': 'disabled ? -1 : 0',\n                    'role': 'slider',\n                    'aria-valuemin': '0',\n                    '[attr.aria-valuemax]': 'max',\n                    '[attr.aria-valuenow]': 'nextRate',\n                    '[attr.aria-valuetext]': 'ariaValueText()',\n                    '[attr.aria-disabled]': 'readonly ? true : null',\n                    '(blur)': 'handleBlur()',\n                    '(keydown)': 'handleKeyDown($event)',\n                    '(mouseleave)': 'reset()'\n                },\n                template: `\n    <ng-template #t let-fill=\"fill\">{{ fill === 100 ? '&#9733;' : '&#9734;' }}</ng-template>\n    <ng-template ngFor [ngForOf]=\"contexts\" let-index=\"index\">\n      <span class=\"sr-only\">({{ index < nextRate ? '*' : ' ' }})</span>\n      <span (mouseenter)=\"enter(index + 1)\" (click)=\"handleClick(index + 1)\" [style.cursor]=\"isInteractive() ? 'pointer' : 'default'\">\n        <ng-template [ngTemplateOutlet]=\"starTemplate || starTemplateFromContent || t\" [ngTemplateOutletContext]=\"contexts[index]\">\n        </ng-template>\n      </span>\n    </ng-template>\n  `,\n                providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbRating), multi: true }]\n            }]\n    }], function () { return [{ type: NgbRatingConfig }, { type: ɵngcc0.ChangeDetectorRef }]; }, { hover: [{\n            type: Output\n        }], leave: [{\n            type: Output\n        }], rateChange: [{\n            type: Output\n        }], max: [{\n            type: Input\n        }], readonly: [{\n            type: Input\n        }], rate: [{\n            type: Input\n        }], resettable: [{\n            type: Input\n        }], starTemplate: [{\n            type: Input\n        }], starTemplateFromContent: [{\n            type: ContentChild,\n            args: [TemplateRef, { static: false }]\n        }] }); })();\n\nclass NgbRatingModule {\n}\nNgbRatingModule.ɵfac = function NgbRatingModule_Factory(t) { return new (t || NgbRatingModule)(); };\nNgbRatingModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbRatingModule });\nNgbRatingModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [[CommonModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbRatingModule, [{\n        type: NgModule,\n        args: [{ declarations: [NgbRating], exports: [NgbRating], imports: [CommonModule] }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbRatingModule, { declarations: function () { return [NgbRating]; }, imports: function () { return [CommonModule]; }, exports: function () { return [NgbRating]; } }); })();\n\nclass NgbTime {\n    constructor(hour, minute, second) {\n        this.hour = toInteger(hour);\n        this.minute = toInteger(minute);\n        this.second = toInteger(second);\n    }\n    changeHour(step = 1) { this.updateHour((isNaN(this.hour) ? 0 : this.hour) + step); }\n    updateHour(hour) {\n        if (isNumber(hour)) {\n            this.hour = (hour < 0 ? 24 + hour : hour) % 24;\n        }\n        else {\n            this.hour = NaN;\n        }\n    }\n    changeMinute(step = 1) { this.updateMinute((isNaN(this.minute) ? 0 : this.minute) + step); }\n    updateMinute(minute) {\n        if (isNumber(minute)) {\n            this.minute = minute % 60 < 0 ? 60 + minute % 60 : minute % 60;\n            this.changeHour(Math.floor(minute / 60));\n        }\n        else {\n            this.minute = NaN;\n        }\n    }\n    changeSecond(step = 1) { this.updateSecond((isNaN(this.second) ? 0 : this.second) + step); }\n    updateSecond(second) {\n        if (isNumber(second)) {\n            this.second = second < 0 ? 60 + second % 60 : second % 60;\n            this.changeMinute(Math.floor(second / 60));\n        }\n        else {\n            this.second = NaN;\n        }\n    }\n    isValid(checkSecs = true) {\n        return isNumber(this.hour) && isNumber(this.minute) && (checkSecs ? isNumber(this.second) : true);\n    }\n    toString() { return `${this.hour || 0}:${this.minute || 0}:${this.second || 0}`; }\n}\n\n/**\n * A configuration service for the [`NgbTimepicker`](#/components/timepicker/api#NgbTimepicker) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the timepickers used in the application.\n */\nclass NgbTimepickerConfig {\n    constructor() {\n        this.meridian = false;\n        this.spinners = true;\n        this.seconds = false;\n        this.hourStep = 1;\n        this.minuteStep = 1;\n        this.secondStep = 1;\n        this.disabled = false;\n        this.readonlyInputs = false;\n        this.size = 'medium';\n    }\n}\nNgbTimepickerConfig.ɵfac = function NgbTimepickerConfig_Factory(t) { return new (t || NgbTimepickerConfig)(); };\nNgbTimepickerConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbTimepickerConfig_Factory() { return new NgbTimepickerConfig(); }, token: NgbTimepickerConfig, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbTimepickerConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return []; }, null); })();\n\nfunction NGB_DATEPICKER_TIME_ADAPTER_FACTORY() {\n    return new NgbTimeStructAdapter();\n}\n/**\n * An abstract service that does the conversion between the internal timepicker `NgbTimeStruct` model and\n * any provided user time model `T`, ex. a string, a native date, etc.\n *\n * The adapter is used **only** for conversion when binding timepicker to a form control,\n * ex. `[(ngModel)]=\"userTimeModel\"`. Here `userTimeModel` can be of any type.\n *\n * The default timepicker implementation assumes we use `NgbTimeStruct` as a user model.\n *\n * See the [custom time adapter demo](#/components/timepicker/examples#adapter) for an example.\n *\n * @since 2.2.0\n */\nclass NgbTimeAdapter {\n}\nNgbTimeAdapter.ɵfac = function NgbTimeAdapter_Factory(t) { return new (t || NgbTimeAdapter)(); };\nNgbTimeAdapter.ɵprov = i0.ɵɵdefineInjectable({ factory: NGB_DATEPICKER_TIME_ADAPTER_FACTORY, token: NgbTimeAdapter, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbTimeAdapter, [{\n        type: Injectable,\n        args: [{ providedIn: 'root', useFactory: NGB_DATEPICKER_TIME_ADAPTER_FACTORY }]\n    }], null, null); })();\nclass NgbTimeStructAdapter extends NgbTimeAdapter {\n    /**\n     * Converts a NgbTimeStruct value into NgbTimeStruct value\n     */\n    fromModel(time) {\n        return (time && isInteger(time.hour) && isInteger(time.minute)) ?\n            { hour: time.hour, minute: time.minute, second: isInteger(time.second) ? time.second : null } :\n            null;\n    }\n    /**\n     * Converts a NgbTimeStruct value into NgbTimeStruct value\n     */\n    toModel(time) {\n        return (time && isInteger(time.hour) && isInteger(time.minute)) ?\n            { hour: time.hour, minute: time.minute, second: isInteger(time.second) ? time.second : null } :\n            null;\n    }\n}\nNgbTimeStructAdapter.ɵfac = /*@__PURE__*/ function () { let ɵNgbTimeStructAdapter_BaseFactory; return function NgbTimeStructAdapter_Factory(t) { return (ɵNgbTimeStructAdapter_BaseFactory || (ɵNgbTimeStructAdapter_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(NgbTimeStructAdapter)))(t || NgbTimeStructAdapter); }; }();\nNgbTimeStructAdapter.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbTimeStructAdapter, factory: NgbTimeStructAdapter.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbTimeStructAdapter, [{\n        type: Injectable\n    }], null, null); })();\n\nfunction NGB_TIMEPICKER_I18N_FACTORY(locale) {\n    return new NgbTimepickerI18nDefault(locale);\n}\n/**\n * Type of the service supplying day periods (for example, 'AM' and 'PM') to NgbTimepicker component.\n * The default implementation of this service honors the Angular locale, and uses the registered locale data,\n * as explained in the Angular i18n guide.\n */\nclass NgbTimepickerI18n {\n}\nNgbTimepickerI18n.ɵfac = function NgbTimepickerI18n_Factory(t) { return new (t || NgbTimepickerI18n)(); };\nNgbTimepickerI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbTimepickerI18n_Factory() { return NGB_TIMEPICKER_I18N_FACTORY(i0.ɵɵinject(i0.LOCALE_ID)); }, token: NgbTimepickerI18n, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbTimepickerI18n, [{\n        type: Injectable,\n        args: [{ providedIn: 'root', useFactory: NGB_TIMEPICKER_I18N_FACTORY, deps: [LOCALE_ID] }]\n    }], null, null); })();\nclass NgbTimepickerI18nDefault extends NgbTimepickerI18n {\n    constructor(locale) {\n        super();\n        this._periods = getLocaleDayPeriods(locale, FormStyle.Standalone, TranslationWidth.Narrow);\n    }\n    getMorningPeriod() { return this._periods[0]; }\n    getAfternoonPeriod() { return this._periods[1]; }\n}\nNgbTimepickerI18nDefault.ɵfac = function NgbTimepickerI18nDefault_Factory(t) { return new (t || NgbTimepickerI18nDefault)(ɵngcc0.ɵɵinject(LOCALE_ID)); };\nNgbTimepickerI18nDefault.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NgbTimepickerI18nDefault, factory: NgbTimepickerI18nDefault.ɵfac });\nNgbTimepickerI18nDefault.ctorParameters = () => [\n    { type: String, decorators: [{ type: Inject, args: [LOCALE_ID,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbTimepickerI18nDefault, [{\n        type: Injectable\n    }], function () { return [{ type: String, decorators: [{\n                type: Inject,\n                args: [LOCALE_ID]\n            }] }]; }, null); })();\n\nconst FILTER_REGEX = /[^0-9]/g;\n/**\n * A directive that helps with wth picking hours, minutes and seconds.\n */\nclass NgbTimepicker {\n    constructor(_config, _ngbTimeAdapter, _cd, i18n) {\n        this._config = _config;\n        this._ngbTimeAdapter = _ngbTimeAdapter;\n        this._cd = _cd;\n        this.i18n = i18n;\n        this.onChange = (_) => { };\n        this.onTouched = () => { };\n        this.meridian = _config.meridian;\n        this.spinners = _config.spinners;\n        this.seconds = _config.seconds;\n        this.hourStep = _config.hourStep;\n        this.minuteStep = _config.minuteStep;\n        this.secondStep = _config.secondStep;\n        this.disabled = _config.disabled;\n        this.readonlyInputs = _config.readonlyInputs;\n        this.size = _config.size;\n    }\n    /**\n     * The number of hours to add/subtract when clicking hour spinners.\n     */\n    set hourStep(step) {\n        this._hourStep = isInteger(step) ? step : this._config.hourStep;\n    }\n    get hourStep() { return this._hourStep; }\n    /**\n     * The number of minutes to add/subtract when clicking minute spinners.\n     */\n    set minuteStep(step) {\n        this._minuteStep = isInteger(step) ? step : this._config.minuteStep;\n    }\n    get minuteStep() { return this._minuteStep; }\n    /**\n     * The number of seconds to add/subtract when clicking second spinners.\n     */\n    set secondStep(step) {\n        this._secondStep = isInteger(step) ? step : this._config.secondStep;\n    }\n    get secondStep() { return this._secondStep; }\n    writeValue(value) {\n        const structValue = this._ngbTimeAdapter.fromModel(value);\n        this.model = structValue ? new NgbTime(structValue.hour, structValue.minute, structValue.second) : new NgbTime();\n        if (!this.seconds && (!structValue || !isNumber(structValue.second))) {\n            this.model.second = 0;\n        }\n        this._cd.markForCheck();\n    }\n    registerOnChange(fn) { this.onChange = fn; }\n    registerOnTouched(fn) { this.onTouched = fn; }\n    setDisabledState(isDisabled) { this.disabled = isDisabled; }\n    changeHour(step) {\n        this.model.changeHour(step);\n        this.propagateModelChange();\n    }\n    changeMinute(step) {\n        this.model.changeMinute(step);\n        this.propagateModelChange();\n    }\n    changeSecond(step) {\n        this.model.changeSecond(step);\n        this.propagateModelChange();\n    }\n    updateHour(newVal) {\n        const isPM = this.model.hour >= 12;\n        const enteredHour = toInteger(newVal);\n        if (this.meridian && (isPM && enteredHour < 12 || !isPM && enteredHour === 12)) {\n            this.model.updateHour(enteredHour + 12);\n        }\n        else {\n            this.model.updateHour(enteredHour);\n        }\n        this.propagateModelChange();\n    }\n    updateMinute(newVal) {\n        this.model.updateMinute(toInteger(newVal));\n        this.propagateModelChange();\n    }\n    updateSecond(newVal) {\n        this.model.updateSecond(toInteger(newVal));\n        this.propagateModelChange();\n    }\n    toggleMeridian() {\n        if (this.meridian) {\n            this.changeHour(12);\n        }\n    }\n    formatInput(input) { input.value = input.value.replace(FILTER_REGEX, ''); }\n    formatHour(value) {\n        if (isNumber(value)) {\n            if (this.meridian) {\n                return padNumber(value % 12 === 0 ? 12 : value % 12);\n            }\n            else {\n                return padNumber(value % 24);\n            }\n        }\n        else {\n            return padNumber(NaN);\n        }\n    }\n    formatMinSec(value) { return padNumber(isNumber(value) ? value : NaN); }\n    handleBlur() { this.onTouched(); }\n    get isSmallSize() { return this.size === 'small'; }\n    get isLargeSize() { return this.size === 'large'; }\n    ngOnChanges(changes) {\n        if (changes['seconds'] && !this.seconds && this.model && !isNumber(this.model.second)) {\n            this.model.second = 0;\n            this.propagateModelChange(false);\n        }\n    }\n    propagateModelChange(touched = true) {\n        if (touched) {\n            this.onTouched();\n        }\n        if (this.model.isValid(this.seconds)) {\n            this.onChange(this._ngbTimeAdapter.toModel({ hour: this.model.hour, minute: this.model.minute, second: this.model.second }));\n        }\n        else {\n            this.onChange(this._ngbTimeAdapter.toModel(null));\n        }\n    }\n}\nNgbTimepicker.ɵfac = function NgbTimepicker_Factory(t) { return new (t || NgbTimepicker)(ɵngcc0.ɵɵdirectiveInject(NgbTimepickerConfig), ɵngcc0.ɵɵdirectiveInject(NgbTimeAdapter), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(NgbTimepickerI18n)); };\nNgbTimepicker.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbTimepicker, selectors: [[\"ngb-timepicker\"]], inputs: { meridian: \"meridian\", spinners: \"spinners\", seconds: \"seconds\", hourStep: \"hourStep\", minuteStep: \"minuteStep\", secondStep: \"secondStep\", readonlyInputs: \"readonlyInputs\", size: \"size\" }, features: [ɵngcc0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbTimepicker), multi: true }]), ɵngcc0.ɵɵNgOnChangesFeature], decls: 16, vars: 25, consts: function () { let i18n_57; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_timepicker_HH$$FESM2015_NG_BOOTSTRAP_JS_58 = goog.getMsg(\"HH\");\n        i18n_57 = MSG_EXTERNAL_ngb_timepicker_HH$$FESM2015_NG_BOOTSTRAP_JS_58;\n    }\n    else {\n        i18n_57 = $localize `:@@ngb.timepicker.HH␟ce676ab1d6d98f85c836381cf100a4a91ef95a1f␟4043638465245303811:HH`;\n    } let i18n_59; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_timepicker_hours$$FESM2015_NG_BOOTSTRAP_JS_60 = goog.getMsg(\"Hours\");\n        i18n_59 = MSG_EXTERNAL_ngb_timepicker_hours$$FESM2015_NG_BOOTSTRAP_JS_60;\n    }\n    else {\n        i18n_59 = $localize `:@@ngb.timepicker.hours␟3bbce5fef7e1151da052a4e529453edb340e3912␟8070396816726827304:Hours`;\n    } let i18n_61; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_timepicker_MM$$FESM2015_NG_BOOTSTRAP_JS_62 = goog.getMsg(\"MM\");\n        i18n_61 = MSG_EXTERNAL_ngb_timepicker_MM$$FESM2015_NG_BOOTSTRAP_JS_62;\n    }\n    else {\n        i18n_61 = $localize `:@@ngb.timepicker.MM␟72c8edf6a50068a05bde70991e36b1e881f4ca54␟1647282246509919852:MM`;\n    } let i18n_63; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_timepicker_minutes$$FESM2015_NG_BOOTSTRAP_JS_64 = goog.getMsg(\"Minutes\");\n        i18n_63 = MSG_EXTERNAL_ngb_timepicker_minutes$$FESM2015_NG_BOOTSTRAP_JS_64;\n    }\n    else {\n        i18n_63 = $localize `:@@ngb.timepicker.minutes␟41e62daa962947c0d23ded0981975d1bddf0bf38␟5531237363767747080:Minutes`;\n    } let i18n_65; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_timepicker_increment_hours$$FESM2015_NG_BOOTSTRAP_JS__66 = goog.getMsg(\"Increment hours\");\n        i18n_65 = MSG_EXTERNAL_ngb_timepicker_increment_hours$$FESM2015_NG_BOOTSTRAP_JS__66;\n    }\n    else {\n        i18n_65 = $localize `:@@ngb.timepicker.increment-hours␟cb74bc1d625a6c1742f0d7d47306cf495780c218␟5939278348542933629:Increment hours`;\n    } let i18n_67; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_timepicker_decrement_hours$$FESM2015_NG_BOOTSTRAP_JS__68 = goog.getMsg(\"Decrement hours\");\n        i18n_67 = MSG_EXTERNAL_ngb_timepicker_decrement_hours$$FESM2015_NG_BOOTSTRAP_JS__68;\n    }\n    else {\n        i18n_67 = $localize `:@@ngb.timepicker.decrement-hours␟147c7a19429da7d999e247d22e33fee370b1691b␟3651829882940481818:Decrement hours`;\n    } let i18n_69; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_timepicker_increment_minutes$$FESM2015_NG_BOOTSTRAP_JS__70 = goog.getMsg(\"Increment minutes\");\n        i18n_69 = MSG_EXTERNAL_ngb_timepicker_increment_minutes$$FESM2015_NG_BOOTSTRAP_JS__70;\n    }\n    else {\n        i18n_69 = $localize `:@@ngb.timepicker.increment-minutes␟f5a4a3bc05e053f6732475d0e74875ec01c3a348␟180147720391025024:Increment minutes`;\n    } let i18n_71; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_timepicker_decrement_minutes$$FESM2015_NG_BOOTSTRAP_JS__72 = goog.getMsg(\"Decrement minutes\");\n        i18n_71 = MSG_EXTERNAL_ngb_timepicker_decrement_minutes$$FESM2015_NG_BOOTSTRAP_JS__72;\n    }\n    else {\n        i18n_71 = $localize `:@@ngb.timepicker.decrement-minutes␟c1a6899e529c096da5b660385d4e77fe1f7ad271␟7447789825403243588:Decrement minutes`;\n    } let i18n_73; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_timepicker_SS$$FESM2015_NG_BOOTSTRAP_JS__74 = goog.getMsg(\"SS\");\n        i18n_73 = MSG_EXTERNAL_ngb_timepicker_SS$$FESM2015_NG_BOOTSTRAP_JS__74;\n    }\n    else {\n        i18n_73 = $localize `:@@ngb.timepicker.SS␟ebe38d36a40a2383c5fefa9b4608ffbda08bd4a3␟3628127143071124194:SS`;\n    } let i18n_75; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_timepicker_seconds$$FESM2015_NG_BOOTSTRAP_JS__76 = goog.getMsg(\"Seconds\");\n        i18n_75 = MSG_EXTERNAL_ngb_timepicker_seconds$$FESM2015_NG_BOOTSTRAP_JS__76;\n    }\n    else {\n        i18n_75 = $localize `:@@ngb.timepicker.seconds␟4f2ed9e71a7c981db3e50ae2fedb28aff2ec4e6c␟8874012390997067175:Seconds`;\n    } let i18n_77; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_timepicker_increment_seconds$$FESM2015_NG_BOOTSTRAP_JS___78 = goog.getMsg(\"Increment seconds\");\n        i18n_77 = MSG_EXTERNAL_ngb_timepicker_increment_seconds$$FESM2015_NG_BOOTSTRAP_JS___78;\n    }\n    else {\n        i18n_77 = $localize `:@@ngb.timepicker.increment-seconds␟912322ecee7d659d04dcf494a70e22e49d334b26␟5364772110539092174:Increment seconds`;\n    } let i18n_79; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_timepicker_decrement_seconds$$FESM2015_NG_BOOTSTRAP_JS___80 = goog.getMsg(\"Decrement seconds\");\n        i18n_79 = MSG_EXTERNAL_ngb_timepicker_decrement_seconds$$FESM2015_NG_BOOTSTRAP_JS___80;\n    }\n    else {\n        i18n_79 = $localize `:@@ngb.timepicker.decrement-seconds␟5db47ac104294243a70eb9124fbea9d0004ddf69␟753633511487974857:Decrement seconds`;\n    } let i18n_81; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_timepicker_PM$$FESM2015_NG_BOOTSTRAP_JS___82 = goog.getMsg(\"{$interpolation}\", { \"interpolation\": \"\\uFFFD0\\uFFFD\" });\n        i18n_81 = MSG_EXTERNAL_ngb_timepicker_PM$$FESM2015_NG_BOOTSTRAP_JS___82;\n    }\n    else {\n        i18n_81 = $localize `:@@ngb.timepicker.PM␟8d6e691e10306c1b34c6b26805151aaea320ef7f␟3564199131264287502:${\"\\uFFFD0\\uFFFD\"}:INTERPOLATION:`;\n    } let i18n_83; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_timepicker_AM$$FESM2015_NG_BOOTSTRAP_JS___84 = goog.getMsg(\"{$interpolation}\", { \"interpolation\": \"\\uFFFD0\\uFFFD\" });\n        i18n_83 = MSG_EXTERNAL_ngb_timepicker_AM$$FESM2015_NG_BOOTSTRAP_JS___84;\n    }\n    else {\n        i18n_83 = $localize `:@@ngb.timepicker.AM␟69a1f176a93998876952adac57c3bc3863b6105e␟4592818992509942761:${\"\\uFFFD0\\uFFFD\"}:INTERPOLATION:`;\n    } return [[3, \"disabled\"], [1, \"ngb-tp\"], [1, \"ngb-tp-input-container\", \"ngb-tp-hour\"], [\"tabindex\", \"-1\", \"type\", \"button\", \"class\", \"btn btn-link\", 3, \"btn-sm\", \"btn-lg\", \"disabled\", \"click\", 4, \"ngIf\"], [\"type\", \"text\", \"maxlength\", \"2\", \"inputmode\", \"numeric\", \"placeholder\", i18n_57, \"aria-label\", i18n_59, 1, \"ngb-tp-input\", \"form-control\", 3, \"value\", \"readOnly\", \"disabled\", \"change\", \"blur\", \"input\", \"keydown.ArrowUp\", \"keydown.ArrowDown\"], [1, \"ngb-tp-spacer\"], [1, \"ngb-tp-input-container\", \"ngb-tp-minute\"], [\"type\", \"text\", \"maxlength\", \"2\", \"inputmode\", \"numeric\", \"placeholder\", i18n_61, \"aria-label\", i18n_63, 1, \"ngb-tp-input\", \"form-control\", 3, \"value\", \"readOnly\", \"disabled\", \"change\", \"blur\", \"input\", \"keydown.ArrowUp\", \"keydown.ArrowDown\"], [\"class\", \"ngb-tp-spacer\", 4, \"ngIf\"], [\"class\", \"ngb-tp-input-container ngb-tp-second\", 4, \"ngIf\"], [\"class\", \"ngb-tp-meridian\", 4, \"ngIf\"], [\"tabindex\", \"-1\", \"type\", \"button\", 1, \"btn\", \"btn-link\", 3, \"disabled\", \"click\"], [1, \"chevron\", \"ngb-tp-chevron\"], [1, \"sr-only\"], i18n_65, [1, \"chevron\", \"ngb-tp-chevron\", \"bottom\"], i18n_67, i18n_69, i18n_71, [1, \"ngb-tp-input-container\", \"ngb-tp-second\"], [\"type\", \"text\", \"maxlength\", \"2\", \"inputmode\", \"numeric\", \"placeholder\", i18n_73, \"aria-label\", i18n_75, 1, \"ngb-tp-input\", \"form-control\", 3, \"value\", \"readOnly\", \"disabled\", \"change\", \"blur\", \"input\", \"keydown.ArrowUp\", \"keydown.ArrowDown\"], i18n_77, i18n_79, [1, \"ngb-tp-meridian\"], [\"type\", \"button\", 1, \"btn\", \"btn-outline-primary\", 3, \"disabled\", \"click\"], [4, \"ngIf\", \"ngIfElse\"], [\"am\", \"\"], i18n_81, i18n_83]; }, template: function NgbTimepicker_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵelementStart(0, \"fieldset\", 0);\n        ɵngcc0.ɵɵelementStart(1, \"div\", 1);\n        ɵngcc0.ɵɵelementStart(2, \"div\", 2);\n        ɵngcc0.ɵɵtemplate(3, NgbTimepicker_button_3_Template, 4, 7, \"button\", 3);\n        ɵngcc0.ɵɵelementStart(4, \"input\", 4);\n        ɵngcc0.ɵɵlistener(\"change\", function NgbTimepicker_Template_input_change_4_listener($event) { return ctx.updateHour($event.target.value); })(\"blur\", function NgbTimepicker_Template_input_blur_4_listener() { return ctx.handleBlur(); })(\"input\", function NgbTimepicker_Template_input_input_4_listener($event) { return ctx.formatInput($event.target); })(\"keydown.ArrowUp\", function NgbTimepicker_Template_input_keydown_ArrowUp_4_listener($event) { ctx.changeHour(ctx.hourStep); return $event.preventDefault(); })(\"keydown.ArrowDown\", function NgbTimepicker_Template_input_keydown_ArrowDown_4_listener($event) { ctx.changeHour(-ctx.hourStep); return $event.preventDefault(); });\n        ɵngcc0.ɵɵelementEnd();\n        ɵngcc0.ɵɵtemplate(5, NgbTimepicker_button_5_Template, 4, 7, \"button\", 3);\n        ɵngcc0.ɵɵelementEnd();\n        ɵngcc0.ɵɵelementStart(6, \"div\", 5);\n        ɵngcc0.ɵɵtext(7, \":\");\n        ɵngcc0.ɵɵelementEnd();\n        ɵngcc0.ɵɵelementStart(8, \"div\", 6);\n        ɵngcc0.ɵɵtemplate(9, NgbTimepicker_button_9_Template, 4, 7, \"button\", 3);\n        ɵngcc0.ɵɵelementStart(10, \"input\", 7);\n        ɵngcc0.ɵɵlistener(\"change\", function NgbTimepicker_Template_input_change_10_listener($event) { return ctx.updateMinute($event.target.value); })(\"blur\", function NgbTimepicker_Template_input_blur_10_listener() { return ctx.handleBlur(); })(\"input\", function NgbTimepicker_Template_input_input_10_listener($event) { return ctx.formatInput($event.target); })(\"keydown.ArrowUp\", function NgbTimepicker_Template_input_keydown_ArrowUp_10_listener($event) { ctx.changeMinute(ctx.minuteStep); return $event.preventDefault(); })(\"keydown.ArrowDown\", function NgbTimepicker_Template_input_keydown_ArrowDown_10_listener($event) { ctx.changeMinute(-ctx.minuteStep); return $event.preventDefault(); });\n        ɵngcc0.ɵɵelementEnd();\n        ɵngcc0.ɵɵtemplate(11, NgbTimepicker_button_11_Template, 4, 7, \"button\", 3);\n        ɵngcc0.ɵɵelementEnd();\n        ɵngcc0.ɵɵtemplate(12, NgbTimepicker_div_12_Template, 2, 0, \"div\", 8);\n        ɵngcc0.ɵɵtemplate(13, NgbTimepicker_div_13_Template, 4, 9, \"div\", 9);\n        ɵngcc0.ɵɵtemplate(14, NgbTimepicker_div_14_Template, 1, 0, \"div\", 8);\n        ɵngcc0.ɵɵtemplate(15, NgbTimepicker_div_15_Template, 5, 9, \"div\", 10);\n        ɵngcc0.ɵɵelementEnd();\n        ɵngcc0.ɵɵelementEnd();\n    } if (rf & 2) {\n        ɵngcc0.ɵɵclassProp(\"disabled\", ctx.disabled);\n        ɵngcc0.ɵɵproperty(\"disabled\", ctx.disabled);\n        ɵngcc0.ɵɵadvance(3);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.spinners);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵclassProp(\"form-control-sm\", ctx.isSmallSize)(\"form-control-lg\", ctx.isLargeSize);\n        ɵngcc0.ɵɵproperty(\"value\", ctx.formatHour(ctx.model == null ? null : ctx.model.hour))(\"readOnly\", ctx.readonlyInputs)(\"disabled\", ctx.disabled);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.spinners);\n        ɵngcc0.ɵɵadvance(4);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.spinners);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵclassProp(\"form-control-sm\", ctx.isSmallSize)(\"form-control-lg\", ctx.isLargeSize);\n        ɵngcc0.ɵɵproperty(\"value\", ctx.formatMinSec(ctx.model == null ? null : ctx.model.minute))(\"readOnly\", ctx.readonlyInputs)(\"disabled\", ctx.disabled);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.spinners);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.seconds);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.seconds);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.meridian);\n        ɵngcc0.ɵɵadvance(1);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.meridian);\n    } }, directives: [ɵngcc1.NgIf], styles: [\"ngb-timepicker{font-size:1rem}.ngb-tp{display:flex;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron:before{border-style:solid;border-width:.29em .29em 0 0;content:\\\"\\\";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-meridian,.ngb-tp-minute,.ngb-tp-second{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\"], encapsulation: 2 });\nNgbTimepicker.ctorParameters = () => [\n    { type: NgbTimepickerConfig },\n    { type: NgbTimeAdapter },\n    { type: ChangeDetectorRef },\n    { type: NgbTimepickerI18n }\n];\nNgbTimepicker.propDecorators = {\n    meridian: [{ type: Input }],\n    spinners: [{ type: Input }],\n    seconds: [{ type: Input }],\n    hourStep: [{ type: Input }],\n    minuteStep: [{ type: Input }],\n    secondStep: [{ type: Input }],\n    readonlyInputs: [{ type: Input }],\n    size: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbTimepicker, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-timepicker',\n                encapsulation: ViewEncapsulation.None,\n                template: `\n    <fieldset [disabled]=\"disabled\" [class.disabled]=\"disabled\">\n      <div class=\"ngb-tp\">\n        <div class=\"ngb-tp-input-container ngb-tp-hour\">\n          <button *ngIf=\"spinners\" tabindex=\"-1\" type=\"button\" (click)=\"changeHour(hourStep)\"\n            class=\"btn btn-link\" [class.btn-sm]=\"isSmallSize\" [class.btn-lg]=\"isLargeSize\" [class.disabled]=\"disabled\"\n            [disabled]=\"disabled\">\n            <span class=\"chevron ngb-tp-chevron\"></span>\n            <span class=\"sr-only\" i18n=\"@@ngb.timepicker.increment-hours\">Increment hours</span>\n          </button>\n          <input type=\"text\" class=\"ngb-tp-input form-control\" [class.form-control-sm]=\"isSmallSize\"\n            [class.form-control-lg]=\"isLargeSize\"\n            maxlength=\"2\" inputmode=\"numeric\" placeholder=\"HH\" i18n-placeholder=\"@@ngb.timepicker.HH\"\n            [value]=\"formatHour(model?.hour)\" (change)=\"updateHour($any($event).target.value)\"\n            [readOnly]=\"readonlyInputs\" [disabled]=\"disabled\" aria-label=\"Hours\" i18n-aria-label=\"@@ngb.timepicker.hours\"\n            (blur)=\"handleBlur()\"\n            (input)=\"formatInput($any($event).target)\"\n            (keydown.ArrowUp)=\"changeHour(hourStep); $event.preventDefault()\"\n            (keydown.ArrowDown)=\"changeHour(-hourStep); $event.preventDefault()\">\n          <button *ngIf=\"spinners\" tabindex=\"-1\" type=\"button\" (click)=\"changeHour(-hourStep)\"\n            class=\"btn btn-link\" [class.btn-sm]=\"isSmallSize\" [class.btn-lg]=\"isLargeSize\" [class.disabled]=\"disabled\"\n            [disabled]=\"disabled\">\n            <span class=\"chevron ngb-tp-chevron bottom\"></span>\n            <span class=\"sr-only\" i18n=\"@@ngb.timepicker.decrement-hours\">Decrement hours</span>\n          </button>\n        </div>\n        <div class=\"ngb-tp-spacer\">:</div>\n        <div class=\"ngb-tp-input-container ngb-tp-minute\">\n          <button *ngIf=\"spinners\" tabindex=\"-1\" type=\"button\" (click)=\"changeMinute(minuteStep)\"\n            class=\"btn btn-link\" [class.btn-sm]=\"isSmallSize\" [class.btn-lg]=\"isLargeSize\" [class.disabled]=\"disabled\"\n            [disabled]=\"disabled\">\n            <span class=\"chevron ngb-tp-chevron\"></span>\n            <span class=\"sr-only\" i18n=\"@@ngb.timepicker.increment-minutes\">Increment minutes</span>\n          </button>\n          <input type=\"text\" class=\"ngb-tp-input form-control\" [class.form-control-sm]=\"isSmallSize\" [class.form-control-lg]=\"isLargeSize\"\n            maxlength=\"2\" inputmode=\"numeric\" placeholder=\"MM\" i18n-placeholder=\"@@ngb.timepicker.MM\"\n            [value]=\"formatMinSec(model?.minute)\" (change)=\"updateMinute($any($event).target.value)\"\n            [readOnly]=\"readonlyInputs\" [disabled]=\"disabled\" aria-label=\"Minutes\" i18n-aria-label=\"@@ngb.timepicker.minutes\"\n            (blur)=\"handleBlur()\"\n            (input)=\"formatInput($any($event).target)\"\n            (keydown.ArrowUp)=\"changeMinute(minuteStep); $event.preventDefault()\"\n            (keydown.ArrowDown)=\"changeMinute(-minuteStep); $event.preventDefault()\">\n          <button *ngIf=\"spinners\" tabindex=\"-1\" type=\"button\" (click)=\"changeMinute(-minuteStep)\"\n            class=\"btn btn-link\" [class.btn-sm]=\"isSmallSize\" [class.btn-lg]=\"isLargeSize\"  [class.disabled]=\"disabled\"\n            [disabled]=\"disabled\">\n            <span class=\"chevron ngb-tp-chevron bottom\"></span>\n            <span class=\"sr-only\"  i18n=\"@@ngb.timepicker.decrement-minutes\">Decrement minutes</span>\n          </button>\n        </div>\n        <div *ngIf=\"seconds\" class=\"ngb-tp-spacer\">:</div>\n        <div *ngIf=\"seconds\" class=\"ngb-tp-input-container ngb-tp-second\">\n          <button *ngIf=\"spinners\" tabindex=\"-1\" type=\"button\" (click)=\"changeSecond(secondStep)\"\n            class=\"btn btn-link\" [class.btn-sm]=\"isSmallSize\" [class.btn-lg]=\"isLargeSize\" [class.disabled]=\"disabled\"\n            [disabled]=\"disabled\">\n            <span class=\"chevron ngb-tp-chevron\"></span>\n            <span class=\"sr-only\" i18n=\"@@ngb.timepicker.increment-seconds\">Increment seconds</span>\n          </button>\n          <input type=\"text\" class=\"ngb-tp-input form-control\" [class.form-control-sm]=\"isSmallSize\" [class.form-control-lg]=\"isLargeSize\"\n            maxlength=\"2\" inputmode=\"numeric\" placeholder=\"SS\" i18n-placeholder=\"@@ngb.timepicker.SS\"\n            [value]=\"formatMinSec(model?.second)\" (change)=\"updateSecond($any($event).target.value)\"\n            [readOnly]=\"readonlyInputs\" [disabled]=\"disabled\" aria-label=\"Seconds\" i18n-aria-label=\"@@ngb.timepicker.seconds\"\n            (blur)=\"handleBlur()\"\n            (input)=\"formatInput($any($event).target)\"\n            (keydown.ArrowUp)=\"changeSecond(secondStep); $event.preventDefault()\"\n            (keydown.ArrowDown)=\"changeSecond(-secondStep); $event.preventDefault()\">\n          <button *ngIf=\"spinners\" tabindex=\"-1\" type=\"button\" (click)=\"changeSecond(-secondStep)\"\n            class=\"btn btn-link\" [class.btn-sm]=\"isSmallSize\" [class.btn-lg]=\"isLargeSize\"  [class.disabled]=\"disabled\"\n            [disabled]=\"disabled\">\n            <span class=\"chevron ngb-tp-chevron bottom\"></span>\n            <span class=\"sr-only\" i18n=\"@@ngb.timepicker.decrement-seconds\">Decrement seconds</span>\n          </button>\n        </div>\n        <div *ngIf=\"meridian\" class=\"ngb-tp-spacer\"></div>\n        <div *ngIf=\"meridian\" class=\"ngb-tp-meridian\">\n          <button type=\"button\" class=\"btn btn-outline-primary\" [class.btn-sm]=\"isSmallSize\" [class.btn-lg]=\"isLargeSize\"\n            [disabled]=\"disabled\" [class.disabled]=\"disabled\"\n                  (click)=\"toggleMeridian()\">\n            <ng-container *ngIf=\"model && model.hour >= 12; else am\"\n                          i18n=\"@@ngb.timepicker.PM\">{{ i18n.getAfternoonPeriod() }}</ng-container>\n            <ng-template #am i18n=\"@@ngb.timepicker.AM\">{{ i18n.getMorningPeriod() }}</ng-template>\n          </button>\n        </div>\n      </div>\n    </fieldset>\n  `,\n                providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbTimepicker), multi: true }],\n                styles: [\"ngb-timepicker{font-size:1rem}.ngb-tp{display:flex;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron:before{border-style:solid;border-width:.29em .29em 0 0;content:\\\"\\\";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-meridian,.ngb-tp-minute,.ngb-tp-second{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\"]\n            }]\n    }], function () { return [{ type: NgbTimepickerConfig }, { type: NgbTimeAdapter }, { type: ɵngcc0.ChangeDetectorRef }, { type: NgbTimepickerI18n }]; }, { meridian: [{\n            type: Input\n        }], spinners: [{\n            type: Input\n        }], seconds: [{\n            type: Input\n        }], hourStep: [{\n            type: Input\n        }], minuteStep: [{\n            type: Input\n        }], secondStep: [{\n            type: Input\n        }], readonlyInputs: [{\n            type: Input\n        }], size: [{\n            type: Input\n        }] }); })();\n\nclass NgbTimepickerModule {\n}\nNgbTimepickerModule.ɵfac = function NgbTimepickerModule_Factory(t) { return new (t || NgbTimepickerModule)(); };\nNgbTimepickerModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbTimepickerModule });\nNgbTimepickerModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [[CommonModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbTimepickerModule, [{\n        type: NgModule,\n        args: [{ declarations: [NgbTimepicker], exports: [NgbTimepicker], imports: [CommonModule] }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbTimepickerModule, { declarations: function () { return [NgbTimepicker]; }, imports: function () { return [CommonModule]; }, exports: function () { return [NgbTimepicker]; } }); })();\n\n/**\n * Configuration service for the NgbToast component. You can inject this service, typically in your root component,\n * and customize the values of its properties in order to provide default values for all the toasts used in the\n * application.\n *\n * @since 5.0.0\n */\nclass NgbToastConfig {\n    constructor(_ngbConfig) {\n        this._ngbConfig = _ngbConfig;\n        this.autohide = true;\n        this.delay = 500;\n        this.ariaLive = 'polite';\n    }\n    get animation() { return (this._animation === undefined) ? this._ngbConfig.animation : this._animation; }\n    set animation(animation) { this._animation = animation; }\n}\nNgbToastConfig.ɵfac = function NgbToastConfig_Factory(t) { return new (t || NgbToastConfig)(ɵngcc0.ɵɵinject(NgbConfig)); };\nNgbToastConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbToastConfig_Factory() { return new NgbToastConfig(i0.ɵɵinject(NgbConfig)); }, token: NgbToastConfig, providedIn: \"root\" });\nNgbToastConfig.ctorParameters = () => [\n    { type: NgbConfig }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbToastConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return [{ type: NgbConfig }]; }, null); })();\n\nconst ngbToastFadeInTransition = (element, animation) => {\n    const { classList } = element;\n    if (!animation) {\n        classList.add('show');\n        return;\n    }\n    classList.remove('hide');\n    reflow(element);\n    classList.add('showing');\n    return () => {\n        classList.remove('showing');\n        classList.add('show');\n    };\n};\nconst ngbToastFadeOutTransition = ({ classList }) => {\n    classList.remove('show');\n    return () => { classList.add('hide'); };\n};\n\n/**\n * This directive allows the usage of HTML markup or other directives\n * inside of the toast's header.\n *\n * @since 5.0.0\n */\nclass NgbToastHeader {\n}\nNgbToastHeader.ɵfac = function NgbToastHeader_Factory(t) { return new (t || NgbToastHeader)(); };\nNgbToastHeader.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbToastHeader, selectors: [[\"\", \"ngbToastHeader\", \"\"]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbToastHeader, [{\n        type: Directive,\n        args: [{ selector: '[ngbToastHeader]' }]\n    }], null, null); })();\n/**\n * Toasts provide feedback messages as notifications to the user.\n * Goal is to mimic the push notifications available both on mobile and desktop operating systems.\n *\n * @since 5.0.0\n */\nclass NgbToast {\n    constructor(ariaLive, config, _zone, _element) {\n        this.ariaLive = ariaLive;\n        this._zone = _zone;\n        this._element = _element;\n        /**\n         * A template like `<ng-template ngbToastHeader></ng-template>` can be\n         * used in the projected content to allow markup usage.\n         */\n        this.contentHeaderTpl = null;\n        /**\n         * An event fired after the animation triggered by calling `.show()` method has finished.\n         *\n         * @since 8.0.0\n         */\n        this.shown = new EventEmitter();\n        /**\n         * An event fired after the animation triggered by calling `.hide()` method has finished.\n         *\n         * It can only occur in 2 different scenarios:\n         * - `autohide` timeout fires\n         * - user clicks on a closing cross\n         *\n         * Additionally this output is purely informative. The toast won't be removed from DOM automatically, it's up\n         * to the user to take care of that.\n         *\n         * @since 8.0.0\n         */\n        this.hidden = new EventEmitter();\n        if (this.ariaLive == null) {\n            this.ariaLive = config.ariaLive;\n        }\n        this.delay = config.delay;\n        this.autohide = config.autohide;\n        this.animation = config.animation;\n    }\n    ngAfterContentInit() {\n        this._zone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n            this._init();\n            this.show();\n        });\n    }\n    ngOnChanges(changes) {\n        if ('autohide' in changes) {\n            this._clearTimeout();\n            this._init();\n        }\n    }\n    /**\n     * Triggers toast closing programmatically.\n     *\n     * The returned observable will emit and be completed once the closing transition has finished.\n     * If the animations are turned off this happens synchronously.\n     *\n     * Alternatively you could listen or subscribe to the `(hidden)` output\n     *\n     * @since 8.0.0\n     */\n    hide() {\n        this._clearTimeout();\n        const transition = ngbRunTransition(this._zone, this._element.nativeElement, ngbToastFadeOutTransition, { animation: this.animation, runningTransition: 'stop' });\n        transition.subscribe(() => { this.hidden.emit(); });\n        return transition;\n    }\n    /**\n     * Triggers toast opening programmatically.\n     *\n     * The returned observable will emit and be completed once the opening transition has finished.\n     * If the animations are turned off this happens synchronously.\n     *\n     * Alternatively you could listen or subscribe to the `(shown)` output\n     *\n     * @since 8.0.0\n     */\n    show() {\n        const transition = ngbRunTransition(this._zone, this._element.nativeElement, ngbToastFadeInTransition, {\n            animation: this.animation,\n            runningTransition: 'continue',\n        });\n        transition.subscribe(() => { this.shown.emit(); });\n        return transition;\n    }\n    _init() {\n        if (this.autohide && !this._timeoutID) {\n            this._timeoutID = setTimeout(() => this.hide(), this.delay);\n        }\n    }\n    _clearTimeout() {\n        if (this._timeoutID) {\n            clearTimeout(this._timeoutID);\n            this._timeoutID = null;\n        }\n    }\n}\nNgbToast.ɵfac = function NgbToast_Factory(t) { return new (t || NgbToast)(ɵngcc0.ɵɵinjectAttribute('aria-live'), ɵngcc0.ɵɵdirectiveInject(NgbToastConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nNgbToast.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbToast, selectors: [[\"ngb-toast\"]], contentQueries: function NgbToast_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n        ɵngcc0.ɵɵcontentQuery(dirIndex, NgbToastHeader, 7, TemplateRef);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.contentHeaderTpl = _t.first);\n    } }, hostAttrs: [\"role\", \"alert\", \"aria-atomic\", \"true\", 1, \"toast\"], hostVars: 3, hostBindings: function NgbToast_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵattribute(\"aria-live\", ctx.ariaLive);\n        ɵngcc0.ɵɵclassProp(\"fade\", ctx.animation);\n    } }, inputs: { delay: \"delay\", autohide: \"autohide\", animation: \"animation\", header: \"header\" }, outputs: { shown: \"shown\", hidden: \"hidden\" }, exportAs: [\"ngbToast\"], features: [ɵngcc0.ɵɵNgOnChangesFeature], ngContentSelectors: _c3, decls: 5, vars: 1, consts: function () { let i18n_85; if (typeof ngI18nClosureMode !== \"undefined\" && ngI18nClosureMode) {\n        const MSG_EXTERNAL_ngb_toast_close_aria$$FESM2015_NG_BOOTSTRAP_JS__86 = goog.getMsg(\"Close\");\n        i18n_85 = MSG_EXTERNAL_ngb_toast_close_aria$$FESM2015_NG_BOOTSTRAP_JS__86;\n    }\n    else {\n        i18n_85 = $localize `:@@ngb.toast.close-aria␟f4e529ae5ffd73001d1ff4bbdeeb0a72e342e5c8␟7819314041543176992:Close`;\n    } return [[\"headerTpl\", \"\"], [3, \"ngIf\"], [1, \"toast-body\"], [1, \"mr-auto\"], [1, \"toast-header\"], [3, \"ngTemplateOutlet\"], [\"type\", \"button\", \"aria-label\", i18n_85, 1, \"close\", 3, \"click\"], [\"aria-hidden\", \"true\"]]; }, template: function NgbToast_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵprojectionDef();\n        ɵngcc0.ɵɵtemplate(0, NgbToast_ng_template_0_Template, 2, 1, \"ng-template\", null, 0, ɵngcc0.ɵɵtemplateRefExtractor);\n        ɵngcc0.ɵɵtemplate(2, NgbToast_ng_template_2_Template, 5, 1, \"ng-template\", 1);\n        ɵngcc0.ɵɵelementStart(3, \"div\", 2);\n        ɵngcc0.ɵɵprojection(4);\n        ɵngcc0.ɵɵelementEnd();\n    } if (rf & 2) {\n        ɵngcc0.ɵɵadvance(2);\n        ɵngcc0.ɵɵproperty(\"ngIf\", ctx.contentHeaderTpl || ctx.header);\n    } }, directives: [ɵngcc1.NgIf, ɵngcc1.NgTemplateOutlet], styles: [\".ngb-toasts{position:fixed;top:0;right:0;margin:.5em;z-index:1200}ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\"], encapsulation: 2 });\nNgbToast.ctorParameters = () => [\n    { type: String, decorators: [{ type: Attribute, args: ['aria-live',] }] },\n    { type: NgbToastConfig },\n    { type: NgZone },\n    { type: ElementRef }\n];\nNgbToast.propDecorators = {\n    animation: [{ type: Input }],\n    delay: [{ type: Input }],\n    autohide: [{ type: Input }],\n    header: [{ type: Input }],\n    contentHeaderTpl: [{ type: ContentChild, args: [NgbToastHeader, { read: TemplateRef, static: true },] }],\n    shown: [{ type: Output }],\n    hidden: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbToast, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-toast',\n                exportAs: 'ngbToast',\n                encapsulation: ViewEncapsulation.None,\n                host: {\n                    'role': 'alert',\n                    '[attr.aria-live]': 'ariaLive',\n                    'aria-atomic': 'true',\n                    'class': 'toast',\n                    '[class.fade]': 'animation'\n                },\n                template: `\n    <ng-template #headerTpl>\n      <strong class=\"mr-auto\">{{header}}</strong>\n    </ng-template>\n    <ng-template [ngIf]=\"contentHeaderTpl || header\">\n      <div class=\"toast-header\">\n        <ng-template [ngTemplateOutlet]=\"contentHeaderTpl || headerTpl\"></ng-template>\n        <button type=\"button\" class=\"close\" aria-label=\"Close\" i18n-aria-label=\"@@ngb.toast.close-aria\" (click)=\"hide()\">\n          <span aria-hidden=\"true\">&times;</span>\n        </button>\n      </div>\n    </ng-template>\n    <div class=\"toast-body\">\n      <ng-content></ng-content>\n    </div>\n  `,\n                styles: [\".ngb-toasts{position:fixed;top:0;right:0;margin:.5em;z-index:1200}ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\"]\n            }]\n    }], function () { return [{ type: String, decorators: [{\n                type: Attribute,\n                args: ['aria-live']\n            }] }, { type: NgbToastConfig }, { type: ɵngcc0.NgZone }, { type: ɵngcc0.ElementRef }]; }, { contentHeaderTpl: [{\n            type: ContentChild,\n            args: [NgbToastHeader, { read: TemplateRef, static: true }]\n        }], shown: [{\n            type: Output\n        }], hidden: [{\n            type: Output\n        }], delay: [{\n            type: Input\n        }], autohide: [{\n            type: Input\n        }], animation: [{\n            type: Input\n        }], header: [{\n            type: Input\n        }] }); })();\n\nclass NgbToastModule {\n}\nNgbToastModule.ɵfac = function NgbToastModule_Factory(t) { return new (t || NgbToastModule)(); };\nNgbToastModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbToastModule });\nNgbToastModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [[CommonModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbToastModule, [{\n        type: NgModule,\n        args: [{ declarations: [NgbToast, NgbToastHeader], imports: [CommonModule], exports: [NgbToast, NgbToastHeader] }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbToastModule, { declarations: function () { return [NgbToast, NgbToastHeader]; }, imports: function () { return [CommonModule]; }, exports: function () { return [NgbToast, NgbToastHeader]; } }); })();\n\n/**\n * A configuration service for the [`NgbTooltip`](#/components/tooltip/api#NgbTooltip) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the tooltips used in the application.\n */\nclass NgbTooltipConfig {\n    constructor(_ngbConfig) {\n        this._ngbConfig = _ngbConfig;\n        this.autoClose = true;\n        this.placement = 'auto';\n        this.triggers = 'hover focus';\n        this.disableTooltip = false;\n        this.openDelay = 0;\n        this.closeDelay = 0;\n    }\n    get animation() { return (this._animation === undefined) ? this._ngbConfig.animation : this._animation; }\n    set animation(animation) { this._animation = animation; }\n}\nNgbTooltipConfig.ɵfac = function NgbTooltipConfig_Factory(t) { return new (t || NgbTooltipConfig)(ɵngcc0.ɵɵinject(NgbConfig)); };\nNgbTooltipConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbTooltipConfig_Factory() { return new NgbTooltipConfig(i0.ɵɵinject(NgbConfig)); }, token: NgbTooltipConfig, providedIn: \"root\" });\nNgbTooltipConfig.ctorParameters = () => [\n    { type: NgbConfig }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbTooltipConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return [{ type: NgbConfig }]; }, null); })();\n\nlet nextId = 0;\nclass NgbTooltipWindow {\n}\nNgbTooltipWindow.ɵfac = function NgbTooltipWindow_Factory(t) { return new (t || NgbTooltipWindow)(); };\nNgbTooltipWindow.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbTooltipWindow, selectors: [[\"ngb-tooltip-window\"]], hostAttrs: [\"role\", \"tooltip\"], hostVars: 5, hostBindings: function NgbTooltipWindow_HostBindings(rf, ctx) { if (rf & 2) {\n        ɵngcc0.ɵɵhostProperty(\"id\", ctx.id);\n        ɵngcc0.ɵɵclassMap(\"tooltip\" + (ctx.tooltipClass ? \" \" + ctx.tooltipClass : \"\"));\n        ɵngcc0.ɵɵclassProp(\"fade\", ctx.animation);\n    } }, inputs: { animation: \"animation\", id: \"id\", tooltipClass: \"tooltipClass\" }, ngContentSelectors: _c3, decls: 3, vars: 0, consts: [[1, \"arrow\"], [1, \"tooltip-inner\"]], template: function NgbTooltipWindow_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵprojectionDef();\n        ɵngcc0.ɵɵelement(0, \"div\", 0);\n        ɵngcc0.ɵɵelementStart(1, \"div\", 1);\n        ɵngcc0.ɵɵprojection(2);\n        ɵngcc0.ɵɵelementEnd();\n    } }, styles: [\"ngb-tooltip-window{pointer-events:none}ngb-tooltip-window .tooltip-inner{pointer-events:auto}ngb-tooltip-window.bs-tooltip-bottom .arrow,ngb-tooltip-window.bs-tooltip-top .arrow{left:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-bottom-left .arrow,ngb-tooltip-window.bs-tooltip-top-left .arrow{left:1em}ngb-tooltip-window.bs-tooltip-bottom-right .arrow,ngb-tooltip-window.bs-tooltip-top-right .arrow{left:auto;right:.8rem}ngb-tooltip-window.bs-tooltip-left .arrow,ngb-tooltip-window.bs-tooltip-right .arrow{top:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-left-top .arrow,ngb-tooltip-window.bs-tooltip-right-top .arrow{top:.4rem}ngb-tooltip-window.bs-tooltip-left-bottom .arrow,ngb-tooltip-window.bs-tooltip-right-bottom .arrow{top:auto;bottom:.4rem}\"], encapsulation: 2, changeDetection: 0 });\nNgbTooltipWindow.propDecorators = {\n    animation: [{ type: Input }],\n    id: [{ type: Input }],\n    tooltipClass: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbTooltipWindow, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-tooltip-window',\n                changeDetection: ChangeDetectionStrategy.OnPush,\n                encapsulation: ViewEncapsulation.None,\n                host: {\n                    '[class]': '\"tooltip\" + (tooltipClass ? \" \" + tooltipClass : \"\")',\n                    '[class.fade]': 'animation',\n                    'role': 'tooltip',\n                    '[id]': 'id'\n                },\n                template: `<div class=\"arrow\"></div><div class=\"tooltip-inner\"><ng-content></ng-content></div>`,\n                styles: [\"ngb-tooltip-window{pointer-events:none}ngb-tooltip-window .tooltip-inner{pointer-events:auto}ngb-tooltip-window.bs-tooltip-bottom .arrow,ngb-tooltip-window.bs-tooltip-top .arrow{left:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-bottom-left .arrow,ngb-tooltip-window.bs-tooltip-top-left .arrow{left:1em}ngb-tooltip-window.bs-tooltip-bottom-right .arrow,ngb-tooltip-window.bs-tooltip-top-right .arrow{left:auto;right:.8rem}ngb-tooltip-window.bs-tooltip-left .arrow,ngb-tooltip-window.bs-tooltip-right .arrow{top:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-left-top .arrow,ngb-tooltip-window.bs-tooltip-right-top .arrow{top:.4rem}ngb-tooltip-window.bs-tooltip-left-bottom .arrow,ngb-tooltip-window.bs-tooltip-right-bottom .arrow{top:auto;bottom:.4rem}\"]\n            }]\n    }], null, { animation: [{\n            type: Input\n        }], id: [{\n            type: Input\n        }], tooltipClass: [{\n            type: Input\n        }] }); })();\n/**\n * A lightweight and extensible directive for fancy tooltip creation.\n */\nclass NgbTooltip {\n    constructor(_elementRef, _renderer, injector, componentFactoryResolver, viewContainerRef, config, _ngZone, _document, _changeDetector, applicationRef) {\n        this._elementRef = _elementRef;\n        this._renderer = _renderer;\n        this._ngZone = _ngZone;\n        this._document = _document;\n        this._changeDetector = _changeDetector;\n        /**\n         * An event emitted when the tooltip opening animation has finished. Contains no payload.\n         */\n        this.shown = new EventEmitter();\n        /**\n         * An event emitted when the tooltip closing animation has finished. Contains no payload.\n         */\n        this.hidden = new EventEmitter();\n        this._ngbTooltipWindowId = `ngb-tooltip-${nextId++}`;\n        this._windowRef = null;\n        this.animation = config.animation;\n        this.autoClose = config.autoClose;\n        this.placement = config.placement;\n        this.triggers = config.triggers;\n        this.container = config.container;\n        this.disableTooltip = config.disableTooltip;\n        this.tooltipClass = config.tooltipClass;\n        this.openDelay = config.openDelay;\n        this.closeDelay = config.closeDelay;\n        this._popupService = new PopupService(NgbTooltipWindow, injector, viewContainerRef, _renderer, this._ngZone, componentFactoryResolver, applicationRef);\n        this._zoneSubscription = _ngZone.onStable.subscribe(() => {\n            if (this._windowRef) {\n                positionElements(this._elementRef.nativeElement, this._windowRef.location.nativeElement, this.placement, this.container === 'body', 'bs-tooltip');\n            }\n        });\n    }\n    /**\n     * The string content or a `TemplateRef` for the content to be displayed in the tooltip.\n     *\n     * If the content if falsy, the tooltip won't open.\n     */\n    set ngbTooltip(value) {\n        this._ngbTooltip = value;\n        if (!value && this._windowRef) {\n            this.close();\n        }\n    }\n    get ngbTooltip() { return this._ngbTooltip; }\n    /**\n     * Opens the tooltip.\n     *\n     * This is considered to be a \"manual\" triggering.\n     * The `context` is an optional value to be injected into the tooltip template when it is created.\n     */\n    open(context) {\n        if (!this._windowRef && this._ngbTooltip && !this.disableTooltip) {\n            const { windowRef, transition$ } = this._popupService.open(this._ngbTooltip, context, this.animation);\n            this._windowRef = windowRef;\n            this._windowRef.instance.animation = this.animation;\n            this._windowRef.instance.tooltipClass = this.tooltipClass;\n            this._windowRef.instance.id = this._ngbTooltipWindowId;\n            this._renderer.setAttribute(this._elementRef.nativeElement, 'aria-describedby', this._ngbTooltipWindowId);\n            if (this.container === 'body') {\n                this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement);\n            }\n            // We need to detect changes, because we don't know where .open() might be called from.\n            // Ex. opening tooltip from one of lifecycle hooks that run after the CD\n            // (say from ngAfterViewInit) will result in 'ExpressionHasChanged' exception\n            this._windowRef.changeDetectorRef.detectChanges();\n            // We need to mark for check, because tooltip won't work inside the OnPush component.\n            // Ex. when we use expression like `{{ tooltip.isOpen() : 'opened' : 'closed' }}`\n            // inside the template of an OnPush component and we change the tooltip from\n            // open -> closed, the expression in question won't be updated unless we explicitly\n            // mark the parent component to be checked.\n            this._windowRef.changeDetectorRef.markForCheck();\n            ngbAutoClose(this._ngZone, this._document, this.autoClose, () => this.close(), this.hidden, [this._windowRef.location.nativeElement]);\n            transition$.subscribe(() => this.shown.emit());\n        }\n    }\n    /**\n     * Closes the tooltip.\n     *\n     * This is considered to be a \"manual\" triggering of the tooltip.\n     */\n    close() {\n        if (this._windowRef != null) {\n            this._renderer.removeAttribute(this._elementRef.nativeElement, 'aria-describedby');\n            this._popupService.close(this.animation).subscribe(() => {\n                this._windowRef = null;\n                this.hidden.emit();\n                this._changeDetector.markForCheck();\n            });\n        }\n    }\n    /**\n     * Toggles the tooltip.\n     *\n     * This is considered to be a \"manual\" triggering of the tooltip.\n     */\n    toggle() {\n        if (this._windowRef) {\n            this.close();\n        }\n        else {\n            this.open();\n        }\n    }\n    /**\n     * Returns `true`, if the popover is currently shown.\n     */\n    isOpen() { return this._windowRef != null; }\n    ngOnInit() {\n        this._unregisterListenersFn = listenToTriggers(this._renderer, this._elementRef.nativeElement, this.triggers, this.isOpen.bind(this), this.open.bind(this), this.close.bind(this), +this.openDelay, +this.closeDelay);\n    }\n    ngOnChanges({ tooltipClass }) {\n        if (tooltipClass && this.isOpen()) {\n            this._windowRef.instance.tooltipClass = tooltipClass.currentValue;\n        }\n    }\n    ngOnDestroy() {\n        this.close();\n        // This check is needed as it might happen that ngOnDestroy is called before ngOnInit\n        // under certain conditions, see: https://github.com/ng-bootstrap/ng-bootstrap/issues/2199\n        if (this._unregisterListenersFn) {\n            this._unregisterListenersFn();\n        }\n        this._zoneSubscription.unsubscribe();\n    }\n}\nNgbTooltip.ɵfac = function NgbTooltip_Factory(t) { return new (t || NgbTooltip)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Injector), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ComponentFactoryResolver), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(NgbTooltipConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(DOCUMENT), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ApplicationRef)); };\nNgbTooltip.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbTooltip, selectors: [[\"\", \"ngbTooltip\", \"\"]], inputs: { animation: \"animation\", autoClose: \"autoClose\", placement: \"placement\", triggers: \"triggers\", container: \"container\", disableTooltip: \"disableTooltip\", tooltipClass: \"tooltipClass\", openDelay: \"openDelay\", closeDelay: \"closeDelay\", ngbTooltip: \"ngbTooltip\" }, outputs: { shown: \"shown\", hidden: \"hidden\" }, exportAs: [\"ngbTooltip\"], features: [ɵngcc0.ɵɵNgOnChangesFeature] });\nNgbTooltip.ctorParameters = () => [\n    { type: ElementRef },\n    { type: Renderer2 },\n    { type: Injector },\n    { type: ComponentFactoryResolver },\n    { type: ViewContainerRef },\n    { type: NgbTooltipConfig },\n    { type: NgZone },\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n    { type: ChangeDetectorRef },\n    { type: ApplicationRef }\n];\nNgbTooltip.propDecorators = {\n    animation: [{ type: Input }],\n    autoClose: [{ type: Input }],\n    placement: [{ type: Input }],\n    triggers: [{ type: Input }],\n    container: [{ type: Input }],\n    disableTooltip: [{ type: Input }],\n    tooltipClass: [{ type: Input }],\n    openDelay: [{ type: Input }],\n    closeDelay: [{ type: Input }],\n    shown: [{ type: Output }],\n    hidden: [{ type: Output }],\n    ngbTooltip: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbTooltip, [{\n        type: Directive,\n        args: [{ selector: '[ngbTooltip]', exportAs: 'ngbTooltip' }]\n    }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.Injector }, { type: ɵngcc0.ComponentFactoryResolver }, { type: ɵngcc0.ViewContainerRef }, { type: NgbTooltipConfig }, { type: ɵngcc0.NgZone }, { type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }, { type: ɵngcc0.ChangeDetectorRef }, { type: ɵngcc0.ApplicationRef }]; }, { shown: [{\n            type: Output\n        }], hidden: [{\n            type: Output\n        }], animation: [{\n            type: Input\n        }], autoClose: [{\n            type: Input\n        }], placement: [{\n            type: Input\n        }], triggers: [{\n            type: Input\n        }], container: [{\n            type: Input\n        }], disableTooltip: [{\n            type: Input\n        }], tooltipClass: [{\n            type: Input\n        }], openDelay: [{\n            type: Input\n        }], closeDelay: [{\n            type: Input\n        }], ngbTooltip: [{\n            type: Input\n        }] }); })();\n\nclass NgbTooltipModule {\n}\nNgbTooltipModule.ɵfac = function NgbTooltipModule_Factory(t) { return new (t || NgbTooltipModule)(); };\nNgbTooltipModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbTooltipModule });\nNgbTooltipModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({});\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbTooltipModule, [{\n        type: NgModule,\n        args: [{ declarations: [NgbTooltip, NgbTooltipWindow], exports: [NgbTooltip], entryComponents: [NgbTooltipWindow] }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbTooltipModule, { declarations: [NgbTooltip, NgbTooltipWindow], exports: [NgbTooltip] }); })();\n\n/**\n * A component that helps with text highlighting.\n *\n * If splits the `result` text into parts that contain the searched `term` and generates the HTML markup to simplify\n * highlighting:\n *\n * Ex. `result=\"Alaska\"` and `term=\"as\"` will produce `Al<span class=\"ngb-highlight\">as</span>ka`.\n */\nclass NgbHighlight {\n    constructor() {\n        /**\n         * The CSS class for `<span>` elements wrapping the `term` inside the `result`.\n         */\n        this.highlightClass = 'ngb-highlight';\n        /**\n         * Boolean option to determine if the highlighting should be sensitive to accents or not.\n         *\n         * This feature is only available for browsers that implement the `String.normalize` function\n         * (typically not Internet Explorer).\n         * If you want to use this feature in a browser that does not implement `String.normalize`,\n         * you will have to include a polyfill in your application (`unorm` for example).\n         *\n         * @since 9.1.0\n         */\n        this.accentSensitive = true;\n    }\n    ngOnChanges(changes) {\n        if (!this.accentSensitive && !String.prototype.normalize) {\n            console.warn('The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser ' +\n                'that does not implement the `String.normalize` function. ' +\n                'You will have to include a polyfill in your application to use this feature in the current browser.');\n            this.accentSensitive = true;\n        }\n        const result = toString(this.result);\n        const terms = Array.isArray(this.term) ? this.term : [this.term];\n        const prepareTerm = term => this.accentSensitive ? term : removeAccents(term);\n        const escapedTerms = terms.map(term => regExpEscape(prepareTerm(toString(term)))).filter(term => term);\n        const toSplit = this.accentSensitive ? result : removeAccents(result);\n        const parts = escapedTerms.length ? toSplit.split(new RegExp(`(${escapedTerms.join('|')})`, 'gmi')) : [result];\n        if (this.accentSensitive) {\n            this.parts = parts;\n        }\n        else {\n            let offset = 0;\n            this.parts = parts.map(part => result.substring(offset, offset += part.length));\n        }\n    }\n}\nNgbHighlight.ɵfac = function NgbHighlight_Factory(t) { return new (t || NgbHighlight)(); };\nNgbHighlight.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbHighlight, selectors: [[\"ngb-highlight\"]], inputs: { highlightClass: \"highlightClass\", accentSensitive: \"accentSensitive\", result: \"result\", term: \"term\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[\"ngFor\", \"\", 3, \"ngForOf\"], [3, \"class\", 4, \"ngIf\", \"ngIfElse\"], [\"even\", \"\"]], template: function NgbHighlight_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵtemplate(0, NgbHighlight_ng_template_0_Template, 3, 2, \"ng-template\", 0);\n    } if (rf & 2) {\n        ɵngcc0.ɵɵproperty(\"ngForOf\", ctx.parts);\n    } }, directives: [ɵngcc1.NgForOf, ɵngcc1.NgIf], styles: [\".ngb-highlight{font-weight:700}\"], encapsulation: 2, changeDetection: 0 });\nNgbHighlight.propDecorators = {\n    highlightClass: [{ type: Input }],\n    result: [{ type: Input }],\n    term: [{ type: Input }],\n    accentSensitive: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbHighlight, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-highlight',\n                changeDetection: ChangeDetectionStrategy.OnPush,\n                encapsulation: ViewEncapsulation.None,\n                template: `<ng-template ngFor [ngForOf]=\"parts\" let-part let-isOdd=\"odd\">` +\n                    `<span *ngIf=\"isOdd; else even\" [class]=\"highlightClass\">{{part}}</span><ng-template #even>{{part}}</ng-template>` +\n                    `</ng-template>`,\n                styles: [\".ngb-highlight{font-weight:700}\"]\n            }]\n    }], function () { return []; }, { highlightClass: [{\n            type: Input\n        }], accentSensitive: [{\n            type: Input\n        }], result: [{\n            type: Input\n        }], term: [{\n            type: Input\n        }] }); })();\n\nclass NgbTypeaheadWindow {\n    constructor() {\n        this.activeIdx = 0;\n        /**\n         * Flag indicating if the first row should be active initially\n         */\n        this.focusFirst = true;\n        /**\n         * A function used to format a given result before display. This function should return a formatted string without any\n         * HTML markup\n         */\n        this.formatter = toString;\n        /**\n         * Event raised when user selects a particular result row\n         */\n        this.selectEvent = new EventEmitter();\n        this.activeChangeEvent = new EventEmitter();\n    }\n    hasActive() { return this.activeIdx > -1 && this.activeIdx < this.results.length; }\n    getActive() { return this.results[this.activeIdx]; }\n    markActive(activeIdx) {\n        this.activeIdx = activeIdx;\n        this._activeChanged();\n    }\n    next() {\n        if (this.activeIdx === this.results.length - 1) {\n            this.activeIdx = this.focusFirst ? (this.activeIdx + 1) % this.results.length : -1;\n        }\n        else {\n            this.activeIdx++;\n        }\n        this._activeChanged();\n    }\n    prev() {\n        if (this.activeIdx < 0) {\n            this.activeIdx = this.results.length - 1;\n        }\n        else if (this.activeIdx === 0) {\n            this.activeIdx = this.focusFirst ? this.results.length - 1 : -1;\n        }\n        else {\n            this.activeIdx--;\n        }\n        this._activeChanged();\n    }\n    resetActive() {\n        this.activeIdx = this.focusFirst ? 0 : -1;\n        this._activeChanged();\n    }\n    select(item) { this.selectEvent.emit(item); }\n    ngOnInit() { this.resetActive(); }\n    _activeChanged() {\n        this.activeChangeEvent.emit(this.activeIdx >= 0 ? this.id + '-' + this.activeIdx : undefined);\n    }\n}\nNgbTypeaheadWindow.ɵfac = function NgbTypeaheadWindow_Factory(t) { return new (t || NgbTypeaheadWindow)(); };\nNgbTypeaheadWindow.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: NgbTypeaheadWindow, selectors: [[\"ngb-typeahead-window\"]], hostAttrs: [\"role\", \"listbox\"], hostVars: 3, hostBindings: function NgbTypeaheadWindow_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"mousedown\", function NgbTypeaheadWindow_mousedown_HostBindingHandler($event) { return $event.preventDefault(); });\n    } if (rf & 2) {\n        ɵngcc0.ɵɵhostProperty(\"id\", ctx.id);\n        ɵngcc0.ɵɵclassMap(\"dropdown-menu show\" + (ctx.popupClass ? \" \" + ctx.popupClass : \"\"));\n    } }, inputs: { focusFirst: \"focusFirst\", formatter: \"formatter\", id: \"id\", results: \"results\", term: \"term\", resultTemplate: \"resultTemplate\", popupClass: \"popupClass\" }, outputs: { selectEvent: \"select\", activeChangeEvent: \"activeChange\" }, exportAs: [\"ngbTypeaheadWindow\"], decls: 3, vars: 1, consts: [[\"rt\", \"\"], [\"ngFor\", \"\", 3, \"ngForOf\"], [3, \"result\", \"term\"], [\"type\", \"button\", \"role\", \"option\", 1, \"dropdown-item\", 3, \"id\", \"mouseenter\", \"click\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"]], template: function NgbTypeaheadWindow_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵtemplate(0, NgbTypeaheadWindow_ng_template_0_Template, 1, 2, \"ng-template\", null, 0, ɵngcc0.ɵɵtemplateRefExtractor);\n        ɵngcc0.ɵɵtemplate(2, NgbTypeaheadWindow_ng_template_2_Template, 2, 9, \"ng-template\", 1);\n    } if (rf & 2) {\n        ɵngcc0.ɵɵadvance(2);\n        ɵngcc0.ɵɵproperty(\"ngForOf\", ctx.results);\n    } }, directives: [ɵngcc1.NgForOf, NgbHighlight, ɵngcc1.NgTemplateOutlet], encapsulation: 2 });\nNgbTypeaheadWindow.propDecorators = {\n    id: [{ type: Input }],\n    focusFirst: [{ type: Input }],\n    results: [{ type: Input }],\n    term: [{ type: Input }],\n    formatter: [{ type: Input }],\n    resultTemplate: [{ type: Input }],\n    popupClass: [{ type: Input }],\n    selectEvent: [{ type: Output, args: ['select',] }],\n    activeChangeEvent: [{ type: Output, args: ['activeChange',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbTypeaheadWindow, [{\n        type: Component,\n        args: [{\n                selector: 'ngb-typeahead-window',\n                exportAs: 'ngbTypeaheadWindow',\n                encapsulation: ViewEncapsulation.None,\n                host: {\n                    '(mousedown)': '$event.preventDefault()',\n                    '[class]': '\"dropdown-menu show\" + (popupClass ? \" \" + popupClass : \"\")',\n                    'role': 'listbox',\n                    '[id]': 'id'\n                },\n                template: `\n    <ng-template #rt let-result=\"result\" let-term=\"term\" let-formatter=\"formatter\">\n      <ngb-highlight [result]=\"formatter(result)\" [term]=\"term\"></ngb-highlight>\n    </ng-template>\n    <ng-template ngFor [ngForOf]=\"results\" let-result let-idx=\"index\">\n      <button type=\"button\" class=\"dropdown-item\" role=\"option\"\n        [id]=\"id + '-' + idx\"\n        [class.active]=\"idx === activeIdx\"\n        (mouseenter)=\"markActive(idx)\"\n        (click)=\"select(result)\">\n          <ng-template [ngTemplateOutlet]=\"resultTemplate || rt\"\n          [ngTemplateOutletContext]=\"{result: result, term: term, formatter: formatter}\"></ng-template>\n      </button>\n    </ng-template>\n  `\n            }]\n    }], function () { return []; }, { focusFirst: [{\n            type: Input\n        }], formatter: [{\n            type: Input\n        }], selectEvent: [{\n            type: Output,\n            args: ['select']\n        }], activeChangeEvent: [{\n            type: Output,\n            args: ['activeChange']\n        }], id: [{\n            type: Input\n        }], results: [{\n            type: Input\n        }], term: [{\n            type: Input\n        }], resultTemplate: [{\n            type: Input\n        }], popupClass: [{\n            type: Input\n        }] }); })();\n\nconst ARIA_LIVE_DELAY = new InjectionToken('live announcer delay', { providedIn: 'root', factory: ARIA_LIVE_DELAY_FACTORY });\nfunction ARIA_LIVE_DELAY_FACTORY() {\n    return 100;\n}\nfunction getLiveElement(document, lazyCreate = false) {\n    let element = document.body.querySelector('#ngb-live');\n    if (element == null && lazyCreate) {\n        element = document.createElement('div');\n        element.setAttribute('id', 'ngb-live');\n        element.setAttribute('aria-live', 'polite');\n        element.setAttribute('aria-atomic', 'true');\n        element.classList.add('sr-only');\n        document.body.appendChild(element);\n    }\n    return element;\n}\nclass Live {\n    constructor(_document, _delay) {\n        this._document = _document;\n        this._delay = _delay;\n    }\n    ngOnDestroy() {\n        const element = getLiveElement(this._document);\n        if (element) {\n            // if exists, it will always be attached to the <body>\n            element.parentElement.removeChild(element);\n        }\n    }\n    say(message) {\n        const element = getLiveElement(this._document, true);\n        const delay = this._delay;\n        if (element != null) {\n            element.textContent = '';\n            const setText = () => element.textContent = message;\n            if (delay === null) {\n                setText();\n            }\n            else {\n                setTimeout(setText, delay);\n            }\n        }\n    }\n}\nLive.ɵfac = function Live_Factory(t) { return new (t || Live)(ɵngcc0.ɵɵinject(DOCUMENT), ɵngcc0.ɵɵinject(ARIA_LIVE_DELAY)); };\nLive.ɵprov = i0.ɵɵdefineInjectable({ factory: function Live_Factory() { return new Live(i0.ɵɵinject(i1.DOCUMENT), i0.ɵɵinject(ARIA_LIVE_DELAY)); }, token: Live, providedIn: \"root\" });\nLive.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n    { type: undefined, decorators: [{ type: Inject, args: [ARIA_LIVE_DELAY,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(Live, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }, { type: undefined, decorators: [{\n                type: Inject,\n                args: [ARIA_LIVE_DELAY]\n            }] }]; }, null); })();\n\n/**\n * A configuration service for the [`NgbTypeahead`](#/components/typeahead/api#NgbTypeahead) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the typeaheads used in the application.\n */\nclass NgbTypeaheadConfig {\n    constructor() {\n        this.editable = true;\n        this.focusFirst = true;\n        this.showHint = false;\n        this.placement = ['bottom-left', 'bottom-right', 'top-left', 'top-right'];\n    }\n}\nNgbTypeaheadConfig.ɵfac = function NgbTypeaheadConfig_Factory(t) { return new (t || NgbTypeaheadConfig)(); };\nNgbTypeaheadConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgbTypeaheadConfig_Factory() { return new NgbTypeaheadConfig(); }, token: NgbTypeaheadConfig, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbTypeaheadConfig, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], function () { return []; }, null); })();\n\nlet nextWindowId = 0;\n/**\n * A directive providing a simple way of creating powerful typeaheads from any text input.\n */\nclass NgbTypeahead {\n    constructor(_elementRef, viewContainerRef, _renderer, injector, componentFactoryResolver, config, ngZone, _live, _document, _ngZone, _changeDetector, applicationRef) {\n        this._elementRef = _elementRef;\n        this._renderer = _renderer;\n        this._live = _live;\n        this._document = _document;\n        this._ngZone = _ngZone;\n        this._changeDetector = _changeDetector;\n        this._subscription = null;\n        this._closed$ = new Subject();\n        this._inputValueBackup = null;\n        this._windowRef = null;\n        /**\n         * The value for the `autocomplete` attribute for the `<input>` element.\n         *\n         * Defaults to `\"off\"` to disable the native browser autocomplete, but you can override it if necessary.\n         *\n         * @since 2.1.0\n         */\n        this.autocomplete = 'off';\n        /**\n         * The preferred placement of the typeahead.\n         *\n         * Possible values are `\"top\"`, `\"top-left\"`, `\"top-right\"`, `\"bottom\"`, `\"bottom-left\"`,\n         * `\"bottom-right\"`, `\"left\"`, `\"left-top\"`, `\"left-bottom\"`, `\"right\"`, `\"right-top\"`,\n         * `\"right-bottom\"`\n         *\n         * Accepts an array of strings or a string with space separated possible values.\n         *\n         * The default order of preference is `\"bottom-left bottom-right top-left top-right\"`\n         *\n         * Please see the [positioning overview](#/positioning) for more details.\n         */\n        this.placement = 'bottom-left';\n        /**\n         * An event emitted right before an item is selected from the result list.\n         *\n         * Event payload is of type [`NgbTypeaheadSelectItemEvent`](#/components/typeahead/api#NgbTypeaheadSelectItemEvent).\n         */\n        this.selectItem = new EventEmitter();\n        this.activeDescendant = null;\n        this.popupId = `ngb-typeahead-${nextWindowId++}`;\n        this._onTouched = () => { };\n        this._onChange = (_) => { };\n        this.container = config.container;\n        this.editable = config.editable;\n        this.focusFirst = config.focusFirst;\n        this.showHint = config.showHint;\n        this.placement = config.placement;\n        this._valueChanges = fromEvent(_elementRef.nativeElement, 'input')\n            .pipe(map($event => $event.target.value));\n        this._resubscribeTypeahead = new BehaviorSubject(null);\n        this._popupService = new PopupService(NgbTypeaheadWindow, injector, viewContainerRef, _renderer, this._ngZone, componentFactoryResolver, applicationRef);\n        this._zoneSubscription = ngZone.onStable.subscribe(() => {\n            if (this.isPopupOpen()) {\n                positionElements(this._elementRef.nativeElement, this._windowRef.location.nativeElement, this.placement, this.container === 'body');\n            }\n        });\n    }\n    ngOnInit() { this._subscribeToUserInput(); }\n    ngOnChanges({ ngbTypeahead }) {\n        if (ngbTypeahead && !ngbTypeahead.firstChange) {\n            this._unsubscribeFromUserInput();\n            this._subscribeToUserInput();\n        }\n    }\n    ngOnDestroy() {\n        this._closePopup();\n        this._unsubscribeFromUserInput();\n        this._zoneSubscription.unsubscribe();\n    }\n    registerOnChange(fn) { this._onChange = fn; }\n    registerOnTouched(fn) { this._onTouched = fn; }\n    writeValue(value) {\n        this._writeInputValue(this._formatItemForInput(value));\n        if (this.showHint) {\n            this._inputValueBackup = value;\n        }\n    }\n    setDisabledState(isDisabled) {\n        this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n    }\n    /**\n     * Dismisses typeahead popup window\n     */\n    dismissPopup() {\n        if (this.isPopupOpen()) {\n            this._resubscribeTypeahead.next(null);\n            this._closePopup();\n            if (this.showHint && this._inputValueBackup !== null) {\n                this._writeInputValue(this._inputValueBackup);\n            }\n            this._changeDetector.markForCheck();\n        }\n    }\n    /**\n     * Returns true if the typeahead popup window is displayed\n     */\n    isPopupOpen() { return this._windowRef != null; }\n    handleBlur() {\n        this._resubscribeTypeahead.next(null);\n        this._onTouched();\n    }\n    handleKeyDown(event) {\n        if (!this.isPopupOpen()) {\n            return;\n        }\n        // tslint:disable-next-line:deprecation\n        switch (event.which) {\n            case Key.ArrowDown:\n                event.preventDefault();\n                this._windowRef.instance.next();\n                this._showHint();\n                break;\n            case Key.ArrowUp:\n                event.preventDefault();\n                this._windowRef.instance.prev();\n                this._showHint();\n                break;\n            case Key.Enter:\n            case Key.Tab:\n                const result = this._windowRef.instance.getActive();\n                if (isDefined(result)) {\n                    event.preventDefault();\n                    event.stopPropagation();\n                    this._selectResult(result);\n                }\n                this._closePopup();\n                break;\n        }\n    }\n    _openPopup() {\n        if (!this.isPopupOpen()) {\n            this._inputValueBackup = this._elementRef.nativeElement.value;\n            const { windowRef } = this._popupService.open();\n            this._windowRef = windowRef;\n            this._windowRef.instance.id = this.popupId;\n            this._windowRef.instance.selectEvent.subscribe((result) => this._selectResultClosePopup(result));\n            this._windowRef.instance.activeChangeEvent.subscribe((activeId) => this.activeDescendant = activeId);\n            this._windowRef.instance.popupClass = this.popupClass;\n            if (this.container === 'body') {\n                this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement);\n            }\n            this._changeDetector.markForCheck();\n            ngbAutoClose(this._ngZone, this._document, 'outside', () => this.dismissPopup(), this._closed$, [this._elementRef.nativeElement, this._windowRef.location.nativeElement]);\n        }\n    }\n    _closePopup() {\n        this._popupService.close().subscribe(() => {\n            this._closed$.next();\n            this._windowRef = null;\n            this.activeDescendant = null;\n        });\n    }\n    _selectResult(result) {\n        let defaultPrevented = false;\n        this.selectItem.emit({ item: result, preventDefault: () => { defaultPrevented = true; } });\n        this._resubscribeTypeahead.next(null);\n        if (!defaultPrevented) {\n            this.writeValue(result);\n            this._onChange(result);\n        }\n    }\n    _selectResultClosePopup(result) {\n        this._selectResult(result);\n        this._closePopup();\n    }\n    _showHint() {\n        var _a;\n        if (this.showHint && ((_a = this._windowRef) === null || _a === void 0 ? void 0 : _a.instance.hasActive()) && this._inputValueBackup != null) {\n            const userInputLowerCase = this._inputValueBackup.toLowerCase();\n            const formattedVal = this._formatItemForInput(this._windowRef.instance.getActive());\n            if (userInputLowerCase === formattedVal.substr(0, this._inputValueBackup.length).toLowerCase()) {\n                this._writeInputValue(this._inputValueBackup + formattedVal.substr(this._inputValueBackup.length));\n                this._elementRef.nativeElement['setSelectionRange'].apply(this._elementRef.nativeElement, [this._inputValueBackup.length, formattedVal.length]);\n            }\n            else {\n                this._writeInputValue(formattedVal);\n            }\n        }\n    }\n    _formatItemForInput(item) {\n        return item != null && this.inputFormatter ? this.inputFormatter(item) : toString(item);\n    }\n    _writeInputValue(value) {\n        this._renderer.setProperty(this._elementRef.nativeElement, 'value', toString(value));\n    }\n    _subscribeToUserInput() {\n        const results$ = this._valueChanges.pipe(tap(value => {\n            this._inputValueBackup = this.showHint ? value : null;\n            this._onChange(this.editable ? value : undefined);\n        }), this.ngbTypeahead ? this.ngbTypeahead : () => of([]));\n        this._subscription = this._resubscribeTypeahead.pipe(switchMap(() => results$)).subscribe(results => {\n            if (!results || results.length === 0) {\n                this._closePopup();\n            }\n            else {\n                this._openPopup();\n                this._windowRef.instance.focusFirst = this.focusFirst;\n                this._windowRef.instance.results = results;\n                this._windowRef.instance.term = this._elementRef.nativeElement.value;\n                if (this.resultFormatter) {\n                    this._windowRef.instance.formatter = this.resultFormatter;\n                }\n                if (this.resultTemplate) {\n                    this._windowRef.instance.resultTemplate = this.resultTemplate;\n                }\n                this._windowRef.instance.resetActive();\n                // The observable stream we are subscribing to might have async steps\n                // and if a component containing typeahead is using the OnPush strategy\n                // the change detection turn wouldn't be invoked automatically.\n                this._windowRef.changeDetectorRef.detectChanges();\n                this._showHint();\n            }\n            // live announcer\n            const count = results ? results.length : 0;\n            this._live.say(count === 0 ? 'No results available' : `${count} result${count === 1 ? '' : 's'} available`);\n        });\n    }\n    _unsubscribeFromUserInput() {\n        if (this._subscription) {\n            this._subscription.unsubscribe();\n        }\n        this._subscription = null;\n    }\n}\nNgbTypeahead.ɵfac = function NgbTypeahead_Factory(t) { return new (t || NgbTypeahead)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Injector), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ComponentFactoryResolver), ɵngcc0.ɵɵdirectiveInject(NgbTypeaheadConfig), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(Live), ɵngcc0.ɵɵdirectiveInject(DOCUMENT), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ApplicationRef)); };\nNgbTypeahead.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: NgbTypeahead, selectors: [[\"input\", \"ngbTypeahead\", \"\"]], hostAttrs: [\"autocapitalize\", \"off\", \"autocorrect\", \"off\", \"role\", \"combobox\", \"aria-multiline\", \"false\"], hostVars: 7, hostBindings: function NgbTypeahead_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"blur\", function NgbTypeahead_blur_HostBindingHandler() { return ctx.handleBlur(); })(\"keydown\", function NgbTypeahead_keydown_HostBindingHandler($event) { return ctx.handleKeyDown($event); });\n    } if (rf & 2) {\n        ɵngcc0.ɵɵhostProperty(\"autocomplete\", ctx.autocomplete);\n        ɵngcc0.ɵɵattribute(\"aria-autocomplete\", ctx.showHint ? \"both\" : \"list\")(\"aria-activedescendant\", ctx.activeDescendant)(\"aria-owns\", ctx.isPopupOpen() ? ctx.popupId : null)(\"aria-expanded\", ctx.isPopupOpen());\n        ɵngcc0.ɵɵclassProp(\"open\", ctx.isPopupOpen());\n    } }, inputs: { autocomplete: \"autocomplete\", placement: \"placement\", container: \"container\", editable: \"editable\", focusFirst: \"focusFirst\", showHint: \"showHint\", inputFormatter: \"inputFormatter\", ngbTypeahead: \"ngbTypeahead\", resultFormatter: \"resultFormatter\", resultTemplate: \"resultTemplate\", popupClass: \"popupClass\" }, outputs: { selectItem: \"selectItem\" }, exportAs: [\"ngbTypeahead\"], features: [ɵngcc0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbTypeahead), multi: true }]), ɵngcc0.ɵɵNgOnChangesFeature] });\nNgbTypeahead.ctorParameters = () => [\n    { type: ElementRef },\n    { type: ViewContainerRef },\n    { type: Renderer2 },\n    { type: Injector },\n    { type: ComponentFactoryResolver },\n    { type: NgbTypeaheadConfig },\n    { type: NgZone },\n    { type: Live },\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n    { type: NgZone },\n    { type: ChangeDetectorRef },\n    { type: ApplicationRef }\n];\nNgbTypeahead.propDecorators = {\n    autocomplete: [{ type: Input }],\n    container: [{ type: Input }],\n    editable: [{ type: Input }],\n    focusFirst: [{ type: Input }],\n    inputFormatter: [{ type: Input }],\n    ngbTypeahead: [{ type: Input }],\n    resultFormatter: [{ type: Input }],\n    resultTemplate: [{ type: Input }],\n    showHint: [{ type: Input }],\n    placement: [{ type: Input }],\n    popupClass: [{ type: Input }],\n    selectItem: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbTypeahead, [{\n        type: Directive,\n        args: [{\n                selector: 'input[ngbTypeahead]',\n                exportAs: 'ngbTypeahead',\n                host: {\n                    '(blur)': 'handleBlur()',\n                    '[class.open]': 'isPopupOpen()',\n                    '(keydown)': 'handleKeyDown($event)',\n                    '[autocomplete]': 'autocomplete',\n                    'autocapitalize': 'off',\n                    'autocorrect': 'off',\n                    'role': 'combobox',\n                    'aria-multiline': 'false',\n                    '[attr.aria-autocomplete]': 'showHint ? \"both\" : \"list\"',\n                    '[attr.aria-activedescendant]': 'activeDescendant',\n                    '[attr.aria-owns]': 'isPopupOpen() ? popupId : null',\n                    '[attr.aria-expanded]': 'isPopupOpen()'\n                },\n                providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbTypeahead), multi: true }]\n            }]\n    }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.ViewContainerRef }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.Injector }, { type: ɵngcc0.ComponentFactoryResolver }, { type: NgbTypeaheadConfig }, { type: ɵngcc0.NgZone }, { type: Live }, { type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }, { type: ɵngcc0.NgZone }, { type: ɵngcc0.ChangeDetectorRef }, { type: ɵngcc0.ApplicationRef }]; }, { autocomplete: [{\n            type: Input\n        }], placement: [{\n            type: Input\n        }], selectItem: [{\n            type: Output\n        }], container: [{\n            type: Input\n        }], editable: [{\n            type: Input\n        }], focusFirst: [{\n            type: Input\n        }], showHint: [{\n            type: Input\n        }], inputFormatter: [{\n            type: Input\n        }], ngbTypeahead: [{\n            type: Input\n        }], resultFormatter: [{\n            type: Input\n        }], resultTemplate: [{\n            type: Input\n        }], popupClass: [{\n            type: Input\n        }] }); })();\n\nclass NgbTypeaheadModule {\n}\nNgbTypeaheadModule.ɵfac = function NgbTypeaheadModule_Factory(t) { return new (t || NgbTypeaheadModule)(); };\nNgbTypeaheadModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbTypeaheadModule });\nNgbTypeaheadModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [[CommonModule]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbTypeaheadModule, [{\n        type: NgModule,\n        args: [{\n                declarations: [NgbTypeahead, NgbHighlight, NgbTypeaheadWindow],\n                exports: [NgbTypeahead, NgbHighlight],\n                imports: [CommonModule],\n                entryComponents: [NgbTypeaheadWindow]\n            }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbTypeaheadModule, { declarations: function () { return [NgbTypeahead, NgbHighlight, NgbTypeaheadWindow]; }, imports: function () { return [CommonModule]; }, exports: function () { return [NgbTypeahead, NgbHighlight]; } }); })();\n\nconst NGB_MODULES = [\n    NgbAccordionModule, NgbAlertModule, NgbButtonsModule, NgbCarouselModule, NgbCollapseModule, NgbDatepickerModule,\n    NgbDropdownModule, NgbModalModule, NgbNavModule, NgbPaginationModule, NgbPopoverModule, NgbProgressbarModule,\n    NgbRatingModule, NgbTimepickerModule, NgbToastModule, NgbTooltipModule, NgbTypeaheadModule\n];\nclass NgbModule {\n}\nNgbModule.ɵfac = function NgbModule_Factory(t) { return new (t || NgbModule)(); };\nNgbModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: NgbModule });\nNgbModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [NGB_MODULES, NgbAccordionModule, NgbAlertModule, NgbButtonsModule, NgbCarouselModule, NgbCollapseModule, NgbDatepickerModule, NgbDropdownModule, NgbModalModule, NgbNavModule, NgbPaginationModule, NgbPopoverModule, NgbProgressbarModule, NgbRatingModule, NgbTimepickerModule, NgbToastModule, NgbTooltipModule, NgbTypeaheadModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NgbModule, [{\n        type: NgModule,\n        args: [{ imports: NGB_MODULES, exports: NGB_MODULES }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NgbModule, { imports: [NgbAccordionModule, NgbAlertModule, NgbButtonsModule, NgbCarouselModule, NgbCollapseModule, NgbDatepickerModule, NgbDropdownModule, NgbModalModule, NgbNavModule, NgbPaginationModule, NgbPopoverModule, NgbProgressbarModule, NgbRatingModule, NgbTimepickerModule, NgbToastModule, NgbTooltipModule, NgbTypeaheadModule], exports: [NgbAccordionModule, NgbAlertModule, NgbButtonsModule, NgbCarouselModule, NgbCollapseModule, NgbDatepickerModule, NgbDropdownModule, NgbModalModule, NgbNavModule, NgbPaginationModule, NgbPopoverModule, NgbProgressbarModule, NgbRatingModule, NgbTimepickerModule, NgbToastModule, NgbTooltipModule, NgbTypeaheadModule] }); })();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ModalDismissReasons, NgbAccordion, NgbAccordionConfig, NgbAccordionModule, NgbActiveModal, NgbAlert, NgbAlertConfig, NgbAlertModule, NgbButtonLabel, NgbButtonsModule, NgbCalendar, NgbCalendarBuddhist, NgbCalendarGregorian, NgbCalendarHebrew, NgbCalendarIslamicCivil, NgbCalendarIslamicUmalqura, NgbCalendarPersian, NgbCarousel, NgbCarouselConfig, NgbCarouselModule, NgbCheckBox, NgbCollapse, NgbCollapseConfig, NgbCollapseModule, NgbConfig, NgbDate, NgbDateAdapter, NgbDateNativeAdapter, NgbDateNativeUTCAdapter, NgbDateParserFormatter, NgbDatepicker, NgbDatepickerConfig, NgbDatepickerContent, NgbDatepickerI18n, NgbDatepickerI18nDefault, NgbDatepickerI18nHebrew, NgbDatepickerKeyboardService, NgbDatepickerModule, NgbDatepickerMonth, NgbDropdown, NgbDropdownAnchor, NgbDropdownConfig, NgbDropdownItem, NgbDropdownMenu, NgbDropdownModule, NgbDropdownToggle, NgbHighlight, NgbInputDatepicker, NgbInputDatepickerConfig, NgbModal, NgbModalConfig, NgbModalModule, NgbModalRef, NgbModule, NgbNav, NgbNavConfig, NgbNavContent, NgbNavItem, NgbNavLink, NgbNavModule, NgbNavOutlet, NgbNavPane, NgbNavbar, NgbPagination, NgbPaginationConfig, NgbPaginationEllipsis, NgbPaginationFirst, NgbPaginationLast, NgbPaginationModule, NgbPaginationNext, NgbPaginationNumber, NgbPaginationPages, NgbPaginationPrevious, NgbPanel, NgbPanelContent, NgbPanelHeader, NgbPanelTitle, NgbPanelToggle, NgbPopover, NgbPopoverConfig, NgbPopoverModule, NgbProgressbar, NgbProgressbarConfig, NgbProgressbarModule, NgbRadio, NgbRadioGroup, NgbRating, NgbRatingConfig, NgbRatingModule, NgbSlide, NgbSlideEventDirection, NgbSlideEventSource, NgbTimeAdapter, NgbTimepicker, NgbTimepickerConfig, NgbTimepickerI18n, NgbTimepickerModule, NgbToast, NgbToastConfig, NgbToastHeader, NgbToastModule, NgbTooltip, NgbTooltipConfig, NgbTooltipModule, NgbTypeahead, NgbTypeaheadConfig, NgbTypeaheadModule, NGB_CAROUSEL_DIRECTIVES as ɵa, NGB_DATEPICKER_CALENDAR_FACTORY as ɵb, ContentRef as ɵba, NgbDatepickerDayView as ɵc, NgbDatepickerNavigation as ɵd, NgbDatepickerNavigationSelect as ɵe, NGB_DATEPICKER_18N_FACTORY as ɵf, NGB_DATEPICKER_DATE_ADAPTER_FACTORY as ɵg, NgbDateStructAdapter as ɵh, NGB_DATEPICKER_PARSER_FORMATTER_FACTORY as ɵi, NgbDateISOParserFormatter as ɵj, NgbPopoverWindow as ɵk, NGB_DATEPICKER_TIME_ADAPTER_FACTORY as ɵl, NgbTimeStructAdapter as ɵm, NGB_TIMEPICKER_I18N_FACTORY as ɵn, NgbTimepickerI18nDefault as ɵo, NgbTooltipWindow as ɵp, NgbTypeaheadWindow as ɵq, NgbDatepickerService as ɵr, NgbModalBackdrop as ɵs, NgbModalWindow as ɵt, NgbModalStack as ɵu, ScrollBar as ɵv, ARIA_LIVE_DELAY as ɵw, ARIA_LIVE_DELAY_FACTORY as ɵx, Live as ɵy, NgbCalendarHijri as ɵz };\n\n","import { concat } from '../observable/concat';\nimport { of } from '../observable/of';\nexport function endWith(...array) {\n    return (source) => concat(source, of(...array));\n}\n","import { isPlatformServer, isPlatformBrowser, CommonModule } from '@angular/common';\nimport { EventEmitter, Component, forwardRef, ElementRef, NgZone, Inject, PLATFORM_ID, Input, Output, Directive, Host, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/**\n * @fileoverview added by tsickle\n * Generated from: slick.component.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * Slick component\n */\nimport * as ɵngcc0 from '@angular/core';\n\nconst _c0 = [\"*\"];\nclass SlickCarouselComponent {\n    /**\n     * Constructor\n     * @param {?} el\n     * @param {?} zone\n     * @param {?} platformId\n     */\n    constructor(el, zone, platformId) {\n        this.el = el;\n        this.zone = zone;\n        this.platformId = platformId;\n        this.afterChange = new EventEmitter();\n        this.beforeChange = new EventEmitter();\n        this.breakpoint = new EventEmitter();\n        this.destroy = new EventEmitter();\n        this.init = new EventEmitter();\n        // access from parent component can be a problem with change detection timing. Please use afterChange output\n        this.currentIndex = 0;\n        this.slides = [];\n        this.initialized = false;\n        this._removedSlides = [];\n        this._addedSlides = [];\n    }\n    /**\n     * On component destroy\n     * @return {?}\n     */\n    ngOnDestroy() {\n        this.unslick();\n    }\n    /**\n     * @return {?}\n     */\n    ngAfterViewInit() {\n        this.ngAfterViewChecked();\n    }\n    /**\n     * On component view checked\n     * @return {?}\n     */\n    ngAfterViewChecked() {\n        if (isPlatformServer(this.platformId)) {\n            return;\n        }\n        if (this._addedSlides.length > 0 || this._removedSlides.length > 0) {\n            /** @type {?} */\n            const nextSlidesLength = this.slides.length - this._removedSlides.length + this._addedSlides.length;\n            if (!this.initialized) {\n                if (nextSlidesLength > 0) {\n                    this.initSlick();\n                }\n                // if nextSlidesLength is zere, do nothing\n            }\n            else if (nextSlidesLength === 0) { // unslick case\n                this.unslick();\n            }\n            else {\n                this._addedSlides.forEach((/**\n                 * @param {?} slickItem\n                 * @return {?}\n                 */\n                slickItem => {\n                    this.slides.push(slickItem);\n                    this.zone.runOutsideAngular((/**\n                     * @return {?}\n                     */\n                    () => {\n                        this.$instance.slick('slickAdd', slickItem.el.nativeElement);\n                    }));\n                }));\n                this._addedSlides = [];\n                this._removedSlides.forEach((/**\n                 * @param {?} slickItem\n                 * @return {?}\n                 */\n                slickItem => {\n                    /** @type {?} */\n                    const idx = this.slides.indexOf(slickItem);\n                    this.slides = this.slides.filter((/**\n                     * @param {?} s\n                     * @return {?}\n                     */\n                    s => s !== slickItem));\n                    this.zone.runOutsideAngular((/**\n                     * @return {?}\n                     */\n                    () => {\n                        this.$instance.slick('slickRemove', idx);\n                    }));\n                }));\n                this._removedSlides = [];\n            }\n        }\n    }\n    /**\n     * init slick\n     * @return {?}\n     */\n    initSlick() {\n        this.slides = this._addedSlides;\n        this._addedSlides = [];\n        this._removedSlides = [];\n        this.zone.runOutsideAngular((/**\n         * @return {?}\n         */\n        () => {\n            this.$instance = jQuery(this.el.nativeElement);\n            this.$instance.on('init', (/**\n             * @param {?} event\n             * @param {?} slick\n             * @return {?}\n             */\n            (event, slick) => {\n                this.zone.run((/**\n                 * @return {?}\n                 */\n                () => {\n                    this.init.emit({ event, slick });\n                }));\n            }));\n            this.$instance.slick(this.config);\n            this.zone.run((/**\n             * @return {?}\n             */\n            () => {\n                var _a;\n                this.initialized = true;\n                this.currentIndex = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.initialSlide) || 0;\n            }));\n            this.$instance.on('afterChange', (/**\n             * @param {?} event\n             * @param {?} slick\n             * @param {?} currentSlide\n             * @return {?}\n             */\n            (event, slick, currentSlide) => {\n                this.zone.run((/**\n                 * @return {?}\n                 */\n                () => {\n                    this.afterChange.emit({\n                        event,\n                        slick,\n                        currentSlide,\n                        first: currentSlide === 0,\n                        last: slick.$slides.length === currentSlide + slick.options.slidesToScroll\n                    });\n                    this.currentIndex = currentSlide;\n                }));\n            }));\n            this.$instance.on('beforeChange', (/**\n             * @param {?} event\n             * @param {?} slick\n             * @param {?} currentSlide\n             * @param {?} nextSlide\n             * @return {?}\n             */\n            (event, slick, currentSlide, nextSlide) => {\n                this.zone.run((/**\n                 * @return {?}\n                 */\n                () => {\n                    this.beforeChange.emit({ event, slick, currentSlide, nextSlide });\n                    this.currentIndex = nextSlide;\n                }));\n            }));\n            this.$instance.on('breakpoint', (/**\n             * @param {?} event\n             * @param {?} slick\n             * @param {?} breakpoint\n             * @return {?}\n             */\n            (event, slick, breakpoint) => {\n                this.zone.run((/**\n                 * @return {?}\n                 */\n                () => {\n                    this.breakpoint.emit({ event, slick, breakpoint });\n                }));\n            }));\n            this.$instance.on('destroy', (/**\n             * @param {?} event\n             * @param {?} slick\n             * @return {?}\n             */\n            (event, slick) => {\n                this.zone.run((/**\n                 * @return {?}\n                 */\n                () => {\n                    this.destroy.emit({ event, slick });\n                    this.initialized = false;\n                }));\n            }));\n        }));\n    }\n    /**\n     * @param {?} slickItem\n     * @return {?}\n     */\n    addSlide(slickItem) {\n        this._addedSlides.push(slickItem);\n    }\n    /**\n     * @param {?} slickItem\n     * @return {?}\n     */\n    removeSlide(slickItem) {\n        this._removedSlides.push(slickItem);\n    }\n    /**\n     * Slick Method\n     * @param {?} index\n     * @return {?}\n     */\n    slickGoTo(index) {\n        this.zone.runOutsideAngular((/**\n         * @return {?}\n         */\n        () => {\n            this.$instance.slick('slickGoTo', index);\n        }));\n    }\n    /**\n     * @return {?}\n     */\n    slickNext() {\n        this.zone.runOutsideAngular((/**\n         * @return {?}\n         */\n        () => {\n            this.$instance.slick('slickNext');\n        }));\n    }\n    /**\n     * @return {?}\n     */\n    slickPrev() {\n        this.zone.runOutsideAngular((/**\n         * @return {?}\n         */\n        () => {\n            this.$instance.slick('slickPrev');\n        }));\n    }\n    /**\n     * @return {?}\n     */\n    slickPause() {\n        this.zone.runOutsideAngular((/**\n         * @return {?}\n         */\n        () => {\n            this.$instance.slick('slickPause');\n        }));\n    }\n    /**\n     * @return {?}\n     */\n    slickPlay() {\n        this.zone.runOutsideAngular((/**\n         * @return {?}\n         */\n        () => {\n            this.$instance.slick('slickPlay');\n        }));\n    }\n    /**\n     * @return {?}\n     */\n    unslick() {\n        if (this.$instance) {\n            this.zone.runOutsideAngular((/**\n             * @return {?}\n             */\n            () => {\n                this.$instance.slick('unslick');\n            }));\n            this.$instance = undefined;\n        }\n        this.initialized = false;\n    }\n    /**\n     * @param {?} changes\n     * @return {?}\n     */\n    ngOnChanges(changes) {\n        if (this.initialized) {\n            /** @type {?} */\n            const config = changes['config'];\n            if (config.previousValue !== config.currentValue && config.currentValue !== undefined) {\n                /** @type {?} */\n                const refresh = config.currentValue['refresh'];\n                /** @type {?} */\n                const newOptions = Object.assign({}, config.currentValue);\n                delete newOptions['refresh'];\n                this.zone.runOutsideAngular((/**\n                 * @return {?}\n                 */\n                () => {\n                    this.$instance.slick('slickSetOption', newOptions, refresh);\n                }));\n            }\n        }\n    }\n}\nSlickCarouselComponent.ɵfac = function SlickCarouselComponent_Factory(t) { return new (t || SlickCarouselComponent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(PLATFORM_ID)); };\nSlickCarouselComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: SlickCarouselComponent, selectors: [[\"ngx-slick-carousel\"]], inputs: { config: \"config\" }, outputs: { afterChange: \"afterChange\", beforeChange: \"beforeChange\", breakpoint: \"breakpoint\", destroy: \"destroy\", init: \"init\" }, exportAs: [\"slick-carousel\"], features: [ɵngcc0.ɵɵProvidersFeature([{\n                provide: NG_VALUE_ACCESSOR,\n                useExisting: forwardRef(( /**\n                 * @return {?}\n                 */() => SlickCarouselComponent)),\n                multi: true\n            }]), ɵngcc0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function SlickCarouselComponent_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵprojectionDef();\n        ɵngcc0.ɵɵprojection(0);\n    } }, encapsulation: 2 });\n/** @nocollapse */\nSlickCarouselComponent.ctorParameters = () => [\n    { type: ElementRef },\n    { type: NgZone },\n    { type: String, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }\n];\nSlickCarouselComponent.propDecorators = {\n    config: [{ type: Input }],\n    afterChange: [{ type: Output }],\n    beforeChange: [{ type: Output }],\n    breakpoint: [{ type: Output }],\n    destroy: [{ type: Output }],\n    init: [{ type: Output }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(SlickCarouselComponent, [{\n        type: Component,\n        args: [{\n                selector: 'ngx-slick-carousel',\n                exportAs: 'slick-carousel',\n                providers: [{\n                        provide: NG_VALUE_ACCESSOR,\n                        useExisting: forwardRef(( /**\n                         * @return {?}\n                         */() => SlickCarouselComponent)),\n                        multi: true\n                    }],\n                template: '<ng-content></ng-content>'\n            }]\n    }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.NgZone }, { type: String, decorators: [{\n                type: Inject,\n                args: [PLATFORM_ID]\n            }] }]; }, { afterChange: [{\n            type: Output\n        }], beforeChange: [{\n            type: Output\n        }], breakpoint: [{\n            type: Output\n        }], destroy: [{\n            type: Output\n        }], init: [{\n            type: Output\n        }], config: [{\n            type: Input\n        }] }); })();\nif (false) {\n    /** @type {?} */\n    SlickCarouselComponent.prototype.config;\n    /** @type {?} */\n    SlickCarouselComponent.prototype.afterChange;\n    /** @type {?} */\n    SlickCarouselComponent.prototype.beforeChange;\n    /** @type {?} */\n    SlickCarouselComponent.prototype.breakpoint;\n    /** @type {?} */\n    SlickCarouselComponent.prototype.destroy;\n    /** @type {?} */\n    SlickCarouselComponent.prototype.init;\n    /** @type {?} */\n    SlickCarouselComponent.prototype.$instance;\n    /**\n     * @type {?}\n     * @private\n     */\n    SlickCarouselComponent.prototype.currentIndex;\n    /** @type {?} */\n    SlickCarouselComponent.prototype.slides;\n    /** @type {?} */\n    SlickCarouselComponent.prototype.initialized;\n    /**\n     * @type {?}\n     * @private\n     */\n    SlickCarouselComponent.prototype._removedSlides;\n    /**\n     * @type {?}\n     * @private\n     */\n    SlickCarouselComponent.prototype._addedSlides;\n    /**\n     * @type {?}\n     * @private\n     */\n    SlickCarouselComponent.prototype.el;\n    /**\n     * @type {?}\n     * @private\n     */\n    SlickCarouselComponent.prototype.zone;\n    /**\n     * @type {?}\n     * @private\n     */\n    SlickCarouselComponent.prototype.platformId;\n}\nclass SlickItemDirective {\n    /**\n     * @param {?} el\n     * @param {?} platformId\n     * @param {?} carousel\n     */\n    constructor(el, platformId, carousel) {\n        this.el = el;\n        this.platformId = platformId;\n        this.carousel = carousel;\n    }\n    /**\n     * @return {?}\n     */\n    ngOnInit() {\n        if (isPlatformBrowser(this.platformId)) {\n            this.carousel.addSlide(this);\n        }\n    }\n    /**\n     * @return {?}\n     */\n    ngOnDestroy() {\n        if (isPlatformBrowser(this.platformId)) {\n            this.carousel.removeSlide(this);\n        }\n    }\n}\nSlickItemDirective.ɵfac = function SlickItemDirective_Factory(t) { return new (t || SlickItemDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(PLATFORM_ID), ɵngcc0.ɵɵdirectiveInject(SlickCarouselComponent, 1)); };\nSlickItemDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: SlickItemDirective, selectors: [[\"\", \"ngxSlickItem\", \"\"]] });\n/** @nocollapse */\nSlickItemDirective.ctorParameters = () => [\n    { type: ElementRef },\n    { type: String, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },\n    { type: SlickCarouselComponent, decorators: [{ type: Host }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(SlickItemDirective, [{\n        type: Directive,\n        args: [{\n                selector: '[ngxSlickItem]'\n            }]\n    }], function () { return [{ type: ɵngcc0.ElementRef }, { type: String, decorators: [{\n                type: Inject,\n                args: [PLATFORM_ID]\n            }] }, { type: SlickCarouselComponent, decorators: [{\n                type: Host\n            }] }]; }, null); })();\nif (false) {\n    /** @type {?} */\n    SlickItemDirective.prototype.el;\n    /**\n     * @type {?}\n     * @private\n     */\n    SlickItemDirective.prototype.platformId;\n    /**\n     * @type {?}\n     * @private\n     */\n    SlickItemDirective.prototype.carousel;\n}\n\n/**\n * @fileoverview added by tsickle\n * Generated from: index.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass SlickCarouselModule {\n}\nSlickCarouselModule.ɵfac = function SlickCarouselModule_Factory(t) { return new (t || SlickCarouselModule)(); };\nSlickCarouselModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: SlickCarouselModule });\nSlickCarouselModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [[\n            CommonModule\n        ]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(SlickCarouselModule, [{\n        type: NgModule,\n        args: [{\n                imports: [\n                    CommonModule\n                ],\n                declarations: [\n                    SlickCarouselComponent,\n                    SlickItemDirective,\n                ],\n                exports: [\n                    SlickCarouselComponent,\n                    SlickItemDirective,\n                ]\n            }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(SlickCarouselModule, { declarations: function () { return [SlickCarouselComponent, SlickItemDirective]; }, imports: function () { return [CommonModule]; }, exports: function () { return [SlickCarouselComponent, SlickItemDirective]; } }); })();\n\n/**\n * @fileoverview added by tsickle\n * Generated from: ngx-slick-carousel.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\nexport { SlickCarouselComponent, SlickCarouselModule, SlickItemDirective };\n\n","import { Subject } from './Subject';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nexport class BehaviorSubject extends Subject {\n    constructor(_value) {\n        super();\n        this._value = _value;\n    }\n    get value() {\n        return this.getValue();\n    }\n    _subscribe(subscriber) {\n        const subscription = super._subscribe(subscriber);\n        if (subscription && !subscription.closed) {\n            subscriber.next(this._value);\n        }\n        return subscription;\n    }\n    getValue() {\n        if (this.hasError) {\n            throw this.thrownError;\n        }\n        else if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        else {\n            return this._value;\n        }\n    }\n    next(value) {\n        super.next(this._value = value);\n    }\n}\n","import { canReportError } from './util/canReportError';\nimport { toSubscriber } from './util/toSubscriber';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nexport class Observable {\n    constructor(subscribe) {\n        this._isScalar = false;\n        if (subscribe) {\n            this._subscribe = subscribe;\n        }\n    }\n    lift(operator) {\n        const observable = new Observable();\n        observable.source = this;\n        observable.operator = operator;\n        return observable;\n    }\n    subscribe(observerOrNext, error, complete) {\n        const { operator } = this;\n        const sink = toSubscriber(observerOrNext, error, complete);\n        if (operator) {\n            sink.add(operator.call(sink, this.source));\n        }\n        else {\n            sink.add(this.source || (config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?\n                this._subscribe(sink) :\n                this._trySubscribe(sink));\n        }\n        if (config.useDeprecatedSynchronousErrorHandling) {\n            if (sink.syncErrorThrowable) {\n                sink.syncErrorThrowable = false;\n                if (sink.syncErrorThrown) {\n                    throw sink.syncErrorValue;\n                }\n            }\n        }\n        return sink;\n    }\n    _trySubscribe(sink) {\n        try {\n            return this._subscribe(sink);\n        }\n        catch (err) {\n            if (config.useDeprecatedSynchronousErrorHandling) {\n                sink.syncErrorThrown = true;\n                sink.syncErrorValue = err;\n            }\n            if (canReportError(sink)) {\n                sink.error(err);\n            }\n            else {\n                console.warn(err);\n            }\n        }\n    }\n    forEach(next, promiseCtor) {\n        promiseCtor = getPromiseCtor(promiseCtor);\n        return new promiseCtor((resolve, reject) => {\n            let subscription;\n            subscription = this.subscribe((value) => {\n                try {\n                    next(value);\n                }\n                catch (err) {\n                    reject(err);\n                    if (subscription) {\n                        subscription.unsubscribe();\n                    }\n                }\n            }, reject, resolve);\n        });\n    }\n    _subscribe(subscriber) {\n        const { source } = this;\n        return source && source.subscribe(subscriber);\n    }\n    [Symbol_observable]() {\n        return this;\n    }\n    pipe(...operations) {\n        if (operations.length === 0) {\n            return this;\n        }\n        return pipeFromArray(operations)(this);\n    }\n    toPromise(promiseCtor) {\n        promiseCtor = getPromiseCtor(promiseCtor);\n        return new promiseCtor((resolve, reject) => {\n            let value;\n            this.subscribe((x) => value = x, (err) => reject(err), () => resolve(value));\n        });\n    }\n}\nObservable.create = (subscribe) => {\n    return new Observable(subscribe);\n};\nfunction getPromiseCtor(promiseCtor) {\n    if (!promiseCtor) {\n        promiseCtor = config.Promise || Promise;\n    }\n    if (!promiseCtor) {\n        throw new Error('no Promise impl found');\n    }\n    return promiseCtor;\n}\n","import { Subscriber } from '../Subscriber';\nimport { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';\nimport { empty as emptyObserver } from '../Observer';\nexport function toSubscriber(nextOrObserver, error, complete) {\n    if (nextOrObserver) {\n        if (nextOrObserver instanceof Subscriber) {\n            return nextOrObserver;\n        }\n        if (nextOrObserver[rxSubscriberSymbol]) {\n            return nextOrObserver[rxSubscriberSymbol]();\n        }\n    }\n    if (!nextOrObserver && !error && !complete) {\n        return new Subscriber(emptyObserver);\n    }\n    return new Subscriber(nextOrObserver, error, complete);\n}\n","import { Subscriber } from '../Subscriber';\nexport function canReportError(observer) {\n    while (observer) {\n        const { closed, destination, isStopped } = observer;\n        if (closed || isStopped) {\n            return false;\n        }\n        else if (destination && destination instanceof Subscriber) {\n            observer = destination;\n        }\n        else {\n            observer = null;\n        }\n    }\n    return true;\n}\n","import { identity } from './identity';\nexport function pipe(...fns) {\n    return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n    if (fns.length === 0) {\n        return identity;\n    }\n    if (fns.length === 1) {\n        return fns[0];\n    }\n    return function piped(input) {\n        return fns.reduce((prev, fn) => fn(prev), input);\n    };\n}\n","import { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nexport const empty = {\n    closed: true,\n    next(value) { },\n    error(err) {\n        if (config.useDeprecatedSynchronousErrorHandling) {\n            throw err;\n        }\n        else {\n            hostReportError(err);\n        }\n    },\n    complete() { }\n};\n","import { Subscriber } from './Subscriber';\nexport class OuterSubscriber extends Subscriber {\n    notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n        this.destination.next(innerValue);\n    }\n    notifyError(error, innerSub) {\n        this.destination.error(error);\n    }\n    notifyComplete(innerSub) {\n        this.destination.complete();\n    }\n}\n","import { Subscription } from './Subscription';\nexport class SubjectSubscription extends Subscription {\n    constructor(subject, subscriber) {\n        super();\n        this.subject = subject;\n        this.subscriber = subscriber;\n        this.closed = false;\n    }\n    unsubscribe() {\n        if (this.closed) {\n            return;\n        }\n        this.closed = true;\n        const subject = this.subject;\n        const observers = subject.observers;\n        this.subject = null;\n        if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {\n            return;\n        }\n        const subscriberIndex = observers.indexOf(this.subscriber);\n        if (subscriberIndex !== -1) {\n            observers.splice(subscriberIndex, 1);\n        }\n    }\n}\n","import { Observable } from './Observable';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { SubjectSubscription } from './SubjectSubscription';\nimport { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';\nexport class SubjectSubscriber extends Subscriber {\n    constructor(destination) {\n        super(destination);\n        this.destination = destination;\n    }\n}\nexport class Subject extends Observable {\n    constructor() {\n        super();\n        this.observers = [];\n        this.closed = false;\n        this.isStopped = false;\n        this.hasError = false;\n        this.thrownError = null;\n    }\n    [rxSubscriberSymbol]() {\n        return new SubjectSubscriber(this);\n    }\n    lift(operator) {\n        const subject = new AnonymousSubject(this, this);\n        subject.operator = operator;\n        return subject;\n    }\n    next(value) {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        if (!this.isStopped) {\n            const { observers } = this;\n            const len = observers.length;\n            const copy = observers.slice();\n            for (let i = 0; i < len; i++) {\n                copy[i].next(value);\n            }\n        }\n    }\n    error(err) {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        this.hasError = true;\n        this.thrownError = err;\n        this.isStopped = true;\n        const { observers } = this;\n        const len = observers.length;\n        const copy = observers.slice();\n        for (let i = 0; i < len; i++) {\n            copy[i].error(err);\n        }\n        this.observers.length = 0;\n    }\n    complete() {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        this.isStopped = true;\n        const { observers } = this;\n        const len = observers.length;\n        const copy = observers.slice();\n        for (let i = 0; i < len; i++) {\n            copy[i].complete();\n        }\n        this.observers.length = 0;\n    }\n    unsubscribe() {\n        this.isStopped = true;\n        this.closed = true;\n        this.observers = null;\n    }\n    _trySubscribe(subscriber) {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        else {\n            return super._trySubscribe(subscriber);\n        }\n    }\n    _subscribe(subscriber) {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        else if (this.hasError) {\n            subscriber.error(this.thrownError);\n            return Subscription.EMPTY;\n        }\n        else if (this.isStopped) {\n            subscriber.complete();\n            return Subscription.EMPTY;\n        }\n        else {\n            this.observers.push(subscriber);\n            return new SubjectSubscription(this, subscriber);\n        }\n    }\n    asObservable() {\n        const observable = new Observable();\n        observable.source = this;\n        return observable;\n    }\n}\nSubject.create = (destination, source) => {\n    return new AnonymousSubject(destination, source);\n};\nexport class AnonymousSubject extends Subject {\n    constructor(destination, source) {\n        super();\n        this.destination = destination;\n        this.source = source;\n    }\n    next(value) {\n        const { destination } = this;\n        if (destination && destination.next) {\n            destination.next(value);\n        }\n    }\n    error(err) {\n        const { destination } = this;\n        if (destination && destination.error) {\n            this.destination.error(err);\n        }\n    }\n    complete() {\n        const { destination } = this;\n        if (destination && destination.complete) {\n            this.destination.complete();\n        }\n    }\n    _subscribe(subscriber) {\n        const { source } = this;\n        if (source) {\n            return this.source.subscribe(subscriber);\n        }\n        else {\n            return Subscription.EMPTY;\n        }\n    }\n}\n","import { isFunction } from './util/isFunction';\nimport { empty as emptyObserver } from './Observer';\nimport { Subscription } from './Subscription';\nimport { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';\nimport { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nexport class Subscriber extends Subscription {\n    constructor(destinationOrNext, error, complete) {\n        super();\n        this.syncErrorValue = null;\n        this.syncErrorThrown = false;\n        this.syncErrorThrowable = false;\n        this.isStopped = false;\n        switch (arguments.length) {\n            case 0:\n                this.destination = emptyObserver;\n                break;\n            case 1:\n                if (!destinationOrNext) {\n                    this.destination = emptyObserver;\n                    break;\n                }\n                if (typeof destinationOrNext === 'object') {\n                    if (destinationOrNext instanceof Subscriber) {\n                        this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;\n                        this.destination = destinationOrNext;\n                        destinationOrNext.add(this);\n                    }\n                    else {\n                        this.syncErrorThrowable = true;\n                        this.destination = new SafeSubscriber(this, destinationOrNext);\n                    }\n                    break;\n                }\n            default:\n                this.syncErrorThrowable = true;\n                this.destination = new SafeSubscriber(this, destinationOrNext, error, complete);\n                break;\n        }\n    }\n    [rxSubscriberSymbol]() { return this; }\n    static create(next, error, complete) {\n        const subscriber = new Subscriber(next, error, complete);\n        subscriber.syncErrorThrowable = false;\n        return subscriber;\n    }\n    next(value) {\n        if (!this.isStopped) {\n            this._next(value);\n        }\n    }\n    error(err) {\n        if (!this.isStopped) {\n            this.isStopped = true;\n            this._error(err);\n        }\n    }\n    complete() {\n        if (!this.isStopped) {\n            this.isStopped = true;\n            this._complete();\n        }\n    }\n    unsubscribe() {\n        if (this.closed) {\n            return;\n        }\n        this.isStopped = true;\n        super.unsubscribe();\n    }\n    _next(value) {\n        this.destination.next(value);\n    }\n    _error(err) {\n        this.destination.error(err);\n        this.unsubscribe();\n    }\n    _complete() {\n        this.destination.complete();\n        this.unsubscribe();\n    }\n    _unsubscribeAndRecycle() {\n        const { _parentOrParents } = this;\n        this._parentOrParents = null;\n        this.unsubscribe();\n        this.closed = false;\n        this.isStopped = false;\n        this._parentOrParents = _parentOrParents;\n        return this;\n    }\n}\nexport class SafeSubscriber extends Subscriber {\n    constructor(_parentSubscriber, observerOrNext, error, complete) {\n        super();\n        this._parentSubscriber = _parentSubscriber;\n        let next;\n        let context = this;\n        if (isFunction(observerOrNext)) {\n            next = observerOrNext;\n        }\n        else if (observerOrNext) {\n            next = observerOrNext.next;\n            error = observerOrNext.error;\n            complete = observerOrNext.complete;\n            if (observerOrNext !== emptyObserver) {\n                context = Object.create(observerOrNext);\n                if (isFunction(context.unsubscribe)) {\n                    this.add(context.unsubscribe.bind(context));\n                }\n                context.unsubscribe = this.unsubscribe.bind(this);\n            }\n        }\n        this._context = context;\n        this._next = next;\n        this._error = error;\n        this._complete = complete;\n    }\n    next(value) {\n        if (!this.isStopped && this._next) {\n            const { _parentSubscriber } = this;\n            if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n                this.__tryOrUnsub(this._next, value);\n            }\n            else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {\n                this.unsubscribe();\n            }\n        }\n    }\n    error(err) {\n        if (!this.isStopped) {\n            const { _parentSubscriber } = this;\n            const { useDeprecatedSynchronousErrorHandling } = config;\n            if (this._error) {\n                if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n                    this.__tryOrUnsub(this._error, err);\n                    this.unsubscribe();\n                }\n                else {\n                    this.__tryOrSetError(_parentSubscriber, this._error, err);\n                    this.unsubscribe();\n                }\n            }\n            else if (!_parentSubscriber.syncErrorThrowable) {\n                this.unsubscribe();\n                if (useDeprecatedSynchronousErrorHandling) {\n                    throw err;\n                }\n                hostReportError(err);\n            }\n            else {\n                if (useDeprecatedSynchronousErrorHandling) {\n                    _parentSubscriber.syncErrorValue = err;\n                    _parentSubscriber.syncErrorThrown = true;\n                }\n                else {\n                    hostReportError(err);\n                }\n                this.unsubscribe();\n            }\n        }\n    }\n    complete() {\n        if (!this.isStopped) {\n            const { _parentSubscriber } = this;\n            if (this._complete) {\n                const wrappedComplete = () => this._complete.call(this._context);\n                if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n                    this.__tryOrUnsub(wrappedComplete);\n                    this.unsubscribe();\n                }\n                else {\n                    this.__tryOrSetError(_parentSubscriber, wrappedComplete);\n                    this.unsubscribe();\n                }\n            }\n            else {\n                this.unsubscribe();\n            }\n        }\n    }\n    __tryOrUnsub(fn, value) {\n        try {\n            fn.call(this._context, value);\n        }\n        catch (err) {\n            this.unsubscribe();\n            if (config.useDeprecatedSynchronousErrorHandling) {\n                throw err;\n            }\n            else {\n                hostReportError(err);\n            }\n        }\n    }\n    __tryOrSetError(parent, fn, value) {\n        if (!config.useDeprecatedSynchronousErrorHandling) {\n            throw new Error('bad call');\n        }\n        try {\n            fn.call(this._context, value);\n        }\n        catch (err) {\n            if (config.useDeprecatedSynchronousErrorHandling) {\n                parent.syncErrorValue = err;\n                parent.syncErrorThrown = true;\n                return true;\n            }\n            else {\n                hostReportError(err);\n                return true;\n            }\n        }\n        return false;\n    }\n    _unsubscribe() {\n        const { _parentSubscriber } = this;\n        this._context = null;\n        this._parentSubscriber = null;\n        _parentSubscriber.unsubscribe();\n    }\n}\n","const UnsubscriptionErrorImpl = (() => {\n    function UnsubscriptionErrorImpl(errors) {\n        Error.call(this);\n        this.message = errors ?\n            `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n  ')}` : '';\n        this.name = 'UnsubscriptionError';\n        this.errors = errors;\n        return this;\n    }\n    UnsubscriptionErrorImpl.prototype = Object.create(Error.prototype);\n    return UnsubscriptionErrorImpl;\n})();\nexport const UnsubscriptionError = UnsubscriptionErrorImpl;\n","import { isArray } from './util/isArray';\nimport { isObject } from './util/isObject';\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nexport class Subscription {\n    constructor(unsubscribe) {\n        this.closed = false;\n        this._parentOrParents = null;\n        this._subscriptions = null;\n        if (unsubscribe) {\n            this._ctorUnsubscribe = true;\n            this._unsubscribe = unsubscribe;\n        }\n    }\n    unsubscribe() {\n        let errors;\n        if (this.closed) {\n            return;\n        }\n        let { _parentOrParents, _ctorUnsubscribe, _unsubscribe, _subscriptions } = this;\n        this.closed = true;\n        this._parentOrParents = null;\n        this._subscriptions = null;\n        if (_parentOrParents instanceof Subscription) {\n            _parentOrParents.remove(this);\n        }\n        else if (_parentOrParents !== null) {\n            for (let index = 0; index < _parentOrParents.length; ++index) {\n                const parent = _parentOrParents[index];\n                parent.remove(this);\n            }\n        }\n        if (isFunction(_unsubscribe)) {\n            if (_ctorUnsubscribe) {\n                this._unsubscribe = undefined;\n            }\n            try {\n                _unsubscribe.call(this);\n            }\n            catch (e) {\n                errors = e instanceof UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];\n            }\n        }\n        if (isArray(_subscriptions)) {\n            let index = -1;\n            let len = _subscriptions.length;\n            while (++index < len) {\n                const sub = _subscriptions[index];\n                if (isObject(sub)) {\n                    try {\n                        sub.unsubscribe();\n                    }\n                    catch (e) {\n                        errors = errors || [];\n                        if (e instanceof UnsubscriptionError) {\n                            errors = errors.concat(flattenUnsubscriptionErrors(e.errors));\n                        }\n                        else {\n                            errors.push(e);\n                        }\n                    }\n                }\n            }\n        }\n        if (errors) {\n            throw new UnsubscriptionError(errors);\n        }\n    }\n    add(teardown) {\n        let subscription = teardown;\n        if (!teardown) {\n            return Subscription.EMPTY;\n        }\n        switch (typeof teardown) {\n            case 'function':\n                subscription = new Subscription(teardown);\n            case 'object':\n                if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {\n                    return subscription;\n                }\n                else if (this.closed) {\n                    subscription.unsubscribe();\n                    return subscription;\n                }\n                else if (!(subscription instanceof Subscription)) {\n                    const tmp = subscription;\n                    subscription = new Subscription();\n                    subscription._subscriptions = [tmp];\n                }\n                break;\n            default: {\n                throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');\n            }\n        }\n        let { _parentOrParents } = subscription;\n        if (_parentOrParents === null) {\n            subscription._parentOrParents = this;\n        }\n        else if (_parentOrParents instanceof Subscription) {\n            if (_parentOrParents === this) {\n                return subscription;\n            }\n            subscription._parentOrParents = [_parentOrParents, this];\n        }\n        else if (_parentOrParents.indexOf(this) === -1) {\n            _parentOrParents.push(this);\n        }\n        else {\n            return subscription;\n        }\n        const subscriptions = this._subscriptions;\n        if (subscriptions === null) {\n            this._subscriptions = [subscription];\n        }\n        else {\n            subscriptions.push(subscription);\n        }\n        return subscription;\n    }\n    remove(subscription) {\n        const subscriptions = this._subscriptions;\n        if (subscriptions) {\n            const subscriptionIndex = subscriptions.indexOf(subscription);\n            if (subscriptionIndex !== -1) {\n                subscriptions.splice(subscriptionIndex, 1);\n            }\n        }\n    }\n}\nSubscription.EMPTY = (function (empty) {\n    empty.closed = true;\n    return empty;\n}(new Subscription()));\nfunction flattenUnsubscriptionErrors(errors) {\n    return errors.reduce((errs, err) => errs.concat((err instanceof UnsubscriptionError) ? err.errors : err), []);\n}\n","let _enable_super_gross_mode_that_will_cause_bad_things = false;\nexport const config = {\n    Promise: undefined,\n    set useDeprecatedSynchronousErrorHandling(value) {\n        if (value) {\n            const error = new Error();\n            console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \\n' + error.stack);\n        }\n        else if (_enable_super_gross_mode_that_will_cause_bad_things) {\n            console.log('RxJS: Back to a better error behavior. Thank you. <3');\n        }\n        _enable_super_gross_mode_that_will_cause_bad_things = value;\n    },\n    get useDeprecatedSynchronousErrorHandling() {\n        return _enable_super_gross_mode_that_will_cause_bad_things;\n    },\n};\n","import { Subscriber } from './Subscriber';\nimport { Observable } from './Observable';\nimport { subscribeTo } from './util/subscribeTo';\nexport class SimpleInnerSubscriber extends Subscriber {\n    constructor(parent) {\n        super();\n        this.parent = parent;\n    }\n    _next(value) {\n        this.parent.notifyNext(value);\n    }\n    _error(error) {\n        this.parent.notifyError(error);\n        this.unsubscribe();\n    }\n    _complete() {\n        this.parent.notifyComplete();\n        this.unsubscribe();\n    }\n}\nexport class ComplexInnerSubscriber extends Subscriber {\n    constructor(parent, outerValue, outerIndex) {\n        super();\n        this.parent = parent;\n        this.outerValue = outerValue;\n        this.outerIndex = outerIndex;\n    }\n    _next(value) {\n        this.parent.notifyNext(this.outerValue, value, this.outerIndex, this);\n    }\n    _error(error) {\n        this.parent.notifyError(error);\n        this.unsubscribe();\n    }\n    _complete() {\n        this.parent.notifyComplete(this);\n        this.unsubscribe();\n    }\n}\nexport class SimpleOuterSubscriber extends Subscriber {\n    notifyNext(innerValue) {\n        this.destination.next(innerValue);\n    }\n    notifyError(err) {\n        this.destination.error(err);\n    }\n    notifyComplete() {\n        this.destination.complete();\n    }\n}\nexport class ComplexOuterSubscriber extends Subscriber {\n    notifyNext(_outerValue, innerValue, _outerIndex, _innerSub) {\n        this.destination.next(innerValue);\n    }\n    notifyError(error) {\n        this.destination.error(error);\n    }\n    notifyComplete(_innerSub) {\n        this.destination.complete();\n    }\n}\nexport function innerSubscribe(result, innerSubscriber) {\n    if (innerSubscriber.closed) {\n        return undefined;\n    }\n    if (result instanceof Observable) {\n        return result.subscribe(innerSubscriber);\n    }\n    let subscription;\n    try {\n        subscription = subscribeTo(result)(innerSubscriber);\n    }\n    catch (error) {\n        innerSubscriber.error(error);\n    }\n    return subscription;\n}\n","import { SubjectSubscriber } from '../Subject';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nexport class ConnectableObservable extends Observable {\n    constructor(source, subjectFactory) {\n        super();\n        this.source = source;\n        this.subjectFactory = subjectFactory;\n        this._refCount = 0;\n        this._isComplete = false;\n    }\n    _subscribe(subscriber) {\n        return this.getSubject().subscribe(subscriber);\n    }\n    getSubject() {\n        const subject = this._subject;\n        if (!subject || subject.isStopped) {\n            this._subject = this.subjectFactory();\n        }\n        return this._subject;\n    }\n    connect() {\n        let connection = this._connection;\n        if (!connection) {\n            this._isComplete = false;\n            connection = this._connection = new Subscription();\n            connection.add(this.source\n                .subscribe(new ConnectableSubscriber(this.getSubject(), this)));\n            if (connection.closed) {\n                this._connection = null;\n                connection = Subscription.EMPTY;\n            }\n        }\n        return connection;\n    }\n    refCount() {\n        return higherOrderRefCount()(this);\n    }\n}\nexport const connectableObservableDescriptor = (() => {\n    const connectableProto = ConnectableObservable.prototype;\n    return {\n        operator: { value: null },\n        _refCount: { value: 0, writable: true },\n        _subject: { value: null, writable: true },\n        _connection: { value: null, writable: true },\n        _subscribe: { value: connectableProto._subscribe },\n        _isComplete: { value: connectableProto._isComplete, writable: true },\n        getSubject: { value: connectableProto.getSubject },\n        connect: { value: connectableProto.connect },\n        refCount: { value: connectableProto.refCount }\n    };\n})();\nclass ConnectableSubscriber extends SubjectSubscriber {\n    constructor(destination, connectable) {\n        super(destination);\n        this.connectable = connectable;\n    }\n    _error(err) {\n        this._unsubscribe();\n        super._error(err);\n    }\n    _complete() {\n        this.connectable._isComplete = true;\n        this._unsubscribe();\n        super._complete();\n    }\n    _unsubscribe() {\n        const connectable = this.connectable;\n        if (connectable) {\n            this.connectable = null;\n            const connection = connectable._connection;\n            connectable._refCount = 0;\n            connectable._subject = null;\n            connectable._connection = null;\n            if (connection) {\n                connection.unsubscribe();\n            }\n        }\n    }\n}\nclass RefCountOperator {\n    constructor(connectable) {\n        this.connectable = connectable;\n    }\n    call(subscriber, source) {\n        const { connectable } = this;\n        connectable._refCount++;\n        const refCounter = new RefCountSubscriber(subscriber, connectable);\n        const subscription = source.subscribe(refCounter);\n        if (!refCounter.closed) {\n            refCounter.connection = connectable.connect();\n        }\n        return subscription;\n    }\n}\nclass RefCountSubscriber extends Subscriber {\n    constructor(destination, connectable) {\n        super(destination);\n        this.connectable = connectable;\n    }\n    _unsubscribe() {\n        const { connectable } = this;\n        if (!connectable) {\n            this.connection = null;\n            return;\n        }\n        this.connectable = null;\n        const refCount = connectable._refCount;\n        if (refCount <= 0) {\n            this.connection = null;\n            return;\n        }\n        connectable._refCount = refCount - 1;\n        if (refCount > 1) {\n            this.connection = null;\n            return;\n        }\n        const { connection } = this;\n        const sharedConnection = connectable._connection;\n        this.connection = null;\n        if (sharedConnection && (!connection || sharedConnection === connection)) {\n            sharedConnection.unsubscribe();\n        }\n    }\n}\n","import { isScheduler } from '../util/isScheduler';\nimport { isArray } from '../util/isArray';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { fromArray } from './fromArray';\nconst NONE = {};\nexport function combineLatest(...observables) {\n    let resultSelector = undefined;\n    let scheduler = undefined;\n    if (isScheduler(observables[observables.length - 1])) {\n        scheduler = observables.pop();\n    }\n    if (typeof observables[observables.length - 1] === 'function') {\n        resultSelector = observables.pop();\n    }\n    if (observables.length === 1 && isArray(observables[0])) {\n        observables = observables[0];\n    }\n    return fromArray(observables, scheduler).lift(new CombineLatestOperator(resultSelector));\n}\nexport class CombineLatestOperator {\n    constructor(resultSelector) {\n        this.resultSelector = resultSelector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));\n    }\n}\nexport class CombineLatestSubscriber extends OuterSubscriber {\n    constructor(destination, resultSelector) {\n        super(destination);\n        this.resultSelector = resultSelector;\n        this.active = 0;\n        this.values = [];\n        this.observables = [];\n    }\n    _next(observable) {\n        this.values.push(NONE);\n        this.observables.push(observable);\n    }\n    _complete() {\n        const observables = this.observables;\n        const len = observables.length;\n        if (len === 0) {\n            this.destination.complete();\n        }\n        else {\n            this.active = len;\n            this.toRespond = len;\n            for (let i = 0; i < len; i++) {\n                const observable = observables[i];\n                this.add(subscribeToResult(this, observable, undefined, i));\n            }\n        }\n    }\n    notifyComplete(unused) {\n        if ((this.active -= 1) === 0) {\n            this.destination.complete();\n        }\n    }\n    notifyNext(_outerValue, innerValue, outerIndex) {\n        const values = this.values;\n        const oldVal = values[outerIndex];\n        const toRespond = !this.toRespond\n            ? 0\n            : oldVal === NONE ? --this.toRespond : this.toRespond;\n        values[outerIndex] = innerValue;\n        if (toRespond === 0) {\n            if (this.resultSelector) {\n                this._tryResultSelector(values);\n            }\n            else {\n                this.destination.next(values.slice());\n            }\n        }\n    }\n    _tryResultSelector(values) {\n        let result;\n        try {\n            result = this.resultSelector.apply(this, values);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.next(result);\n    }\n}\n","import { of } from './of';\nimport { concatAll } from '../operators/concatAll';\nexport function concat(...observables) {\n    return concatAll()(of(...observables));\n}\n","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n    return mergeAll(1);\n}\n","import { Observable } from '../Observable';\nexport const EMPTY = new Observable(subscriber => subscriber.complete());\nexport function empty(scheduler) {\n    return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n    return new Observable(subscriber => scheduler.schedule(() => subscriber.complete()));\n}\n","import { Observable } from '../Observable';\nimport { subscribeTo } from '../util/subscribeTo';\nimport { scheduled } from '../scheduled/scheduled';\nexport function from(input, scheduler) {\n    if (!scheduler) {\n        if (input instanceof Observable) {\n            return input;\n        }\n        return new Observable(subscribeTo(input));\n    }\n    else {\n        return scheduled(input, scheduler);\n    }\n}\n","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nexport function scheduled(input, scheduler) {\n    if (input != null) {\n        if (isInteropObservable(input)) {\n            return scheduleObservable(input, scheduler);\n        }\n        else if (isPromise(input)) {\n            return schedulePromise(input, scheduler);\n        }\n        else if (isArrayLike(input)) {\n            return scheduleArray(input, scheduler);\n        }\n        else if (isIterable(input) || typeof input === 'string') {\n            return scheduleIterable(input, scheduler);\n        }\n    }\n    throw new TypeError((input !== null && typeof input || input) + ' is not observable');\n}\n","import { observable as Symbol_observable } from '../symbol/observable';\nexport function isInteropObservable(input) {\n    return input && typeof input[Symbol_observable] === 'function';\n}\n","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function scheduleObservable(input, scheduler) {\n    return new Observable(subscriber => {\n        const sub = new Subscription();\n        sub.add(scheduler.schedule(() => {\n            const observable = input[Symbol_observable]();\n            sub.add(observable.subscribe({\n                next(value) { sub.add(scheduler.schedule(() => subscriber.next(value))); },\n                error(err) { sub.add(scheduler.schedule(() => subscriber.error(err))); },\n                complete() { sub.add(scheduler.schedule(() => subscriber.complete())); },\n            }));\n        }));\n        return sub;\n    });\n}\n","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function schedulePromise(input, scheduler) {\n    return new Observable(subscriber => {\n        const sub = new Subscription();\n        sub.add(scheduler.schedule(() => input.then(value => {\n            sub.add(scheduler.schedule(() => {\n                subscriber.next(value);\n                sub.add(scheduler.schedule(() => subscriber.complete()));\n            }));\n        }, err => {\n            sub.add(scheduler.schedule(() => subscriber.error(err)));\n        })));\n        return sub;\n    });\n}\n","import { iterator as Symbol_iterator } from '../symbol/iterator';\nexport function isIterable(input) {\n    return input && typeof input[Symbol_iterator] === 'function';\n}\n","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport function scheduleIterable(input, scheduler) {\n    if (!input) {\n        throw new Error('Iterable cannot be null');\n    }\n    return new Observable(subscriber => {\n        const sub = new Subscription();\n        let iterator;\n        sub.add(() => {\n            if (iterator && typeof iterator.return === 'function') {\n                iterator.return();\n            }\n        });\n        sub.add(scheduler.schedule(() => {\n            iterator = input[Symbol_iterator]();\n            sub.add(scheduler.schedule(function () {\n                if (subscriber.closed) {\n                    return;\n                }\n                let value;\n                let done;\n                try {\n                    const result = iterator.next();\n                    value = result.value;\n                    done = result.done;\n                }\n                catch (err) {\n                    subscriber.error(err);\n                    return;\n                }\n                if (done) {\n                    subscriber.complete();\n                }\n                else {\n                    subscriber.next(value);\n                    this.schedule();\n                }\n            }));\n        }));\n        return sub;\n    });\n}\n","import { Observable } from '../Observable';\nimport { subscribeToArray } from '../util/subscribeToArray';\nimport { scheduleArray } from '../scheduled/scheduleArray';\nexport function fromArray(input, scheduler) {\n    if (!scheduler) {\n        return new Observable(subscribeToArray(input));\n    }\n    else {\n        return scheduleArray(input, scheduler);\n    }\n}\n","import { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { isFunction } from '../util/isFunction';\nimport { map } from '../operators/map';\nconst toString = (() => Object.prototype.toString)();\nexport function fromEvent(target, eventName, options, resultSelector) {\n    if (isFunction(options)) {\n        resultSelector = options;\n        options = undefined;\n    }\n    if (resultSelector) {\n        return fromEvent(target, eventName, options).pipe(map(args => isArray(args) ? resultSelector(...args) : resultSelector(args)));\n    }\n    return new Observable(subscriber => {\n        function handler(e) {\n            if (arguments.length > 1) {\n                subscriber.next(Array.prototype.slice.call(arguments));\n            }\n            else {\n                subscriber.next(e);\n            }\n        }\n        setupSubscription(target, eventName, handler, subscriber, options);\n    });\n}\nfunction setupSubscription(sourceObj, eventName, handler, subscriber, options) {\n    let unsubscribe;\n    if (isEventTarget(sourceObj)) {\n        const source = sourceObj;\n        sourceObj.addEventListener(eventName, handler, options);\n        unsubscribe = () => source.removeEventListener(eventName, handler, options);\n    }\n    else if (isJQueryStyleEventEmitter(sourceObj)) {\n        const source = sourceObj;\n        sourceObj.on(eventName, handler);\n        unsubscribe = () => source.off(eventName, handler);\n    }\n    else if (isNodeStyleEventEmitter(sourceObj)) {\n        const source = sourceObj;\n        sourceObj.addListener(eventName, handler);\n        unsubscribe = () => source.removeListener(eventName, handler);\n    }\n    else if (sourceObj && sourceObj.length) {\n        for (let i = 0, len = sourceObj.length; i < len; i++) {\n            setupSubscription(sourceObj[i], eventName, handler, subscriber, options);\n        }\n    }\n    else {\n        throw new TypeError('Invalid event target');\n    }\n    subscriber.add(unsubscribe);\n}\nfunction isNodeStyleEventEmitter(sourceObj) {\n    return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';\n}\nfunction isJQueryStyleEventEmitter(sourceObj) {\n    return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';\n}\nfunction isEventTarget(sourceObj) {\n    return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';\n}\n","import { Observable } from '../Observable';\nimport { isScheduler } from '../util/isScheduler';\nimport { mergeAll } from '../operators/mergeAll';\nimport { fromArray } from './fromArray';\nexport function merge(...observables) {\n    let concurrent = Number.POSITIVE_INFINITY;\n    let scheduler = null;\n    let last = observables[observables.length - 1];\n    if (isScheduler(last)) {\n        scheduler = observables.pop();\n        if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {\n            concurrent = observables.pop();\n        }\n    }\n    else if (typeof last === 'number') {\n        concurrent = observables.pop();\n    }\n    if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable) {\n        return observables[0];\n    }\n    return mergeAll(concurrent)(fromArray(observables, scheduler));\n}\n","import { Observable } from '../Observable';\nimport { noop } from '../util/noop';\nexport const NEVER = new Observable(noop);\nexport function never() {\n    return NEVER;\n}\n","import { isScheduler } from '../util/isScheduler';\nimport { fromArray } from './fromArray';\nimport { scheduleArray } from '../scheduled/scheduleArray';\nexport function of(...args) {\n    let scheduler = args[args.length - 1];\n    if (isScheduler(scheduler)) {\n        args.pop();\n        return scheduleArray(args, scheduler);\n    }\n    else {\n        return fromArray(args);\n    }\n}\n","import { Observable } from '../Observable';\nexport function throwError(error, scheduler) {\n    if (!scheduler) {\n        return new Observable(subscriber => subscriber.error(error));\n    }\n    else {\n        return new Observable(subscriber => scheduler.schedule(dispatch, 0, { error, subscriber }));\n    }\n}\nfunction dispatch({ error, subscriber }) {\n    subscriber.error(error);\n}\n","import { empty } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\nexport var NotificationKind;\n(function (NotificationKind) {\n    NotificationKind[\"NEXT\"] = \"N\";\n    NotificationKind[\"ERROR\"] = \"E\";\n    NotificationKind[\"COMPLETE\"] = \"C\";\n})(NotificationKind || (NotificationKind = {}));\nexport class Notification {\n    constructor(kind, value, error) {\n        this.kind = kind;\n        this.value = value;\n        this.error = error;\n        this.hasValue = kind === 'N';\n    }\n    observe(observer) {\n        switch (this.kind) {\n            case 'N':\n                return observer.next && observer.next(this.value);\n            case 'E':\n                return observer.error && observer.error(this.error);\n            case 'C':\n                return observer.complete && observer.complete();\n        }\n    }\n    do(next, error, complete) {\n        const kind = this.kind;\n        switch (kind) {\n            case 'N':\n                return next && next(this.value);\n            case 'E':\n                return error && error(this.error);\n            case 'C':\n                return complete && complete();\n        }\n    }\n    accept(nextOrObserver, error, complete) {\n        if (nextOrObserver && typeof nextOrObserver.next === 'function') {\n            return this.observe(nextOrObserver);\n        }\n        else {\n            return this.do(nextOrObserver, error, complete);\n        }\n    }\n    toObservable() {\n        const kind = this.kind;\n        switch (kind) {\n            case 'N':\n                return of(this.value);\n            case 'E':\n                return throwError(this.error);\n            case 'C':\n                return empty();\n        }\n        throw new Error('unexpected notification kind value');\n    }\n    static createNext(value) {\n        if (typeof value !== 'undefined') {\n            return new Notification('N', value);\n        }\n        return Notification.undefinedValueNotification;\n    }\n    static createError(err) {\n        return new Notification('E', undefined, err);\n    }\n    static createComplete() {\n        return Notification.completeNotification;\n    }\n}\nNotification.completeNotification = new Notification('C');\nNotification.undefinedValueNotification = new Notification('N', undefined);\n","import { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nexport function delay(delay, scheduler = async) {\n    const absoluteDelay = isDate(delay);\n    const delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);\n    return (source) => source.lift(new DelayOperator(delayFor, scheduler));\n}\nclass DelayOperator {\n    constructor(delay, scheduler) {\n        this.delay = delay;\n        this.scheduler = scheduler;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));\n    }\n}\nclass DelaySubscriber extends Subscriber {\n    constructor(destination, delay, scheduler) {\n        super(destination);\n        this.delay = delay;\n        this.scheduler = scheduler;\n        this.queue = [];\n        this.active = false;\n        this.errored = false;\n    }\n    static dispatch(state) {\n        const source = state.source;\n        const queue = source.queue;\n        const scheduler = state.scheduler;\n        const destination = state.destination;\n        while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {\n            queue.shift().notification.observe(destination);\n        }\n        if (queue.length > 0) {\n            const delay = Math.max(0, queue[0].time - scheduler.now());\n            this.schedule(state, delay);\n        }\n        else {\n            this.unsubscribe();\n            source.active = false;\n        }\n    }\n    _schedule(scheduler) {\n        this.active = true;\n        const destination = this.destination;\n        destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {\n            source: this, destination: this.destination, scheduler: scheduler\n        }));\n    }\n    scheduleNotification(notification) {\n        if (this.errored === true) {\n            return;\n        }\n        const scheduler = this.scheduler;\n        const message = new DelayMessage(scheduler.now() + this.delay, notification);\n        this.queue.push(message);\n        if (this.active === false) {\n            this._schedule(scheduler);\n        }\n    }\n    _next(value) {\n        this.scheduleNotification(Notification.createNext(value));\n    }\n    _error(err) {\n        this.errored = true;\n        this.queue = [];\n        this.destination.error(err);\n        this.unsubscribe();\n    }\n    _complete() {\n        this.scheduleNotification(Notification.createComplete());\n        this.unsubscribe();\n    }\n}\nclass DelayMessage {\n    constructor(time, notification) {\n        this.time = time;\n        this.notification = notification;\n    }\n}\n","export function isDate(value) {\n    return value instanceof Date && !isNaN(+value);\n}\n","import { Subscriber } from '../Subscriber';\nexport function filter(predicate, thisArg) {\n    return function filterOperatorFunction(source) {\n        return source.lift(new FilterOperator(predicate, thisArg));\n    };\n}\nclass FilterOperator {\n    constructor(predicate, thisArg) {\n        this.predicate = predicate;\n        this.thisArg = thisArg;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));\n    }\n}\nclass FilterSubscriber extends Subscriber {\n    constructor(destination, predicate, thisArg) {\n        super(destination);\n        this.predicate = predicate;\n        this.thisArg = thisArg;\n        this.count = 0;\n    }\n    _next(value) {\n        let result;\n        try {\n            result = this.predicate.call(this.thisArg, value, this.count++);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        if (result) {\n            this.destination.next(value);\n        }\n    }\n}\n","import { Subscriber } from '../Subscriber';\nexport function map(project, thisArg) {\n    return function mapOperation(source) {\n        if (typeof project !== 'function') {\n            throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');\n        }\n        return source.lift(new MapOperator(project, thisArg));\n    };\n}\nexport class MapOperator {\n    constructor(project, thisArg) {\n        this.project = project;\n        this.thisArg = thisArg;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));\n    }\n}\nclass MapSubscriber extends Subscriber {\n    constructor(destination, project, thisArg) {\n        super(destination);\n        this.project = project;\n        this.count = 0;\n        this.thisArg = thisArg || this;\n    }\n    _next(value) {\n        let result;\n        try {\n            result = this.project.call(this.thisArg, value, this.count++);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.next(result);\n    }\n}\n","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Number.POSITIVE_INFINITY) {\n    return mergeMap(identity, concurrent);\n}\n","import { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function mergeMap(project, resultSelector, concurrent = Number.POSITIVE_INFINITY) {\n    if (typeof resultSelector === 'function') {\n        return (source) => source.pipe(mergeMap((a, i) => from(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii))), concurrent));\n    }\n    else if (typeof resultSelector === 'number') {\n        concurrent = resultSelector;\n    }\n    return (source) => source.lift(new MergeMapOperator(project, concurrent));\n}\nexport class MergeMapOperator {\n    constructor(project, concurrent = Number.POSITIVE_INFINITY) {\n        this.project = project;\n        this.concurrent = concurrent;\n    }\n    call(observer, source) {\n        return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));\n    }\n}\nexport class MergeMapSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, project, concurrent = Number.POSITIVE_INFINITY) {\n        super(destination);\n        this.project = project;\n        this.concurrent = concurrent;\n        this.hasCompleted = false;\n        this.buffer = [];\n        this.active = 0;\n        this.index = 0;\n    }\n    _next(value) {\n        if (this.active < this.concurrent) {\n            this._tryNext(value);\n        }\n        else {\n            this.buffer.push(value);\n        }\n    }\n    _tryNext(value) {\n        let result;\n        const index = this.index++;\n        try {\n            result = this.project(value, index);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.active++;\n        this._innerSub(result);\n    }\n    _innerSub(ish) {\n        const innerSubscriber = new SimpleInnerSubscriber(this);\n        const destination = this.destination;\n        destination.add(innerSubscriber);\n        const innerSubscription = innerSubscribe(ish, innerSubscriber);\n        if (innerSubscription !== innerSubscriber) {\n            destination.add(innerSubscription);\n        }\n    }\n    _complete() {\n        this.hasCompleted = true;\n        if (this.active === 0 && this.buffer.length === 0) {\n            this.destination.complete();\n        }\n        this.unsubscribe();\n    }\n    notifyNext(innerValue) {\n        this.destination.next(innerValue);\n    }\n    notifyComplete() {\n        const buffer = this.buffer;\n        this.active--;\n        if (buffer.length > 0) {\n            this._next(buffer.shift());\n        }\n        else if (this.active === 0 && this.hasCompleted) {\n            this.destination.complete();\n        }\n    }\n}\nexport const flatMap = mergeMap;\n","import { connectableObservableDescriptor } from '../observable/ConnectableObservable';\nexport function multicast(subjectOrSubjectFactory, selector) {\n    return function multicastOperatorFunction(source) {\n        let subjectFactory;\n        if (typeof subjectOrSubjectFactory === 'function') {\n            subjectFactory = subjectOrSubjectFactory;\n        }\n        else {\n            subjectFactory = function subjectFactory() {\n                return subjectOrSubjectFactory;\n            };\n        }\n        if (typeof selector === 'function') {\n            return source.lift(new MulticastOperator(subjectFactory, selector));\n        }\n        const connectable = Object.create(source, connectableObservableDescriptor);\n        connectable.source = source;\n        connectable.subjectFactory = subjectFactory;\n        return connectable;\n    };\n}\nexport class MulticastOperator {\n    constructor(subjectFactory, selector) {\n        this.subjectFactory = subjectFactory;\n        this.selector = selector;\n    }\n    call(subscriber, source) {\n        const { selector } = this;\n        const subject = this.subjectFactory();\n        const subscription = selector(subject).subscribe(subscriber);\n        subscription.add(source.subscribe(subject));\n        return subscription;\n    }\n}\n","import { Subscriber } from '../Subscriber';\nexport function refCount() {\n    return function refCountOperatorFunction(source) {\n        return source.lift(new RefCountOperator(source));\n    };\n}\nclass RefCountOperator {\n    constructor(connectable) {\n        this.connectable = connectable;\n    }\n    call(subscriber, source) {\n        const { connectable } = this;\n        connectable._refCount++;\n        const refCounter = new RefCountSubscriber(subscriber, connectable);\n        const subscription = source.subscribe(refCounter);\n        if (!refCounter.closed) {\n            refCounter.connection = connectable.connect();\n        }\n        return subscription;\n    }\n}\nclass RefCountSubscriber extends Subscriber {\n    constructor(destination, connectable) {\n        super(destination);\n        this.connectable = connectable;\n    }\n    _unsubscribe() {\n        const { connectable } = this;\n        if (!connectable) {\n            this.connection = null;\n            return;\n        }\n        this.connectable = null;\n        const refCount = connectable._refCount;\n        if (refCount <= 0) {\n            this.connection = null;\n            return;\n        }\n        connectable._refCount = refCount - 1;\n        if (refCount > 1) {\n            this.connection = null;\n            return;\n        }\n        const { connection } = this;\n        const sharedConnection = connectable._connection;\n        this.connection = null;\n        if (sharedConnection && (!connection || sharedConnection === connection)) {\n            sharedConnection.unsubscribe();\n        }\n    }\n}\n","import { multicast } from './multicast';\nimport { refCount } from './refCount';\nimport { Subject } from '../Subject';\nfunction shareSubjectFactory() {\n    return new Subject();\n}\nexport function share() {\n    return (source) => refCount()(multicast(shareSubjectFactory)(source));\n}\n","import { concat } from '../observable/concat';\nimport { isScheduler } from '../util/isScheduler';\nexport function startWith(...array) {\n    const scheduler = array[array.length - 1];\n    if (isScheduler(scheduler)) {\n        array.pop();\n        return (source) => concat(array, source, scheduler);\n    }\n    else {\n        return (source) => concat(array, source);\n    }\n}\n","import { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function switchMap(project, resultSelector) {\n    if (typeof resultSelector === 'function') {\n        return (source) => source.pipe(switchMap((a, i) => from(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii)))));\n    }\n    return (source) => source.lift(new SwitchMapOperator(project));\n}\nclass SwitchMapOperator {\n    constructor(project) {\n        this.project = project;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));\n    }\n}\nclass SwitchMapSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, project) {\n        super(destination);\n        this.project = project;\n        this.index = 0;\n    }\n    _next(value) {\n        let result;\n        const index = this.index++;\n        try {\n            result = this.project(value, index);\n        }\n        catch (error) {\n            this.destination.error(error);\n            return;\n        }\n        this._innerSub(result);\n    }\n    _innerSub(result) {\n        const innerSubscription = this.innerSubscription;\n        if (innerSubscription) {\n            innerSubscription.unsubscribe();\n        }\n        const innerSubscriber = new SimpleInnerSubscriber(this);\n        const destination = this.destination;\n        destination.add(innerSubscriber);\n        this.innerSubscription = innerSubscribe(result, innerSubscriber);\n        if (this.innerSubscription !== innerSubscriber) {\n            destination.add(this.innerSubscription);\n        }\n    }\n    _complete() {\n        const { innerSubscription } = this;\n        if (!innerSubscription || innerSubscription.closed) {\n            super._complete();\n        }\n        this.unsubscribe();\n    }\n    _unsubscribe() {\n        this.innerSubscription = undefined;\n    }\n    notifyComplete() {\n        this.innerSubscription = undefined;\n        if (this.isStopped) {\n            super._complete();\n        }\n    }\n    notifyNext(innerValue) {\n        this.destination.next(innerValue);\n    }\n}\n","import { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nexport function take(count) {\n    return (source) => {\n        if (count === 0) {\n            return empty();\n        }\n        else {\n            return source.lift(new TakeOperator(count));\n        }\n    };\n}\nclass TakeOperator {\n    constructor(total) {\n        this.total = total;\n        if (this.total < 0) {\n            throw new ArgumentOutOfRangeError;\n        }\n    }\n    call(subscriber, source) {\n        return source.subscribe(new TakeSubscriber(subscriber, this.total));\n    }\n}\nclass TakeSubscriber extends Subscriber {\n    constructor(destination, total) {\n        super(destination);\n        this.total = total;\n        this.count = 0;\n    }\n    _next(value) {\n        const total = this.total;\n        const count = ++this.count;\n        if (count <= total) {\n            this.destination.next(value);\n            if (count === total) {\n                this.destination.complete();\n                this.unsubscribe();\n            }\n        }\n    }\n}\n","import { Subscriber } from '../Subscriber';\nimport { noop } from '../util/noop';\nimport { isFunction } from '../util/isFunction';\nexport function tap(nextOrObserver, error, complete) {\n    return function tapOperatorFunction(source) {\n        return source.lift(new DoOperator(nextOrObserver, error, complete));\n    };\n}\nclass DoOperator {\n    constructor(nextOrObserver, error, complete) {\n        this.nextOrObserver = nextOrObserver;\n        this.error = error;\n        this.complete = complete;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));\n    }\n}\nclass TapSubscriber extends Subscriber {\n    constructor(destination, observerOrNext, error, complete) {\n        super(destination);\n        this._tapNext = noop;\n        this._tapError = noop;\n        this._tapComplete = noop;\n        this._tapError = error || noop;\n        this._tapComplete = complete || noop;\n        if (isFunction(observerOrNext)) {\n            this._context = this;\n            this._tapNext = observerOrNext;\n        }\n        else if (observerOrNext) {\n            this._context = observerOrNext;\n            this._tapNext = observerOrNext.next || noop;\n            this._tapError = observerOrNext.error || noop;\n            this._tapComplete = observerOrNext.complete || noop;\n        }\n    }\n    _next(value) {\n        try {\n            this._tapNext.call(this._context, value);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.next(value);\n    }\n    _error(err) {\n        try {\n            this._tapError.call(this._context, err);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.error(err);\n    }\n    _complete() {\n        try {\n            this._tapComplete.call(this._context);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        return this.destination.complete();\n    }\n}\n","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function scheduleArray(input, scheduler) {\n    return new Observable(subscriber => {\n        const sub = new Subscription();\n        let i = 0;\n        sub.add(scheduler.schedule(function () {\n            if (i === input.length) {\n                subscriber.complete();\n                return;\n            }\n            subscriber.next(input[i++]);\n            if (!subscriber.closed) {\n                sub.add(this.schedule());\n            }\n        }));\n        return sub;\n    });\n}\n","import { Subscription } from '../Subscription';\nexport class Action extends Subscription {\n    constructor(scheduler, work) {\n        super();\n    }\n    schedule(state, delay = 0) {\n        return this;\n    }\n}\n","export class Scheduler {\n    constructor(SchedulerAction, now = Scheduler.now) {\n        this.SchedulerAction = SchedulerAction;\n        this.now = now;\n    }\n    schedule(work, delay = 0, state) {\n        return new this.SchedulerAction(this, work).schedule(state, delay);\n    }\n}\nScheduler.now = () => Date.now();\n","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n    constructor(SchedulerAction, now = Scheduler.now) {\n        super(SchedulerAction, () => {\n            if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {\n                return AsyncScheduler.delegate.now();\n            }\n            else {\n                return now();\n            }\n        });\n        this.actions = [];\n        this.active = false;\n        this.scheduled = undefined;\n    }\n    schedule(work, delay = 0, state) {\n        if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {\n            return AsyncScheduler.delegate.schedule(work, delay, state);\n        }\n        else {\n            return super.schedule(work, delay, state);\n        }\n    }\n    flush(action) {\n        const { actions } = this;\n        if (this.active) {\n            actions.push(action);\n            return;\n        }\n        let error;\n        this.active = true;\n        do {\n            if (error = action.execute(action.state, action.delay)) {\n                break;\n            }\n        } while (action = actions.shift());\n        this.active = false;\n        if (error) {\n            while (action = actions.shift()) {\n                action.unsubscribe();\n            }\n            throw error;\n        }\n    }\n}\n","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n","import { Action } from './Action';\nexport class AsyncAction extends Action {\n    constructor(scheduler, work) {\n        super(scheduler, work);\n        this.scheduler = scheduler;\n        this.work = work;\n        this.pending = false;\n    }\n    schedule(state, delay = 0) {\n        if (this.closed) {\n            return this;\n        }\n        this.state = state;\n        const id = this.id;\n        const scheduler = this.scheduler;\n        if (id != null) {\n            this.id = this.recycleAsyncId(scheduler, id, delay);\n        }\n        this.pending = true;\n        this.delay = delay;\n        this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);\n        return this;\n    }\n    requestAsyncId(scheduler, id, delay = 0) {\n        return setInterval(scheduler.flush.bind(scheduler, this), delay);\n    }\n    recycleAsyncId(scheduler, id, delay = 0) {\n        if (delay !== null && this.delay === delay && this.pending === false) {\n            return id;\n        }\n        clearInterval(id);\n        return undefined;\n    }\n    execute(state, delay) {\n        if (this.closed) {\n            return new Error('executing a cancelled action');\n        }\n        this.pending = false;\n        const error = this._execute(state, delay);\n        if (error) {\n            return error;\n        }\n        else if (this.pending === false && this.id != null) {\n            this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n        }\n    }\n    _execute(state, delay) {\n        let errored = false;\n        let errorValue = undefined;\n        try {\n            this.work(state);\n        }\n        catch (e) {\n            errored = true;\n            errorValue = !!e && e || new Error(e);\n        }\n        if (errored) {\n            this.unsubscribe();\n            return errorValue;\n        }\n    }\n    _unsubscribe() {\n        const id = this.id;\n        const scheduler = this.scheduler;\n        const actions = scheduler.actions;\n        const index = actions.indexOf(this);\n        this.work = null;\n        this.state = null;\n        this.pending = false;\n        this.scheduler = null;\n        if (index !== -1) {\n            actions.splice(index, 1);\n        }\n        if (id != null) {\n            this.id = this.recycleAsyncId(scheduler, id, null);\n        }\n        this.delay = null;\n    }\n}\n","export function getSymbolIterator() {\n    if (typeof Symbol !== 'function' || !Symbol.iterator) {\n        return '@@iterator';\n    }\n    return Symbol.iterator;\n}\nexport const iterator = getSymbolIterator();\nexport const $$iterator = iterator;\n","export const observable = (() => typeof Symbol === 'function' && Symbol.observable || '@@observable')();\n","export const rxSubscriber = (() => typeof Symbol === 'function'\n    ? Symbol('rxSubscriber')\n    : '@@rxSubscriber_' + Math.random())();\nexport const $$rxSubscriber = rxSubscriber;\n","const ArgumentOutOfRangeErrorImpl = (() => {\n    function ArgumentOutOfRangeErrorImpl() {\n        Error.call(this);\n        this.message = 'argument out of range';\n        this.name = 'ArgumentOutOfRangeError';\n        return this;\n    }\n    ArgumentOutOfRangeErrorImpl.prototype = Object.create(Error.prototype);\n    return ArgumentOutOfRangeErrorImpl;\n})();\nexport const ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;\n","const ObjectUnsubscribedErrorImpl = (() => {\n    function ObjectUnsubscribedErrorImpl() {\n        Error.call(this);\n        this.message = 'object unsubscribed';\n        this.name = 'ObjectUnsubscribedError';\n        return this;\n    }\n    ObjectUnsubscribedErrorImpl.prototype = Object.create(Error.prototype);\n    return ObjectUnsubscribedErrorImpl;\n})();\nexport const ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;\n","export function hostReportError(err) {\n    setTimeout(() => { throw err; }, 0);\n}\n","export function identity(x) {\n    return x;\n}\n","export const isArray = (() => Array.isArray || ((x) => x && typeof x.length === 'number'))();\n","export const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function');\n","export function isFunction(x) {\n    return typeof x === 'function';\n}\n","export function isObject(x) {\n    return x !== null && typeof x === 'object';\n}\n","export function isPromise(value) {\n    return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';\n}\n","export function isScheduler(value) {\n    return value && typeof value.schedule === 'function';\n}\n","export function noop() { }\n","import { subscribeToArray } from './subscribeToArray';\nimport { subscribeToPromise } from './subscribeToPromise';\nimport { subscribeToIterable } from './subscribeToIterable';\nimport { subscribeToObservable } from './subscribeToObservable';\nimport { isArrayLike } from './isArrayLike';\nimport { isPromise } from './isPromise';\nimport { isObject } from './isObject';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport const subscribeTo = (result) => {\n    if (!!result && typeof result[Symbol_observable] === 'function') {\n        return subscribeToObservable(result);\n    }\n    else if (isArrayLike(result)) {\n        return subscribeToArray(result);\n    }\n    else if (isPromise(result)) {\n        return subscribeToPromise(result);\n    }\n    else if (!!result && typeof result[Symbol_iterator] === 'function') {\n        return subscribeToIterable(result);\n    }\n    else {\n        const value = isObject(result) ? 'an invalid object' : `'${result}'`;\n        const msg = `You provided ${value} where a stream was expected.`\n            + ' You can provide an Observable, Promise, Array, or Iterable.';\n        throw new TypeError(msg);\n    }\n};\n","import { observable as Symbol_observable } from '../symbol/observable';\nexport const subscribeToObservable = (obj) => (subscriber) => {\n    const obs = obj[Symbol_observable]();\n    if (typeof obs.subscribe !== 'function') {\n        throw new TypeError('Provided object does not correctly implement Symbol.observable');\n    }\n    else {\n        return obs.subscribe(subscriber);\n    }\n};\n","import { hostReportError } from './hostReportError';\nexport const subscribeToPromise = (promise) => (subscriber) => {\n    promise.then((value) => {\n        if (!subscriber.closed) {\n            subscriber.next(value);\n            subscriber.complete();\n        }\n    }, (err) => subscriber.error(err))\n        .then(null, hostReportError);\n    return subscriber;\n};\n","import { iterator as Symbol_iterator } from '../symbol/iterator';\nexport const subscribeToIterable = (iterable) => (subscriber) => {\n    const iterator = iterable[Symbol_iterator]();\n    do {\n        let item;\n        try {\n            item = iterator.next();\n        }\n        catch (err) {\n            subscriber.error(err);\n            return subscriber;\n        }\n        if (item.done) {\n            subscriber.complete();\n            break;\n        }\n        subscriber.next(item.value);\n        if (subscriber.closed) {\n            break;\n        }\n    } while (true);\n    if (typeof iterator.return === 'function') {\n        subscriber.add(() => {\n            if (iterator.return) {\n                iterator.return();\n            }\n        });\n    }\n    return subscriber;\n};\n","export const subscribeToArray = (array) => (subscriber) => {\n    for (let i = 0, len = array.length; i < len && !subscriber.closed; i++) {\n        subscriber.next(array[i]);\n    }\n    subscriber.complete();\n};\n","import { Subscriber } from './Subscriber';\nexport class InnerSubscriber extends Subscriber {\n    constructor(parent, outerValue, outerIndex) {\n        super();\n        this.parent = parent;\n        this.outerValue = outerValue;\n        this.outerIndex = outerIndex;\n        this.index = 0;\n    }\n    _next(value) {\n        this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);\n    }\n    _error(error) {\n        this.parent.notifyError(error, this);\n        this.unsubscribe();\n    }\n    _complete() {\n        this.parent.notifyComplete(this);\n        this.unsubscribe();\n    }\n}\n","import { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeTo } from './subscribeTo';\nimport { Observable } from '../Observable';\nexport function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, innerSubscriber = new InnerSubscriber(outerSubscriber, outerValue, outerIndex)) {\n    if (innerSubscriber.closed) {\n        return undefined;\n    }\n    if (result instanceof Observable) {\n        return result.subscribe(innerSubscriber);\n    }\n    return subscribeTo(result)(innerSubscriber);\n}\n","/**\n * @license Angular v12.2.5\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { ɵDomAdapter, ɵsetRootDomAdapter, ɵparseCookieValue, ɵgetDOM, DOCUMENT, ɵPLATFORM_BROWSER_ID, XhrFactory, CommonModule } from '@angular/common';\nimport * as ɵngcc0 from '@angular/core';\nexport { ɵgetDOM } from '@angular/common';\nimport { InjectionToken, ApplicationInitStatus, APP_INITIALIZER, Injector, setTestabilityGetter, ɵglobal, Injectable, ApplicationRef, NgZone, ɵgetDebugNodeR2, NgProbeToken, Optional, Inject, ViewEncapsulation, APP_ID, RendererStyleFlags2, ɵConsole, NgModule, ɵɵdefineInjectable, ɵɵinject, forwardRef, SecurityContext, ɵallowSanitizationBypassAndThrow, ɵunwrapSafeValue, ɵgetSanitizationBypassType, ɵ_sanitizeUrl, ɵ_sanitizeHtml, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustUrl, ɵbypassSanitizationTrustResourceUrl, INJECTOR, ErrorHandler, ɵsetDocument, PLATFORM_ID, PLATFORM_INITIALIZER, Sanitizer, createPlatformFactory, platformCore, ɵINJECTOR_SCOPE, RendererFactory2, Testability, ApplicationModule, SkipSelf, Version } from '@angular/core';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provides DOM operations in any browser environment.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nclass GenericBrowserDomAdapter extends ɵDomAdapter {\n    constructor() {\n        super(...arguments);\n        this.supportsDOMEvents = true;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A `DomAdapter` powered by full browser DOM APIs.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\n/* tslint:disable:requireParameterType no-console */\nclass BrowserDomAdapter extends GenericBrowserDomAdapter {\n    static makeCurrent() {\n        ɵsetRootDomAdapter(new BrowserDomAdapter());\n    }\n    onAndCancel(el, evt, listener) {\n        el.addEventListener(evt, listener, false);\n        // Needed to follow Dart's subscription semantic, until fix of\n        // https://code.google.com/p/dart/issues/detail?id=17406\n        return () => {\n            el.removeEventListener(evt, listener, false);\n        };\n    }\n    dispatchEvent(el, evt) {\n        el.dispatchEvent(evt);\n    }\n    remove(node) {\n        if (node.parentNode) {\n            node.parentNode.removeChild(node);\n        }\n    }\n    createElement(tagName, doc) {\n        doc = doc || this.getDefaultDocument();\n        return doc.createElement(tagName);\n    }\n    createHtmlDocument() {\n        return document.implementation.createHTMLDocument('fakeTitle');\n    }\n    getDefaultDocument() {\n        return document;\n    }\n    isElementNode(node) {\n        return node.nodeType === Node.ELEMENT_NODE;\n    }\n    isShadowRoot(node) {\n        return node instanceof DocumentFragment;\n    }\n    /** @deprecated No longer being used in Ivy code. To be removed in version 14. */\n    getGlobalEventTarget(doc, target) {\n        if (target === 'window') {\n            return window;\n        }\n        if (target === 'document') {\n            return doc;\n        }\n        if (target === 'body') {\n            return doc.body;\n        }\n        return null;\n    }\n    getBaseHref(doc) {\n        const href = getBaseElementHref();\n        return href == null ? null : relativePath(href);\n    }\n    resetBaseElement() {\n        baseElement = null;\n    }\n    getUserAgent() {\n        return window.navigator.userAgent;\n    }\n    getCookie(name) {\n        return ɵparseCookieValue(document.cookie, name);\n    }\n}\nlet baseElement = null;\nfunction getBaseElementHref() {\n    baseElement = baseElement || document.querySelector('base');\n    return baseElement ? baseElement.getAttribute('href') : null;\n}\n// based on urlUtils.js in AngularJS 1\nlet urlParsingNode;\nfunction relativePath(url) {\n    urlParsingNode = urlParsingNode || document.createElement('a');\n    urlParsingNode.setAttribute('href', url);\n    const pathName = urlParsingNode.pathname;\n    return pathName.charAt(0) === '/' ? pathName : `/${pathName}`;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An id that identifies a particular application being bootstrapped, that should\n * match across the client/server boundary.\n */\nconst TRANSITION_ID = new InjectionToken('TRANSITION_ID');\nfunction appInitializerFactory(transitionId, document, injector) {\n    return () => {\n        // Wait for all application initializers to be completed before removing the styles set by\n        // the server.\n        injector.get(ApplicationInitStatus).donePromise.then(() => {\n            const dom = ɵgetDOM();\n            const styles = document.querySelectorAll(`style[ng-transition=\"${transitionId}\"]`);\n            for (let i = 0; i < styles.length; i++) {\n                dom.remove(styles[i]);\n            }\n        });\n    };\n}\nconst SERVER_TRANSITION_PROVIDERS = [\n    {\n        provide: APP_INITIALIZER,\n        useFactory: appInitializerFactory,\n        deps: [TRANSITION_ID, DOCUMENT, Injector],\n        multi: true\n    },\n];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass BrowserGetTestability {\n    static init() {\n        setTestabilityGetter(new BrowserGetTestability());\n    }\n    addToWindow(registry) {\n        ɵglobal['getAngularTestability'] = (elem, findInAncestors = true) => {\n            const testability = registry.findTestabilityInTree(elem, findInAncestors);\n            if (testability == null) {\n                throw new Error('Could not find testability for element.');\n            }\n            return testability;\n        };\n        ɵglobal['getAllAngularTestabilities'] = () => registry.getAllTestabilities();\n        ɵglobal['getAllAngularRootElements'] = () => registry.getAllRootElements();\n        const whenAllStable = (callback /** TODO #9100 */) => {\n            const testabilities = ɵglobal['getAllAngularTestabilities']();\n            let count = testabilities.length;\n            let didWork = false;\n            const decrement = function (didWork_ /** TODO #9100 */) {\n                didWork = didWork || didWork_;\n                count--;\n                if (count == 0) {\n                    callback(didWork);\n                }\n            };\n            testabilities.forEach(function (testability /** TODO #9100 */) {\n                testability.whenStable(decrement);\n            });\n        };\n        if (!ɵglobal['frameworkStabilizers']) {\n            ɵglobal['frameworkStabilizers'] = [];\n        }\n        ɵglobal['frameworkStabilizers'].push(whenAllStable);\n    }\n    findTestabilityInTree(registry, elem, findInAncestors) {\n        if (elem == null) {\n            return null;\n        }\n        const t = registry.getTestability(elem);\n        if (t != null) {\n            return t;\n        }\n        else if (!findInAncestors) {\n            return null;\n        }\n        if (ɵgetDOM().isShadowRoot(elem)) {\n            return this.findTestabilityInTree(registry, elem.host, true);\n        }\n        return this.findTestabilityInTree(registry, elem.parentElement, true);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API.\n */\nclass BrowserXhr {\n    build() {\n        return new XMLHttpRequest();\n    }\n}\nBrowserXhr.ɵfac = function BrowserXhr_Factory(t) { return new (t || BrowserXhr)(); };\nBrowserXhr.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: BrowserXhr, factory: BrowserXhr.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BrowserXhr, [{\n        type: Injectable\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\nconst DASH_CASE_REGEXP = /-([a-z])/g;\nfunction camelCaseToDashCase(input) {\n    return input.replace(CAMEL_CASE_REGEXP, (...m) => '-' + m[1].toLowerCase());\n}\nfunction dashCaseToCamelCase(input) {\n    return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());\n}\n/**\n * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if\n * `name` is `'probe'`.\n * @param name Name under which it will be exported. Keep in mind this will be a property of the\n * global `ng` object.\n * @param value The value to export.\n */\nfunction exportNgVar(name, value) {\n    if (typeof COMPILED === 'undefined' || !COMPILED) {\n        // Note: we can't export `ng` when using closure enhanced optimization as:\n        // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n        // - we can't declare a closure extern as the namespace `ng` is already used within Google\n        //   for typings for angularJS (via `goog.provide('ng....')`).\n        const ng = ɵglobal['ng'] = ɵglobal['ng'] || {};\n        ng[name] = value;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0 = () => ({\n    'ApplicationRef': ApplicationRef,\n    'NgZone': NgZone,\n});\nconst CORE_TOKENS = (ɵ0)();\nconst INSPECT_GLOBAL_NAME = 'probe';\nconst CORE_TOKENS_GLOBAL_NAME = 'coreTokens';\n/**\n * Returns a {@link DebugElement} for the given native DOM element, or\n * null if the given native element does not have an Angular view associated\n * with it.\n */\nfunction inspectNativeElementR2(element) {\n    return ɵgetDebugNodeR2(element);\n}\nfunction _createNgProbeR2(coreTokens) {\n    exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElementR2);\n    exportNgVar(CORE_TOKENS_GLOBAL_NAME, Object.assign(Object.assign({}, CORE_TOKENS), _ngProbeTokensToMap(coreTokens || [])));\n    return () => inspectNativeElementR2;\n}\nfunction _ngProbeTokensToMap(tokens) {\n    return tokens.reduce((prev, t) => (prev[t.name] = t.token, prev), {});\n}\n/**\n * In Ivy, we don't support NgProbe because we have our own set of testing utilities\n * with more robust functionality.\n *\n * We shouldn't bring in NgProbe because it prevents DebugNode and friends from\n * tree-shaking properly.\n */\nconst ELEMENT_PROBE_PROVIDERS__POST_R3__ = [];\n/**\n * Providers which support debugging Angular applications (e.g. via `ng.probe`).\n */\nconst ELEMENT_PROBE_PROVIDERS__PRE_R3__ = [\n    {\n        provide: APP_INITIALIZER,\n        useFactory: _createNgProbeR2,\n        deps: [\n            [NgProbeToken, new Optional()],\n        ],\n        multi: true,\n    },\n];\nconst ELEMENT_PROBE_PROVIDERS = ELEMENT_PROBE_PROVIDERS__POST_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The injection token for the event-manager plug-in service.\n *\n * @publicApi\n */\nconst EVENT_MANAGER_PLUGINS = new InjectionToken('EventManagerPlugins');\n/**\n * An injectable service that provides event management for Angular\n * through a browser plug-in.\n *\n * @publicApi\n */\nclass EventManager {\n    /**\n     * Initializes an instance of the event-manager service.\n     */\n    constructor(plugins, _zone) {\n        this._zone = _zone;\n        this._eventNameToPlugin = new Map();\n        plugins.forEach(p => p.manager = this);\n        this._plugins = plugins.slice().reverse();\n    }\n    /**\n     * Registers a handler for a specific element and event.\n     *\n     * @param element The HTML element to receive event notifications.\n     * @param eventName The name of the event to listen for.\n     * @param handler A function to call when the notification occurs. Receives the\n     * event object as an argument.\n     * @returns  A callback function that can be used to remove the handler.\n     */\n    addEventListener(element, eventName, handler) {\n        const plugin = this._findPluginFor(eventName);\n        return plugin.addEventListener(element, eventName, handler);\n    }\n    /**\n     * Registers a global handler for an event in a target view.\n     *\n     * @param target A target for global event notifications. One of \"window\", \"document\", or \"body\".\n     * @param eventName The name of the event to listen for.\n     * @param handler A function to call when the notification occurs. Receives the\n     * event object as an argument.\n     * @returns A callback function that can be used to remove the handler.\n     * @deprecated No longer being used in Ivy code. To be removed in version 14.\n     */\n    addGlobalEventListener(target, eventName, handler) {\n        const plugin = this._findPluginFor(eventName);\n        return plugin.addGlobalEventListener(target, eventName, handler);\n    }\n    /**\n     * Retrieves the compilation zone in which event listeners are registered.\n     */\n    getZone() {\n        return this._zone;\n    }\n    /** @internal */\n    _findPluginFor(eventName) {\n        const plugin = this._eventNameToPlugin.get(eventName);\n        if (plugin) {\n            return plugin;\n        }\n        const plugins = this._plugins;\n        for (let i = 0; i < plugins.length; i++) {\n            const plugin = plugins[i];\n            if (plugin.supports(eventName)) {\n                this._eventNameToPlugin.set(eventName, plugin);\n                return plugin;\n            }\n        }\n        throw new Error(`No event manager plugin found for event ${eventName}`);\n    }\n}\nEventManager.ɵfac = function EventManager_Factory(t) { return new (t || EventManager)(ɵngcc0.ɵɵinject(EVENT_MANAGER_PLUGINS), ɵngcc0.ɵɵinject(ɵngcc0.NgZone)); };\nEventManager.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: EventManager, factory: EventManager.ɵfac });\nEventManager.ctorParameters = () => [\n    { type: Array, decorators: [{ type: Inject, args: [EVENT_MANAGER_PLUGINS,] }] },\n    { type: NgZone }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(EventManager, [{\n        type: Injectable\n    }], function () { return [{ type: Array, decorators: [{\n                type: Inject,\n                args: [EVENT_MANAGER_PLUGINS]\n            }] }, { type: ɵngcc0.NgZone }]; }, null); })();\nclass EventManagerPlugin {\n    constructor(_doc) {\n        this._doc = _doc;\n    }\n    addGlobalEventListener(element, eventName, handler) {\n        const target = ɵgetDOM().getGlobalEventTarget(this._doc, element);\n        if (!target) {\n            throw new Error(`Unsupported event target ${target} for event ${eventName}`);\n        }\n        return this.addEventListener(target, eventName, handler);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass SharedStylesHost {\n    constructor() {\n        /** @internal */\n        this._stylesSet = new Set();\n    }\n    addStyles(styles) {\n        const additions = new Set();\n        styles.forEach(style => {\n            if (!this._stylesSet.has(style)) {\n                this._stylesSet.add(style);\n                additions.add(style);\n            }\n        });\n        this.onStylesAdded(additions);\n    }\n    onStylesAdded(additions) { }\n    getAllStyles() {\n        return Array.from(this._stylesSet);\n    }\n}\nSharedStylesHost.ɵfac = function SharedStylesHost_Factory(t) { return new (t || SharedStylesHost)(); };\nSharedStylesHost.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: SharedStylesHost, factory: SharedStylesHost.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(SharedStylesHost, [{\n        type: Injectable\n    }], function () { return []; }, null); })();\nclass DomSharedStylesHost extends SharedStylesHost {\n    constructor(_doc) {\n        super();\n        this._doc = _doc;\n        // Maps all registered host nodes to a list of style nodes that have been added to the host node.\n        this._hostNodes = new Map();\n        this._hostNodes.set(_doc.head, []);\n    }\n    _addStylesToHost(styles, host, styleNodes) {\n        styles.forEach((style) => {\n            const styleEl = this._doc.createElement('style');\n            styleEl.textContent = style;\n            styleNodes.push(host.appendChild(styleEl));\n        });\n    }\n    addHost(hostNode) {\n        const styleNodes = [];\n        this._addStylesToHost(this._stylesSet, hostNode, styleNodes);\n        this._hostNodes.set(hostNode, styleNodes);\n    }\n    removeHost(hostNode) {\n        const styleNodes = this._hostNodes.get(hostNode);\n        if (styleNodes) {\n            styleNodes.forEach(removeStyle);\n        }\n        this._hostNodes.delete(hostNode);\n    }\n    onStylesAdded(additions) {\n        this._hostNodes.forEach((styleNodes, hostNode) => {\n            this._addStylesToHost(additions, hostNode, styleNodes);\n        });\n    }\n    ngOnDestroy() {\n        this._hostNodes.forEach(styleNodes => styleNodes.forEach(removeStyle));\n    }\n}\nDomSharedStylesHost.ɵfac = function DomSharedStylesHost_Factory(t) { return new (t || DomSharedStylesHost)(ɵngcc0.ɵɵinject(DOCUMENT)); };\nDomSharedStylesHost.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: DomSharedStylesHost, factory: DomSharedStylesHost.ɵfac });\nDomSharedStylesHost.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DomSharedStylesHost, [{\n        type: Injectable\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }]; }, null); })();\nfunction removeStyle(styleNode) {\n    ɵgetDOM().remove(styleNode);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NAMESPACE_URIS = {\n    'svg': 'http://www.w3.org/2000/svg',\n    'xhtml': 'http://www.w3.org/1999/xhtml',\n    'xlink': 'http://www.w3.org/1999/xlink',\n    'xml': 'http://www.w3.org/XML/1998/namespace',\n    'xmlns': 'http://www.w3.org/2000/xmlns/',\n};\nconst COMPONENT_REGEX = /%COMP%/g;\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\nconst COMPONENT_VARIABLE = '%COMP%';\nconst HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nconst CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\nfunction shimContentAttribute(componentShortId) {\n    return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction shimHostAttribute(componentShortId) {\n    return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction flattenStyles(compId, styles, target) {\n    for (let i = 0; i < styles.length; i++) {\n        let style = styles[i];\n        if (Array.isArray(style)) {\n            flattenStyles(compId, style, target);\n        }\n        else {\n            style = style.replace(COMPONENT_REGEX, compId);\n            target.push(style);\n        }\n    }\n    return target;\n}\nfunction decoratePreventDefault(eventHandler) {\n    // `DebugNode.triggerEventHandler` needs to know if the listener was created with\n    // decoratePreventDefault or is a listener added outside the Angular context so it can handle the\n    // two differently. In the first case, the special '__ngUnwrap__' token is passed to the unwrap\n    // the listener (see below).\n    return (event) => {\n        // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function\n        // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The debug_node\n        // can inspect the listener toString contents for the existence of this special token. Because\n        // the token is a string literal, it is ensured to not be modified by compiled code.\n        if (event === '__ngUnwrap__') {\n            return eventHandler;\n        }\n        const allowDefaultBehavior = eventHandler(event);\n        if (allowDefaultBehavior === false) {\n            // TODO(tbosch): move preventDefault into event plugins...\n            event.preventDefault();\n            event.returnValue = false;\n        }\n        return undefined;\n    };\n}\nlet hasLoggedNativeEncapsulationWarning = false;\nclass DomRendererFactory2 {\n    constructor(eventManager, sharedStylesHost, appId) {\n        this.eventManager = eventManager;\n        this.sharedStylesHost = sharedStylesHost;\n        this.appId = appId;\n        this.rendererByCompId = new Map();\n        this.defaultRenderer = new DefaultDomRenderer2(eventManager);\n    }\n    createRenderer(element, type) {\n        if (!element || !type) {\n            return this.defaultRenderer;\n        }\n        switch (type.encapsulation) {\n            case ViewEncapsulation.Emulated: {\n                let renderer = this.rendererByCompId.get(type.id);\n                if (!renderer) {\n                    renderer = new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type, this.appId);\n                    this.rendererByCompId.set(type.id, renderer);\n                }\n                renderer.applyToHost(element);\n                return renderer;\n            }\n            // @ts-ignore TODO: Remove as part of FW-2290. TS complains about us dealing with an enum\n            // value that is not known (but previously was the value for ViewEncapsulation.Native)\n            case 1:\n            case ViewEncapsulation.ShadowDom:\n                // TODO(FW-2290): remove the `case 1:` fallback logic and the warning in v12.\n                if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n                    // @ts-ignore TODO: Remove as part of FW-2290. TS complains about us dealing with an\n                    // enum value that is not known (but previously was the value for\n                    // ViewEncapsulation.Native)\n                    !hasLoggedNativeEncapsulationWarning && type.encapsulation === 1) {\n                    hasLoggedNativeEncapsulationWarning = true;\n                    console.warn('ViewEncapsulation.Native is no longer supported. Falling back to ViewEncapsulation.ShadowDom. The fallback will be removed in v12.');\n                }\n                return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);\n            default: {\n                if (!this.rendererByCompId.has(type.id)) {\n                    const styles = flattenStyles(type.id, type.styles, []);\n                    this.sharedStylesHost.addStyles(styles);\n                    this.rendererByCompId.set(type.id, this.defaultRenderer);\n                }\n                return this.defaultRenderer;\n            }\n        }\n    }\n    begin() { }\n    end() { }\n}\nDomRendererFactory2.ɵfac = function DomRendererFactory2_Factory(t) { return new (t || DomRendererFactory2)(ɵngcc0.ɵɵinject(EventManager), ɵngcc0.ɵɵinject(DomSharedStylesHost), ɵngcc0.ɵɵinject(APP_ID)); };\nDomRendererFactory2.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: DomRendererFactory2, factory: DomRendererFactory2.ɵfac });\nDomRendererFactory2.ctorParameters = () => [\n    { type: EventManager },\n    { type: DomSharedStylesHost },\n    { type: String, decorators: [{ type: Inject, args: [APP_ID,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DomRendererFactory2, [{\n        type: Injectable\n    }], function () { return [{ type: EventManager }, { type: DomSharedStylesHost }, { type: String, decorators: [{\n                type: Inject,\n                args: [APP_ID]\n            }] }]; }, null); })();\nclass DefaultDomRenderer2 {\n    constructor(eventManager) {\n        this.eventManager = eventManager;\n        this.data = Object.create(null);\n    }\n    destroy() { }\n    createElement(name, namespace) {\n        if (namespace) {\n            // In cases where Ivy (not ViewEngine) is giving us the actual namespace, the look up by key\n            // will result in undefined, so we just return the namespace here.\n            return document.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);\n        }\n        return document.createElement(name);\n    }\n    createComment(value) {\n        return document.createComment(value);\n    }\n    createText(value) {\n        return document.createTextNode(value);\n    }\n    appendChild(parent, newChild) {\n        parent.appendChild(newChild);\n    }\n    insertBefore(parent, newChild, refChild) {\n        if (parent) {\n            parent.insertBefore(newChild, refChild);\n        }\n    }\n    removeChild(parent, oldChild) {\n        if (parent) {\n            parent.removeChild(oldChild);\n        }\n    }\n    selectRootElement(selectorOrNode, preserveContent) {\n        let el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) :\n            selectorOrNode;\n        if (!el) {\n            throw new Error(`The selector \"${selectorOrNode}\" did not match any elements`);\n        }\n        if (!preserveContent) {\n            el.textContent = '';\n        }\n        return el;\n    }\n    parentNode(node) {\n        return node.parentNode;\n    }\n    nextSibling(node) {\n        return node.nextSibling;\n    }\n    setAttribute(el, name, value, namespace) {\n        if (namespace) {\n            name = namespace + ':' + name;\n            // TODO(FW-811): Ivy may cause issues here because it's passing around\n            // full URIs for namespaces, therefore this lookup will fail.\n            const namespaceUri = NAMESPACE_URIS[namespace];\n            if (namespaceUri) {\n                el.setAttributeNS(namespaceUri, name, value);\n            }\n            else {\n                el.setAttribute(name, value);\n            }\n        }\n        else {\n            el.setAttribute(name, value);\n        }\n    }\n    removeAttribute(el, name, namespace) {\n        if (namespace) {\n            // TODO(FW-811): Ivy may cause issues here because it's passing around\n            // full URIs for namespaces, therefore this lookup will fail.\n            const namespaceUri = NAMESPACE_URIS[namespace];\n            if (namespaceUri) {\n                el.removeAttributeNS(namespaceUri, name);\n            }\n            else {\n                // TODO(FW-811): Since ivy is passing around full URIs for namespaces\n                // this could result in properties like `http://www.w3.org/2000/svg:cx=\"123\"`,\n                // which is wrong.\n                el.removeAttribute(`${namespace}:${name}`);\n            }\n        }\n        else {\n            el.removeAttribute(name);\n        }\n    }\n    addClass(el, name) {\n        el.classList.add(name);\n    }\n    removeClass(el, name) {\n        el.classList.remove(name);\n    }\n    setStyle(el, style, value, flags) {\n        if (flags & (RendererStyleFlags2.DashCase | RendererStyleFlags2.Important)) {\n            el.style.setProperty(style, value, flags & RendererStyleFlags2.Important ? 'important' : '');\n        }\n        else {\n            el.style[style] = value;\n        }\n    }\n    removeStyle(el, style, flags) {\n        if (flags & RendererStyleFlags2.DashCase) {\n            el.style.removeProperty(style);\n        }\n        else {\n            // IE requires '' instead of null\n            // see https://github.com/angular/angular/issues/7916\n            el.style[style] = '';\n        }\n    }\n    setProperty(el, name, value) {\n        NG_DEV_MODE && checkNoSyntheticProp(name, 'property');\n        el[name] = value;\n    }\n    setValue(node, value) {\n        node.nodeValue = value;\n    }\n    listen(target, event, callback) {\n        NG_DEV_MODE && checkNoSyntheticProp(event, 'listener');\n        if (typeof target === 'string') {\n            return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback));\n        }\n        return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback));\n    }\n}\nconst ɵ0$1 = () => '@'.charCodeAt(0);\nconst AT_CHARCODE = (ɵ0$1)();\nfunction checkNoSyntheticProp(name, nameKind) {\n    if (name.charCodeAt(0) === AT_CHARCODE) {\n        throw new Error(`Found the synthetic ${nameKind} ${name}. Please include either \"BrowserAnimationsModule\" or \"NoopAnimationsModule\" in your application.`);\n    }\n}\nclass EmulatedEncapsulationDomRenderer2 extends DefaultDomRenderer2 {\n    constructor(eventManager, sharedStylesHost, component, appId) {\n        super(eventManager);\n        this.component = component;\n        const styles = flattenStyles(appId + '-' + component.id, component.styles, []);\n        sharedStylesHost.addStyles(styles);\n        this.contentAttr = shimContentAttribute(appId + '-' + component.id);\n        this.hostAttr = shimHostAttribute(appId + '-' + component.id);\n    }\n    applyToHost(element) {\n        super.setAttribute(element, this.hostAttr, '');\n    }\n    createElement(parent, name) {\n        const el = super.createElement(parent, name);\n        super.setAttribute(el, this.contentAttr, '');\n        return el;\n    }\n}\nclass ShadowDomRenderer extends DefaultDomRenderer2 {\n    constructor(eventManager, sharedStylesHost, hostEl, component) {\n        super(eventManager);\n        this.sharedStylesHost = sharedStylesHost;\n        this.hostEl = hostEl;\n        this.shadowRoot = hostEl.attachShadow({ mode: 'open' });\n        this.sharedStylesHost.addHost(this.shadowRoot);\n        const styles = flattenStyles(component.id, component.styles, []);\n        for (let i = 0; i < styles.length; i++) {\n            const styleEl = document.createElement('style');\n            styleEl.textContent = styles[i];\n            this.shadowRoot.appendChild(styleEl);\n        }\n    }\n    nodeOrShadowRoot(node) {\n        return node === this.hostEl ? this.shadowRoot : node;\n    }\n    destroy() {\n        this.sharedStylesHost.removeHost(this.shadowRoot);\n    }\n    appendChild(parent, newChild) {\n        return super.appendChild(this.nodeOrShadowRoot(parent), newChild);\n    }\n    insertBefore(parent, newChild, refChild) {\n        return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild);\n    }\n    removeChild(parent, oldChild) {\n        return super.removeChild(this.nodeOrShadowRoot(parent), oldChild);\n    }\n    parentNode(node) {\n        return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node)));\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass DomEventsPlugin extends EventManagerPlugin {\n    constructor(doc) {\n        super(doc);\n    }\n    // This plugin should come last in the list of plugins, because it accepts all\n    // events.\n    supports(eventName) {\n        return true;\n    }\n    addEventListener(element, eventName, handler) {\n        element.addEventListener(eventName, handler, false);\n        return () => this.removeEventListener(element, eventName, handler);\n    }\n    removeEventListener(target, eventName, callback) {\n        return target.removeEventListener(eventName, callback);\n    }\n}\nDomEventsPlugin.ɵfac = function DomEventsPlugin_Factory(t) { return new (t || DomEventsPlugin)(ɵngcc0.ɵɵinject(DOCUMENT)); };\nDomEventsPlugin.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: DomEventsPlugin, factory: DomEventsPlugin.ɵfac });\nDomEventsPlugin.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DomEventsPlugin, [{\n        type: Injectable\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Supported HammerJS recognizer event names.\n */\nconst EVENT_NAMES = {\n    // pan\n    'pan': true,\n    'panstart': true,\n    'panmove': true,\n    'panend': true,\n    'pancancel': true,\n    'panleft': true,\n    'panright': true,\n    'panup': true,\n    'pandown': true,\n    // pinch\n    'pinch': true,\n    'pinchstart': true,\n    'pinchmove': true,\n    'pinchend': true,\n    'pinchcancel': true,\n    'pinchin': true,\n    'pinchout': true,\n    // press\n    'press': true,\n    'pressup': true,\n    // rotate\n    'rotate': true,\n    'rotatestart': true,\n    'rotatemove': true,\n    'rotateend': true,\n    'rotatecancel': true,\n    // swipe\n    'swipe': true,\n    'swipeleft': true,\n    'swiperight': true,\n    'swipeup': true,\n    'swipedown': true,\n    // tap\n    'tap': true,\n    'doubletap': true\n};\n/**\n * DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular.\n * @see `HammerGestureConfig`\n *\n * @ngModule HammerModule\n * @publicApi\n */\nconst HAMMER_GESTURE_CONFIG = new InjectionToken('HammerGestureConfig');\n/**\n * Injection token used to provide a {@link HammerLoader} to Angular.\n *\n * @publicApi\n */\nconst HAMMER_LOADER = new InjectionToken('HammerLoader');\n/**\n * An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)\n * for gesture recognition. Configures specific event recognition.\n * @publicApi\n */\nclass HammerGestureConfig {\n    constructor() {\n        /**\n         * A set of supported event names for gestures to be used in Angular.\n         * Angular supports all built-in recognizers, as listed in\n         * [HammerJS documentation](https://hammerjs.github.io/).\n         */\n        this.events = [];\n        /**\n         * Maps gesture event names to a set of configuration options\n         * that specify overrides to the default values for specific properties.\n         *\n         * The key is a supported event name to be configured,\n         * and the options object contains a set of properties, with override values\n         * to be applied to the named recognizer event.\n         * For example, to disable recognition of the rotate event, specify\n         *  `{\"rotate\": {\"enable\": false}}`.\n         *\n         * Properties that are not present take the HammerJS default values.\n         * For information about which properties are supported for which events,\n         * and their allowed and default values, see\n         * [HammerJS documentation](https://hammerjs.github.io/).\n         *\n         */\n        this.overrides = {};\n    }\n    /**\n     * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)\n     * and attaches it to a given HTML element.\n     * @param element The element that will recognize gestures.\n     * @returns A HammerJS event-manager object.\n     */\n    buildHammer(element) {\n        const mc = new Hammer(element, this.options);\n        mc.get('pinch').set({ enable: true });\n        mc.get('rotate').set({ enable: true });\n        for (const eventName in this.overrides) {\n            mc.get(eventName).set(this.overrides[eventName]);\n        }\n        return mc;\n    }\n}\nHammerGestureConfig.ɵfac = function HammerGestureConfig_Factory(t) { return new (t || HammerGestureConfig)(); };\nHammerGestureConfig.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: HammerGestureConfig, factory: HammerGestureConfig.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(HammerGestureConfig, [{\n        type: Injectable\n    }], function () { return []; }, null); })();\n/**\n * Event plugin that adds Hammer support to an application.\n *\n * @ngModule HammerModule\n */\nclass HammerGesturesPlugin extends EventManagerPlugin {\n    constructor(doc, _config, console, loader) {\n        super(doc);\n        this._config = _config;\n        this.console = console;\n        this.loader = loader;\n        this._loaderPromise = null;\n    }\n    supports(eventName) {\n        if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {\n            return false;\n        }\n        if (!window.Hammer && !this.loader) {\n            if (typeof ngDevMode === 'undefined' || ngDevMode) {\n                this.console.warn(`The \"${eventName}\" event cannot be bound because Hammer.JS is not ` +\n                    `loaded and no custom loader has been specified.`);\n            }\n            return false;\n        }\n        return true;\n    }\n    addEventListener(element, eventName, handler) {\n        const zone = this.manager.getZone();\n        eventName = eventName.toLowerCase();\n        // If Hammer is not present but a loader is specified, we defer adding the event listener\n        // until Hammer is loaded.\n        if (!window.Hammer && this.loader) {\n            this._loaderPromise = this._loaderPromise || this.loader();\n            // This `addEventListener` method returns a function to remove the added listener.\n            // Until Hammer is loaded, the returned function needs to *cancel* the registration rather\n            // than remove anything.\n            let cancelRegistration = false;\n            let deregister = () => {\n                cancelRegistration = true;\n            };\n            this._loaderPromise\n                .then(() => {\n                // If Hammer isn't actually loaded when the custom loader resolves, give up.\n                if (!window.Hammer) {\n                    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n                        this.console.warn(`The custom HAMMER_LOADER completed, but Hammer.JS is not present.`);\n                    }\n                    deregister = () => { };\n                    return;\n                }\n                if (!cancelRegistration) {\n                    // Now that Hammer is loaded and the listener is being loaded for real,\n                    // the deregistration function changes from canceling registration to removal.\n                    deregister = this.addEventListener(element, eventName, handler);\n                }\n            })\n                .catch(() => {\n                if (typeof ngDevMode === 'undefined' || ngDevMode) {\n                    this.console.warn(`The \"${eventName}\" event cannot be bound because the custom ` +\n                        `Hammer.JS loader failed.`);\n                }\n                deregister = () => { };\n            });\n            // Return a function that *executes* `deregister` (and not `deregister` itself) so that we\n            // can change the behavior of `deregister` once the listener is added. Using a closure in\n            // this way allows us to avoid any additional data structures to track listener removal.\n            return () => {\n                deregister();\n            };\n        }\n        return zone.runOutsideAngular(() => {\n            // Creating the manager bind events, must be done outside of angular\n            const mc = this._config.buildHammer(element);\n            const callback = function (eventObj) {\n                zone.runGuarded(function () {\n                    handler(eventObj);\n                });\n            };\n            mc.on(eventName, callback);\n            return () => {\n                mc.off(eventName, callback);\n                // destroy mc to prevent memory leak\n                if (typeof mc.destroy === 'function') {\n                    mc.destroy();\n                }\n            };\n        });\n    }\n    isCustomEvent(eventName) {\n        return this._config.events.indexOf(eventName) > -1;\n    }\n}\nHammerGesturesPlugin.ɵfac = function HammerGesturesPlugin_Factory(t) { return new (t || HammerGesturesPlugin)(ɵngcc0.ɵɵinject(DOCUMENT), ɵngcc0.ɵɵinject(HAMMER_GESTURE_CONFIG), ɵngcc0.ɵɵinject(ɵngcc0.ɵConsole), ɵngcc0.ɵɵinject(HAMMER_LOADER, 8)); };\nHammerGesturesPlugin.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: HammerGesturesPlugin, factory: HammerGesturesPlugin.ɵfac });\nHammerGesturesPlugin.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n    { type: HammerGestureConfig, decorators: [{ type: Inject, args: [HAMMER_GESTURE_CONFIG,] }] },\n    { type: ɵConsole },\n    { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [HAMMER_LOADER,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(HammerGesturesPlugin, [{\n        type: Injectable\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }, { type: HammerGestureConfig, decorators: [{\n                type: Inject,\n                args: [HAMMER_GESTURE_CONFIG]\n            }] }, { type: ɵngcc0.ɵConsole }, { type: undefined, decorators: [{\n                type: Optional\n            }, {\n                type: Inject,\n                args: [HAMMER_LOADER]\n            }] }]; }, null); })();\n/**\n * In Ivy, support for Hammer gestures is optional, so applications must\n * import the `HammerModule` at root to turn on support. This means that\n * Hammer-specific code can be tree-shaken away if not needed.\n */\nconst HAMMER_PROVIDERS__POST_R3__ = [];\n/**\n * In View Engine, support for Hammer gestures is built-in by default.\n */\nconst HAMMER_PROVIDERS__PRE_R3__ = [\n    {\n        provide: EVENT_MANAGER_PLUGINS,\n        useClass: HammerGesturesPlugin,\n        multi: true,\n        deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, ɵConsole, [new Optional(), HAMMER_LOADER]]\n    },\n    { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },\n];\nconst HAMMER_PROVIDERS = HAMMER_PROVIDERS__POST_R3__;\n/**\n * Adds support for HammerJS.\n *\n * Import this module at the root of your application so that Angular can work with\n * HammerJS to detect gesture events.\n *\n * Note that applications still need to include the HammerJS script itself. This module\n * simply sets up the coordination layer between HammerJS and Angular's EventManager.\n *\n * @publicApi\n */\nclass HammerModule {\n}\nHammerModule.ɵfac = function HammerModule_Factory(t) { return new (t || HammerModule)(); };\nHammerModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: HammerModule });\nHammerModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: HAMMER_PROVIDERS__PRE_R3__ });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(HammerModule, [{\n        type: NgModule,\n        args: [{ providers: HAMMER_PROVIDERS__PRE_R3__ }]\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines supported modifiers for key events.\n */\nconst MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];\nconst DOM_KEY_LOCATION_NUMPAD = 3;\n// Map to convert some key or keyIdentifier values to what will be returned by getEventKey\nconst _keyMap = {\n    // The following values are here for cross-browser compatibility and to match the W3C standard\n    // cf https://www.w3.org/TR/DOM-Level-3-Events-key/\n    '\\b': 'Backspace',\n    '\\t': 'Tab',\n    '\\x7F': 'Delete',\n    '\\x1B': 'Escape',\n    'Del': 'Delete',\n    'Esc': 'Escape',\n    'Left': 'ArrowLeft',\n    'Right': 'ArrowRight',\n    'Up': 'ArrowUp',\n    'Down': 'ArrowDown',\n    'Menu': 'ContextMenu',\n    'Scroll': 'ScrollLock',\n    'Win': 'OS'\n};\n// There is a bug in Chrome for numeric keypad keys:\n// https://code.google.com/p/chromium/issues/detail?id=155654\n// 1, 2, 3 ... are reported as A, B, C ...\nconst _chromeNumKeyPadMap = {\n    'A': '1',\n    'B': '2',\n    'C': '3',\n    'D': '4',\n    'E': '5',\n    'F': '6',\n    'G': '7',\n    'H': '8',\n    'I': '9',\n    'J': '*',\n    'K': '+',\n    'M': '-',\n    'N': '.',\n    'O': '/',\n    '\\x60': '0',\n    '\\x90': 'NumLock'\n};\nconst ɵ0$2 = (event) => event.altKey, ɵ1 = (event) => event.ctrlKey, ɵ2 = (event) => event.metaKey, ɵ3 = (event) => event.shiftKey;\n/**\n * Retrieves modifiers from key-event objects.\n */\nconst MODIFIER_KEY_GETTERS = {\n    'alt': ɵ0$2,\n    'control': ɵ1,\n    'meta': ɵ2,\n    'shift': ɵ3\n};\n/**\n * @publicApi\n * A browser plug-in that provides support for handling of key events in Angular.\n */\nclass KeyEventsPlugin extends EventManagerPlugin {\n    /**\n     * Initializes an instance of the browser plug-in.\n     * @param doc The document in which key events will be detected.\n     */\n    constructor(doc) {\n        super(doc);\n    }\n    /**\n     * Reports whether a named key event is supported.\n     * @param eventName The event name to query.\n     * @return True if the named key event is supported.\n     */\n    supports(eventName) {\n        return KeyEventsPlugin.parseEventName(eventName) != null;\n    }\n    /**\n     * Registers a handler for a specific element and key event.\n     * @param element The HTML element to receive event notifications.\n     * @param eventName The name of the key event to listen for.\n     * @param handler A function to call when the notification occurs. Receives the\n     * event object as an argument.\n     * @returns The key event that was registered.\n     */\n    addEventListener(element, eventName, handler) {\n        const parsedEvent = KeyEventsPlugin.parseEventName(eventName);\n        const outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());\n        return this.manager.getZone().runOutsideAngular(() => {\n            return ɵgetDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);\n        });\n    }\n    static parseEventName(eventName) {\n        const parts = eventName.toLowerCase().split('.');\n        const domEventName = parts.shift();\n        if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) {\n            return null;\n        }\n        const key = KeyEventsPlugin._normalizeKey(parts.pop());\n        let fullKey = '';\n        MODIFIER_KEYS.forEach(modifierName => {\n            const index = parts.indexOf(modifierName);\n            if (index > -1) {\n                parts.splice(index, 1);\n                fullKey += modifierName + '.';\n            }\n        });\n        fullKey += key;\n        if (parts.length != 0 || key.length === 0) {\n            // returning null instead of throwing to let another plugin process the event\n            return null;\n        }\n        // NOTE: Please don't rewrite this as so, as it will break JSCompiler property renaming.\n        //       The code must remain in the `result['domEventName']` form.\n        // return {domEventName, fullKey};\n        const result = {};\n        result['domEventName'] = domEventName;\n        result['fullKey'] = fullKey;\n        return result;\n    }\n    static getEventFullKey(event) {\n        let fullKey = '';\n        let key = getEventKey(event);\n        key = key.toLowerCase();\n        if (key === ' ') {\n            key = 'space'; // for readability\n        }\n        else if (key === '.') {\n            key = 'dot'; // because '.' is used as a separator in event names\n        }\n        MODIFIER_KEYS.forEach(modifierName => {\n            if (modifierName != key) {\n                const modifierGetter = MODIFIER_KEY_GETTERS[modifierName];\n                if (modifierGetter(event)) {\n                    fullKey += modifierName + '.';\n                }\n            }\n        });\n        fullKey += key;\n        return fullKey;\n    }\n    /**\n     * Configures a handler callback for a key event.\n     * @param fullKey The event name that combines all simultaneous keystrokes.\n     * @param handler The function that responds to the key event.\n     * @param zone The zone in which the event occurred.\n     * @returns A callback function.\n     */\n    static eventCallback(fullKey, handler, zone) {\n        return (event /** TODO #9100 */) => {\n            if (KeyEventsPlugin.getEventFullKey(event) === fullKey) {\n                zone.runGuarded(() => handler(event));\n            }\n        };\n    }\n    /** @internal */\n    static _normalizeKey(keyName) {\n        // TODO: switch to a Map if the mapping grows too much\n        switch (keyName) {\n            case 'esc':\n                return 'escape';\n            default:\n                return keyName;\n        }\n    }\n}\nKeyEventsPlugin.ɵfac = function KeyEventsPlugin_Factory(t) { return new (t || KeyEventsPlugin)(ɵngcc0.ɵɵinject(DOCUMENT)); };\nKeyEventsPlugin.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: KeyEventsPlugin, factory: KeyEventsPlugin.ɵfac });\nKeyEventsPlugin.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(KeyEventsPlugin, [{\n        type: Injectable\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }]; }, null); })();\nfunction getEventKey(event) {\n    let key = event.key;\n    if (key == null) {\n        key = event.keyIdentifier;\n        // keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and\n        // Safari cf\n        // https://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces\n        if (key == null) {\n            return 'Unidentified';\n        }\n        if (key.startsWith('U+')) {\n            key = String.fromCharCode(parseInt(key.substring(2), 16));\n            if (event.location === DOM_KEY_LOCATION_NUMPAD && _chromeNumKeyPadMap.hasOwnProperty(key)) {\n                // There is a bug in Chrome for numeric keypad keys:\n                // https://code.google.com/p/chromium/issues/detail?id=155654\n                // 1, 2, 3 ... are reported as A, B, C ...\n                key = _chromeNumKeyPadMap[key];\n            }\n        }\n    }\n    return _keyMap[key] || key;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing\n * values to be safe to use in the different DOM contexts.\n *\n * For example, when binding a URL in an `<a [href]=\"someValue\">` hyperlink, `someValue` will be\n * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on\n * the website.\n *\n * In specific situations, it might be necessary to disable sanitization, for example if the\n * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.\n * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`\n * methods, and then binding to that value from the template.\n *\n * These situations should be very rare, and extraordinary care must be taken to avoid creating a\n * Cross Site Scripting (XSS) security bug!\n *\n * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as\n * close as possible to the source of the value, to make it easy to verify no security bug is\n * created by its use.\n *\n * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that\n * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous\n * code. The sanitizer leaves safe values intact.\n *\n * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in\n * sanitization for the value passed in. Carefully check and audit all values and code paths going\n * into this call. Make sure any user data is appropriately escaped for this security context.\n * For more detail, see the [Security Guide](https://g.co/ng/security).\n *\n * @publicApi\n */\nclass DomSanitizer {\n}\nDomSanitizer.ɵfac = function DomSanitizer_Factory(t) { return new (t || DomSanitizer)(); };\nDomSanitizer.ɵprov = ɵɵdefineInjectable({ factory: function DomSanitizer_Factory() { return ɵɵinject(DomSanitizerImpl); }, token: DomSanitizer, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DomSanitizer, [{\n        type: Injectable,\n        args: [{ providedIn: 'root', useExisting: forwardRef(() => DomSanitizerImpl) }]\n    }], null, null); })();\nfunction domSanitizerImplFactory(injector) {\n    return new DomSanitizerImpl(injector.get(DOCUMENT));\n}\nclass DomSanitizerImpl extends DomSanitizer {\n    constructor(_doc) {\n        super();\n        this._doc = _doc;\n    }\n    sanitize(ctx, value) {\n        if (value == null)\n            return null;\n        switch (ctx) {\n            case SecurityContext.NONE:\n                return value;\n            case SecurityContext.HTML:\n                if (ɵallowSanitizationBypassAndThrow(value, \"HTML\" /* Html */)) {\n                    return ɵunwrapSafeValue(value);\n                }\n                return ɵ_sanitizeHtml(this._doc, String(value)).toString();\n            case SecurityContext.STYLE:\n                if (ɵallowSanitizationBypassAndThrow(value, \"Style\" /* Style */)) {\n                    return ɵunwrapSafeValue(value);\n                }\n                return value;\n            case SecurityContext.SCRIPT:\n                if (ɵallowSanitizationBypassAndThrow(value, \"Script\" /* Script */)) {\n                    return ɵunwrapSafeValue(value);\n                }\n                throw new Error('unsafe value used in a script context');\n            case SecurityContext.URL:\n                const type = ɵgetSanitizationBypassType(value);\n                if (ɵallowSanitizationBypassAndThrow(value, \"URL\" /* Url */)) {\n                    return ɵunwrapSafeValue(value);\n                }\n                return ɵ_sanitizeUrl(String(value));\n            case SecurityContext.RESOURCE_URL:\n                if (ɵallowSanitizationBypassAndThrow(value, \"ResourceURL\" /* ResourceUrl */)) {\n                    return ɵunwrapSafeValue(value);\n                }\n                throw new Error('unsafe value used in a resource URL context (see https://g.co/ng/security#xss)');\n            default:\n                throw new Error(`Unexpected SecurityContext ${ctx} (see https://g.co/ng/security#xss)`);\n        }\n    }\n    bypassSecurityTrustHtml(value) {\n        return ɵbypassSanitizationTrustHtml(value);\n    }\n    bypassSecurityTrustStyle(value) {\n        return ɵbypassSanitizationTrustStyle(value);\n    }\n    bypassSecurityTrustScript(value) {\n        return ɵbypassSanitizationTrustScript(value);\n    }\n    bypassSecurityTrustUrl(value) {\n        return ɵbypassSanitizationTrustUrl(value);\n    }\n    bypassSecurityTrustResourceUrl(value) {\n        return ɵbypassSanitizationTrustResourceUrl(value);\n    }\n}\nDomSanitizerImpl.ɵfac = function DomSanitizerImpl_Factory(t) { return new (t || DomSanitizerImpl)(ɵngcc0.ɵɵinject(DOCUMENT)); };\nDomSanitizerImpl.ɵprov = ɵɵdefineInjectable({ factory: function DomSanitizerImpl_Factory() { return domSanitizerImplFactory(ɵɵinject(INJECTOR)); }, token: DomSanitizerImpl, providedIn: \"root\" });\nDomSanitizerImpl.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DomSanitizerImpl, [{\n        type: Injectable,\n        args: [{ providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [Injector] }]\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction initDomAdapter() {\n    BrowserDomAdapter.makeCurrent();\n    BrowserGetTestability.init();\n}\nfunction errorHandler() {\n    return new ErrorHandler();\n}\nfunction _document() {\n    // Tell ivy about the global document\n    ɵsetDocument(document);\n    return document;\n}\nconst ɵ0$3 = ɵPLATFORM_BROWSER_ID;\nconst INTERNAL_BROWSER_PLATFORM_PROVIDERS = [\n    { provide: PLATFORM_ID, useValue: ɵ0$3 },\n    { provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true },\n    { provide: DOCUMENT, useFactory: _document, deps: [] },\n];\nconst BROWSER_SANITIZATION_PROVIDERS__PRE_R3__ = [\n    { provide: Sanitizer, useExisting: DomSanitizer },\n    { provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [DOCUMENT] },\n];\nconst BROWSER_SANITIZATION_PROVIDERS__POST_R3__ = [];\n/**\n * @security Replacing built-in sanitization providers exposes the application to XSS risks.\n * Attacker-controlled data introduced by an unsanitized provider could expose your\n * application to XSS risks. For more detail, see the [Security Guide](https://g.co/ng/security).\n * @publicApi\n */\nconst BROWSER_SANITIZATION_PROVIDERS = BROWSER_SANITIZATION_PROVIDERS__POST_R3__;\n/**\n * A factory function that returns a `PlatformRef` instance associated with browser service\n * providers.\n *\n * @publicApi\n */\nconst platformBrowser = createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);\nconst BROWSER_MODULE_PROVIDERS = [\n    BROWSER_SANITIZATION_PROVIDERS,\n    { provide: ɵINJECTOR_SCOPE, useValue: 'root' },\n    { provide: ErrorHandler, useFactory: errorHandler, deps: [] },\n    {\n        provide: EVENT_MANAGER_PLUGINS,\n        useClass: DomEventsPlugin,\n        multi: true,\n        deps: [DOCUMENT, NgZone, PLATFORM_ID]\n    },\n    { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [DOCUMENT] },\n    HAMMER_PROVIDERS,\n    {\n        provide: DomRendererFactory2,\n        useClass: DomRendererFactory2,\n        deps: [EventManager, DomSharedStylesHost, APP_ID]\n    },\n    { provide: RendererFactory2, useExisting: DomRendererFactory2 },\n    { provide: SharedStylesHost, useExisting: DomSharedStylesHost },\n    { provide: DomSharedStylesHost, useClass: DomSharedStylesHost, deps: [DOCUMENT] },\n    { provide: Testability, useClass: Testability, deps: [NgZone] },\n    { provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, NgZone] },\n    { provide: XhrFactory, useClass: BrowserXhr, deps: [] },\n    ELEMENT_PROBE_PROVIDERS,\n];\n/**\n * Exports required infrastructure for all Angular apps.\n * Included by default in all Angular apps created with the CLI\n * `new` command.\n * Re-exports `CommonModule` and `ApplicationModule`, making their\n * exports and providers available to all apps.\n *\n * @publicApi\n */\nclass BrowserModule {\n    constructor(parentModule) {\n        if (parentModule) {\n            throw new Error(`BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.`);\n        }\n    }\n    /**\n     * Configures a browser-based app to transition from a server-rendered app, if\n     * one is present on the page.\n     *\n     * @param params An object containing an identifier for the app to transition.\n     * The ID must match between the client and server versions of the app.\n     * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.\n     */\n    static withServerTransition(params) {\n        return {\n            ngModule: BrowserModule,\n            providers: [\n                { provide: APP_ID, useValue: params.appId },\n                { provide: TRANSITION_ID, useExisting: APP_ID },\n                SERVER_TRANSITION_PROVIDERS,\n            ],\n        };\n    }\n}\nBrowserModule.ɵfac = function BrowserModule_Factory(t) { return new (t || BrowserModule)(ɵngcc0.ɵɵinject(BrowserModule, 12)); };\nBrowserModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: BrowserModule });\nBrowserModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: BROWSER_MODULE_PROVIDERS, imports: [CommonModule, ApplicationModule] });\nBrowserModule.ctorParameters = () => [\n    { type: BrowserModule, decorators: [{ type: Optional }, { type: SkipSelf }, { type: Inject, args: [BrowserModule,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BrowserModule, [{\n        type: NgModule,\n        args: [{ providers: BROWSER_MODULE_PROVIDERS, exports: [CommonModule, ApplicationModule] }]\n    }], function () { return [{ type: BrowserModule, decorators: [{\n                type: Optional\n            }, {\n                type: SkipSelf\n            }, {\n                type: Inject,\n                args: [BrowserModule]\n            }] }]; }, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(BrowserModule, { exports: function () { return [CommonModule, ApplicationModule]; } }); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Factory to create a `Meta` service instance for the current DOM document.\n */\nfunction createMeta() {\n    return new Meta(ɵɵinject(DOCUMENT));\n}\n/**\n * A service for managing HTML `<meta>` tags.\n *\n * Properties of the `MetaDefinition` object match the attributes of the\n * HTML `<meta>` tag. These tags define document metadata that is important for\n * things like configuring a Content Security Policy, defining browser compatibility\n * and security settings, setting HTTP Headers, defining rich content for social sharing,\n * and Search Engine Optimization (SEO).\n *\n * To identify specific `<meta>` tags in a document, use an attribute selection\n * string in the format `\"tag_attribute='value string'\"`.\n * For example, an `attrSelector` value of `\"name='description'\"` matches a tag\n * whose `name` attribute has the value `\"description\"`.\n * Selectors are used with the `querySelector()` Document method,\n * in the format `meta[{attrSelector}]`.\n *\n * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)\n * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)\n *\n *\n * @publicApi\n */\nclass Meta {\n    constructor(_doc) {\n        this._doc = _doc;\n        this._dom = ɵgetDOM();\n    }\n    /**\n     * Retrieves or creates a specific `<meta>` tag element in the current HTML document.\n     * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n     * values in the provided tag definition, and verifies that all other attribute values are equal.\n     * If an existing element is found, it is returned and is not modified in any way.\n     * @param tag The definition of a `<meta>` element to match or create.\n     * @param forceCreation True to create a new element without checking whether one already exists.\n     * @returns The existing element with the same attributes and values if found,\n     * the new element if no match is found, or `null` if the tag parameter is not defined.\n     */\n    addTag(tag, forceCreation = false) {\n        if (!tag)\n            return null;\n        return this._getOrCreateElement(tag, forceCreation);\n    }\n    /**\n     * Retrieves or creates a set of `<meta>` tag elements in the current HTML document.\n     * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n     * values in the provided tag definition, and verifies that all other attribute values are equal.\n     * @param tags An array of tag definitions to match or create.\n     * @param forceCreation True to create new elements without checking whether they already exist.\n     * @returns The matching elements if found, or the new elements.\n     */\n    addTags(tags, forceCreation = false) {\n        if (!tags)\n            return [];\n        return tags.reduce((result, tag) => {\n            if (tag) {\n                result.push(this._getOrCreateElement(tag, forceCreation));\n            }\n            return result;\n        }, []);\n    }\n    /**\n     * Retrieves a `<meta>` tag element in the current HTML document.\n     * @param attrSelector The tag attribute and value to match against, in the format\n     * `\"tag_attribute='value string'\"`.\n     * @returns The matching element, if any.\n     */\n    getTag(attrSelector) {\n        if (!attrSelector)\n            return null;\n        return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n    }\n    /**\n     * Retrieves a set of `<meta>` tag elements in the current HTML document.\n     * @param attrSelector The tag attribute and value to match against, in the format\n     * `\"tag_attribute='value string'\"`.\n     * @returns The matching elements, if any.\n     */\n    getTags(attrSelector) {\n        if (!attrSelector)\n            return [];\n        const list /*NodeList*/ = this._doc.querySelectorAll(`meta[${attrSelector}]`);\n        return list ? [].slice.call(list) : [];\n    }\n    /**\n     * Modifies an existing `<meta>` tag element in the current HTML document.\n     * @param tag The tag description with which to replace the existing tag content.\n     * @param selector A tag attribute and value to match against, to identify\n     * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n     * If not supplied, matches a tag with the same `name` or `property` attribute value as the\n     * replacement tag.\n     * @return The modified element.\n     */\n    updateTag(tag, selector) {\n        if (!tag)\n            return null;\n        selector = selector || this._parseSelector(tag);\n        const meta = this.getTag(selector);\n        if (meta) {\n            return this._setMetaElementAttributes(tag, meta);\n        }\n        return this._getOrCreateElement(tag, true);\n    }\n    /**\n     * Removes an existing `<meta>` tag element from the current HTML document.\n     * @param attrSelector A tag attribute and value to match against, to identify\n     * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n     */\n    removeTag(attrSelector) {\n        this.removeTagElement(this.getTag(attrSelector));\n    }\n    /**\n     * Removes an existing `<meta>` tag element from the current HTML document.\n     * @param meta The tag definition to match against to identify an existing tag.\n     */\n    removeTagElement(meta) {\n        if (meta) {\n            this._dom.remove(meta);\n        }\n    }\n    _getOrCreateElement(meta, forceCreation = false) {\n        if (!forceCreation) {\n            const selector = this._parseSelector(meta);\n            // It's allowed to have multiple elements with the same name so it's not enough to\n            // just check that element with the same name already present on the page. We also need to\n            // check if element has tag attributes\n            const elem = this.getTags(selector).filter(elem => this._containsAttributes(meta, elem))[0];\n            if (elem !== undefined)\n                return elem;\n        }\n        const element = this._dom.createElement('meta');\n        this._setMetaElementAttributes(meta, element);\n        const head = this._doc.getElementsByTagName('head')[0];\n        head.appendChild(element);\n        return element;\n    }\n    _setMetaElementAttributes(tag, el) {\n        Object.keys(tag).forEach((prop) => el.setAttribute(this._getMetaKeyMap(prop), tag[prop]));\n        return el;\n    }\n    _parseSelector(tag) {\n        const attr = tag.name ? 'name' : 'property';\n        return `${attr}=\"${tag[attr]}\"`;\n    }\n    _containsAttributes(tag, elem) {\n        return Object.keys(tag).every((key) => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key]);\n    }\n    _getMetaKeyMap(prop) {\n        return META_KEYS_MAP[prop] || prop;\n    }\n}\nMeta.ɵfac = function Meta_Factory(t) { return new (t || Meta)(ɵngcc0.ɵɵinject(DOCUMENT)); };\nMeta.ɵprov = ɵɵdefineInjectable({ factory: createMeta, token: Meta, providedIn: \"root\" });\nMeta.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(Meta, [{\n        type: Injectable,\n        args: [{ providedIn: 'root', useFactory: createMeta, deps: [] }]\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }]; }, null); })();\n/**\n * Mapping for MetaDefinition properties with their correct meta attribute names\n */\nconst META_KEYS_MAP = {\n    httpEquiv: 'http-equiv'\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Factory to create Title service.\n */\nfunction createTitle() {\n    return new Title(ɵɵinject(DOCUMENT));\n}\n/**\n * A service that can be used to get and set the title of a current HTML document.\n *\n * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)\n * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements\n * (representing the `<title>` tag). Instead, this service can be used to set and get the current\n * title value.\n *\n * @publicApi\n */\nclass Title {\n    constructor(_doc) {\n        this._doc = _doc;\n    }\n    /**\n     * Get the title of the current HTML document.\n     */\n    getTitle() {\n        return this._doc.title;\n    }\n    /**\n     * Set the title of the current HTML document.\n     * @param newTitle\n     */\n    setTitle(newTitle) {\n        this._doc.title = newTitle || '';\n    }\n}\nTitle.ɵfac = function Title_Factory(t) { return new (t || Title)(ɵngcc0.ɵɵinject(DOCUMENT)); };\nTitle.ɵprov = ɵɵdefineInjectable({ factory: createTitle, token: Title, providedIn: \"root\" });\nTitle.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(Title, [{\n        type: Injectable,\n        args: [{ providedIn: 'root', useFactory: createTitle, deps: [] }]\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst win = typeof window !== 'undefined' && window || {};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass ChangeDetectionPerfRecord {\n    constructor(msPerTick, numTicks) {\n        this.msPerTick = msPerTick;\n        this.numTicks = numTicks;\n    }\n}\n/**\n * Entry point for all Angular profiling-related debug tools. This object\n * corresponds to the `ng.profiler` in the dev console.\n */\nclass AngularProfiler {\n    constructor(ref) {\n        this.appRef = ref.injector.get(ApplicationRef);\n    }\n    // tslint:disable:no-console\n    /**\n     * Exercises change detection in a loop and then prints the average amount of\n     * time in milliseconds how long a single round of change detection takes for\n     * the current state of the UI. It runs a minimum of 5 rounds for a minimum\n     * of 500 milliseconds.\n     *\n     * Optionally, a user may pass a `config` parameter containing a map of\n     * options. Supported options are:\n     *\n     * `record` (boolean) - causes the profiler to record a CPU profile while\n     * it exercises the change detector. Example:\n     *\n     * ```\n     * ng.profiler.timeChangeDetection({record: true})\n     * ```\n     */\n    timeChangeDetection(config) {\n        const record = config && config['record'];\n        const profileName = 'Change Detection';\n        // Profiler is not available in Android browsers without dev tools opened\n        const isProfilerAvailable = win.console.profile != null;\n        if (record && isProfilerAvailable) {\n            win.console.profile(profileName);\n        }\n        const start = performanceNow();\n        let numTicks = 0;\n        while (numTicks < 5 || (performanceNow() - start) < 500) {\n            this.appRef.tick();\n            numTicks++;\n        }\n        const end = performanceNow();\n        if (record && isProfilerAvailable) {\n            win.console.profileEnd(profileName);\n        }\n        const msPerTick = (end - start) / numTicks;\n        win.console.log(`ran ${numTicks} change detection cycles`);\n        win.console.log(`${msPerTick.toFixed(2)} ms per check`);\n        return new ChangeDetectionPerfRecord(msPerTick, numTicks);\n    }\n}\nfunction performanceNow() {\n    return win.performance && win.performance.now ? win.performance.now() :\n        new Date().getTime();\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst PROFILER_GLOBAL_NAME = 'profiler';\n/**\n * Enabled Angular debug tools that are accessible via your browser's\n * developer console.\n *\n * Usage:\n *\n * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)\n * 1. Type `ng.` (usually the console will show auto-complete suggestion)\n * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`\n *    then hit Enter.\n *\n * @publicApi\n */\nfunction enableDebugTools(ref) {\n    exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));\n    return ref;\n}\n/**\n * Disables Angular tools.\n *\n * @publicApi\n */\nfunction disableDebugTools() {\n    exportNgVar(PROFILER_GLOBAL_NAME, null);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction escapeHtml(text) {\n    const escapedText = {\n        '&': '&a;',\n        '\"': '&q;',\n        '\\'': '&s;',\n        '<': '&l;',\n        '>': '&g;',\n    };\n    return text.replace(/[&\"'<>]/g, s => escapedText[s]);\n}\nfunction unescapeHtml(text) {\n    const unescapedText = {\n        '&a;': '&',\n        '&q;': '\"',\n        '&s;': '\\'',\n        '&l;': '<',\n        '&g;': '>',\n    };\n    return text.replace(/&[^;]+;/g, s => unescapedText[s]);\n}\n/**\n * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.\n *\n * Example:\n *\n * ```\n * const COUNTER_KEY = makeStateKey<number>('counter');\n * let value = 10;\n *\n * transferState.set(COUNTER_KEY, value);\n * ```\n *\n * @publicApi\n */\nfunction makeStateKey(key) {\n    return key;\n}\n/**\n * A key value store that is transferred from the application on the server side to the application\n * on the client side.\n *\n * `TransferState` will be available as an injectable token. To use it import\n * `ServerTransferStateModule` on the server and `BrowserTransferStateModule` on the client.\n *\n * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only\n * boolean, number, string, null and non-class objects will be serialized and deserialized in a\n * non-lossy manner.\n *\n * @publicApi\n */\nclass TransferState {\n    constructor() {\n        this.store = {};\n        this.onSerializeCallbacks = {};\n    }\n    /** @internal */\n    static init(initState) {\n        const transferState = new TransferState();\n        transferState.store = initState;\n        return transferState;\n    }\n    /**\n     * Get the value corresponding to a key. Return `defaultValue` if key is not found.\n     */\n    get(key, defaultValue) {\n        return this.store[key] !== undefined ? this.store[key] : defaultValue;\n    }\n    /**\n     * Set the value corresponding to a key.\n     */\n    set(key, value) {\n        this.store[key] = value;\n    }\n    /**\n     * Remove a key from the store.\n     */\n    remove(key) {\n        delete this.store[key];\n    }\n    /**\n     * Test whether a key exists in the store.\n     */\n    hasKey(key) {\n        return this.store.hasOwnProperty(key);\n    }\n    /**\n     * Register a callback to provide the value for a key when `toJson` is called.\n     */\n    onSerialize(key, callback) {\n        this.onSerializeCallbacks[key] = callback;\n    }\n    /**\n     * Serialize the current state of the store to JSON.\n     */\n    toJson() {\n        // Call the onSerialize callbacks and put those values into the store.\n        for (const key in this.onSerializeCallbacks) {\n            if (this.onSerializeCallbacks.hasOwnProperty(key)) {\n                try {\n                    this.store[key] = this.onSerializeCallbacks[key]();\n                }\n                catch (e) {\n                    console.warn('Exception in onSerialize callback: ', e);\n                }\n            }\n        }\n        return JSON.stringify(this.store);\n    }\n}\nTransferState.ɵfac = function TransferState_Factory(t) { return new (t || TransferState)(); };\nTransferState.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: TransferState, factory: TransferState.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(TransferState, [{\n        type: Injectable\n    }], function () { return []; }, null); })();\nfunction initTransferState(doc, appId) {\n    // Locate the script tag with the JSON data transferred from the server.\n    // The id of the script tag is set to the Angular appId + 'state'.\n    const script = doc.getElementById(appId + '-state');\n    let initialState = {};\n    if (script && script.textContent) {\n        try {\n            // Avoid using any here as it triggers lint errors in google3 (any is not allowed).\n            initialState = JSON.parse(unescapeHtml(script.textContent));\n        }\n        catch (e) {\n            console.warn('Exception while restoring TransferState for app ' + appId, e);\n        }\n    }\n    return TransferState.init(initialState);\n}\n/**\n * NgModule to install on the client side while using the `TransferState` to transfer state from\n * server to client.\n *\n * @publicApi\n */\nclass BrowserTransferStateModule {\n}\nBrowserTransferStateModule.ɵfac = function BrowserTransferStateModule_Factory(t) { return new (t || BrowserTransferStateModule)(); };\nBrowserTransferStateModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: BrowserTransferStateModule });\nBrowserTransferStateModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [{ provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT, APP_ID] }] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(BrowserTransferStateModule, [{\n        type: NgModule,\n        args: [{\n                providers: [{ provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT, APP_ID] }]\n            }]\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Predicates for use with {@link DebugElement}'s query functions.\n *\n * @publicApi\n */\nclass By {\n    /**\n     * Match all nodes.\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}\n     */\n    static all() {\n        return () => true;\n    }\n    /**\n     * Match elements by the given CSS selector.\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}\n     */\n    static css(selector) {\n        return (debugElement) => {\n            return debugElement.nativeElement != null ?\n                elementMatches(debugElement.nativeElement, selector) :\n                false;\n        };\n    }\n    /**\n     * Match nodes that have the given directive present.\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}\n     */\n    static directive(type) {\n        return (debugNode) => debugNode.providerTokens.indexOf(type) !== -1;\n    }\n}\nfunction elementMatches(n, selector) {\n    if (ɵgetDOM().isElementNode(n)) {\n        return n.matches && n.matches(selector) ||\n            n.msMatchesSelector && n.msMatchesSelector(selector) ||\n            n.webkitMatchesSelector && n.webkitMatchesSelector(selector);\n    }\n    return false;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('12.2.5');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BrowserModule, BrowserTransferStateModule, By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerModule, Meta, Title, TransferState, VERSION, disableDebugTools, enableDebugTools, makeStateKey, platformBrowser, BROWSER_SANITIZATION_PROVIDERS as ɵBROWSER_SANITIZATION_PROVIDERS, BROWSER_SANITIZATION_PROVIDERS__POST_R3__ as ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__, BrowserDomAdapter as ɵBrowserDomAdapter, BrowserGetTestability as ɵBrowserGetTestability, DomEventsPlugin as ɵDomEventsPlugin, DomRendererFactory2 as ɵDomRendererFactory2, DomSanitizerImpl as ɵDomSanitizerImpl, DomSharedStylesHost as ɵDomSharedStylesHost, ELEMENT_PROBE_PROVIDERS as ɵELEMENT_PROBE_PROVIDERS, ELEMENT_PROBE_PROVIDERS__POST_R3__ as ɵELEMENT_PROBE_PROVIDERS__POST_R3__, HAMMER_PROVIDERS__POST_R3__ as ɵHAMMER_PROVIDERS__POST_R3__, HammerGesturesPlugin as ɵHammerGesturesPlugin, INTERNAL_BROWSER_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, KeyEventsPlugin as ɵKeyEventsPlugin, NAMESPACE_URIS as ɵNAMESPACE_URIS, SharedStylesHost as ɵSharedStylesHost, TRANSITION_ID as ɵTRANSITION_ID, errorHandler as ɵangular_packages_platform_browser_platform_browser_a, _document as ɵangular_packages_platform_browser_platform_browser_b, BROWSER_MODULE_PROVIDERS as ɵangular_packages_platform_browser_platform_browser_c, createMeta as ɵangular_packages_platform_browser_platform_browser_d, createTitle as ɵangular_packages_platform_browser_platform_browser_e, initTransferState as ɵangular_packages_platform_browser_platform_browser_f, EventManagerPlugin as ɵangular_packages_platform_browser_platform_browser_g, HAMMER_PROVIDERS__PRE_R3__ as ɵangular_packages_platform_browser_platform_browser_h, HAMMER_PROVIDERS as ɵangular_packages_platform_browser_platform_browser_i, domSanitizerImplFactory as ɵangular_packages_platform_browser_platform_browser_j, appInitializerFactory as ɵangular_packages_platform_browser_platform_browser_k, SERVER_TRANSITION_PROVIDERS as ɵangular_packages_platform_browser_platform_browser_l, _createNgProbeR2 as ɵangular_packages_platform_browser_platform_browser_m, ELEMENT_PROBE_PROVIDERS__PRE_R3__ as ɵangular_packages_platform_browser_platform_browser_n, BrowserXhr as ɵangular_packages_platform_browser_platform_browser_o, GenericBrowserDomAdapter as ɵangular_packages_platform_browser_platform_browser_p, escapeHtml as ɵescapeHtml, flattenStyles as ɵflattenStyles, initDomAdapter as ɵinitDomAdapter, shimContentAttribute as ɵshimContentAttribute, shimHostAttribute as ɵshimHostAttribute };\n\n","import { mergeMap } from './mergeMap';\nexport function concatMap(project, resultSelector) {\n    return mergeMap(project, resultSelector, 1);\n}\n","/**\n * @license Angular v12.2.5\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { DOCUMENT, XhrFactory as XhrFactory$1, ɵparseCookieValue } from '@angular/common';\nimport { Injectable, InjectionToken, Inject, PLATFORM_ID, Injector, NgModule } from '@angular/core';\nimport { of, Observable } from 'rxjs';\nimport { concatMap, filter, map } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a\n * `HttpResponse`.\n *\n * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the\n * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the\n * `HttpBackend`.\n *\n * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.\n *\n * @publicApi\n */\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/common';\nclass HttpHandler {\n}\n/**\n * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.\n *\n * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.\n *\n * When injected, `HttpBackend` dispatches requests directly to the backend, without going\n * through the interceptor chain.\n *\n * @publicApi\n */\nclass HttpBackend {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents the header configuration options for an HTTP request.\n * Instances are immutable. Modifying methods return a cloned\n * instance with the change. The original object is never changed.\n *\n * @publicApi\n */\nclass HttpHeaders {\n    /**  Constructs a new HTTP header object with the given values.*/\n    constructor(headers) {\n        /**\n         * Internal map of lowercased header names to the normalized\n         * form of the name (the form seen first).\n         */\n        this.normalizedNames = new Map();\n        /**\n         * Queued updates to be materialized the next initialization.\n         */\n        this.lazyUpdate = null;\n        if (!headers) {\n            this.headers = new Map();\n        }\n        else if (typeof headers === 'string') {\n            this.lazyInit = () => {\n                this.headers = new Map();\n                headers.split('\\n').forEach(line => {\n                    const index = line.indexOf(':');\n                    if (index > 0) {\n                        const name = line.slice(0, index);\n                        const key = name.toLowerCase();\n                        const value = line.slice(index + 1).trim();\n                        this.maybeSetNormalizedName(name, key);\n                        if (this.headers.has(key)) {\n                            this.headers.get(key).push(value);\n                        }\n                        else {\n                            this.headers.set(key, [value]);\n                        }\n                    }\n                });\n            };\n        }\n        else {\n            this.lazyInit = () => {\n                this.headers = new Map();\n                Object.keys(headers).forEach(name => {\n                    let values = headers[name];\n                    const key = name.toLowerCase();\n                    if (typeof values === 'string') {\n                        values = [values];\n                    }\n                    if (values.length > 0) {\n                        this.headers.set(key, values);\n                        this.maybeSetNormalizedName(name, key);\n                    }\n                });\n            };\n        }\n    }\n    /**\n     * Checks for existence of a given header.\n     *\n     * @param name The header name to check for existence.\n     *\n     * @returns True if the header exists, false otherwise.\n     */\n    has(name) {\n        this.init();\n        return this.headers.has(name.toLowerCase());\n    }\n    /**\n     * Retrieves the first value of a given header.\n     *\n     * @param name The header name.\n     *\n     * @returns The value string if the header exists, null otherwise\n     */\n    get(name) {\n        this.init();\n        const values = this.headers.get(name.toLowerCase());\n        return values && values.length > 0 ? values[0] : null;\n    }\n    /**\n     * Retrieves the names of the headers.\n     *\n     * @returns A list of header names.\n     */\n    keys() {\n        this.init();\n        return Array.from(this.normalizedNames.values());\n    }\n    /**\n     * Retrieves a list of values for a given header.\n     *\n     * @param name The header name from which to retrieve values.\n     *\n     * @returns A string of values if the header exists, null otherwise.\n     */\n    getAll(name) {\n        this.init();\n        return this.headers.get(name.toLowerCase()) || null;\n    }\n    /**\n     * Appends a new value to the existing set of values for a header\n     * and returns them in a clone of the original instance.\n     *\n     * @param name The header name for which to append the values.\n     * @param value The value to append.\n     *\n     * @returns A clone of the HTTP headers object with the value appended to the given header.\n     */\n    append(name, value) {\n        return this.clone({ name, value, op: 'a' });\n    }\n    /**\n     * Sets or modifies a value for a given header in a clone of the original instance.\n     * If the header already exists, its value is replaced with the given value\n     * in the returned object.\n     *\n     * @param name The header name.\n     * @param value The value or values to set or overide for the given header.\n     *\n     * @returns A clone of the HTTP headers object with the newly set header value.\n     */\n    set(name, value) {\n        return this.clone({ name, value, op: 's' });\n    }\n    /**\n     * Deletes values for a given header in a clone of the original instance.\n     *\n     * @param name The header name.\n     * @param value The value or values to delete for the given header.\n     *\n     * @returns A clone of the HTTP headers object with the given value deleted.\n     */\n    delete(name, value) {\n        return this.clone({ name, value, op: 'd' });\n    }\n    maybeSetNormalizedName(name, lcName) {\n        if (!this.normalizedNames.has(lcName)) {\n            this.normalizedNames.set(lcName, name);\n        }\n    }\n    init() {\n        if (!!this.lazyInit) {\n            if (this.lazyInit instanceof HttpHeaders) {\n                this.copyFrom(this.lazyInit);\n            }\n            else {\n                this.lazyInit();\n            }\n            this.lazyInit = null;\n            if (!!this.lazyUpdate) {\n                this.lazyUpdate.forEach(update => this.applyUpdate(update));\n                this.lazyUpdate = null;\n            }\n        }\n    }\n    copyFrom(other) {\n        other.init();\n        Array.from(other.headers.keys()).forEach(key => {\n            this.headers.set(key, other.headers.get(key));\n            this.normalizedNames.set(key, other.normalizedNames.get(key));\n        });\n    }\n    clone(update) {\n        const clone = new HttpHeaders();\n        clone.lazyInit =\n            (!!this.lazyInit && this.lazyInit instanceof HttpHeaders) ? this.lazyInit : this;\n        clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);\n        return clone;\n    }\n    applyUpdate(update) {\n        const key = update.name.toLowerCase();\n        switch (update.op) {\n            case 'a':\n            case 's':\n                let value = update.value;\n                if (typeof value === 'string') {\n                    value = [value];\n                }\n                if (value.length === 0) {\n                    return;\n                }\n                this.maybeSetNormalizedName(update.name, key);\n                const base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];\n                base.push(...value);\n                this.headers.set(key, base);\n                break;\n            case 'd':\n                const toDelete = update.value;\n                if (!toDelete) {\n                    this.headers.delete(key);\n                    this.normalizedNames.delete(key);\n                }\n                else {\n                    let existing = this.headers.get(key);\n                    if (!existing) {\n                        return;\n                    }\n                    existing = existing.filter(value => toDelete.indexOf(value) === -1);\n                    if (existing.length === 0) {\n                        this.headers.delete(key);\n                        this.normalizedNames.delete(key);\n                    }\n                    else {\n                        this.headers.set(key, existing);\n                    }\n                }\n                break;\n        }\n    }\n    /**\n     * @internal\n     */\n    forEach(fn) {\n        this.init();\n        Array.from(this.normalizedNames.keys())\n            .forEach(key => fn(this.normalizedNames.get(key), this.headers.get(key)));\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provides encoding and decoding of URL parameter and query-string values.\n *\n * Serializes and parses URL parameter keys and values to encode and decode them.\n * If you pass URL query parameters without encoding,\n * the query parameters can be misinterpreted at the receiving end.\n *\n *\n * @publicApi\n */\nclass HttpUrlEncodingCodec {\n    /**\n     * Encodes a key name for a URL parameter or query-string.\n     * @param key The key name.\n     * @returns The encoded key name.\n     */\n    encodeKey(key) {\n        return standardEncoding(key);\n    }\n    /**\n     * Encodes the value of a URL parameter or query-string.\n     * @param value The value.\n     * @returns The encoded value.\n     */\n    encodeValue(value) {\n        return standardEncoding(value);\n    }\n    /**\n     * Decodes an encoded URL parameter or query-string key.\n     * @param key The encoded key name.\n     * @returns The decoded key name.\n     */\n    decodeKey(key) {\n        return decodeURIComponent(key);\n    }\n    /**\n     * Decodes an encoded URL parameter or query-string value.\n     * @param value The encoded value.\n     * @returns The decoded value.\n     */\n    decodeValue(value) {\n        return decodeURIComponent(value);\n    }\n}\nfunction paramParser(rawParams, codec) {\n    const map = new Map();\n    if (rawParams.length > 0) {\n        // The `window.location.search` can be used while creating an instance of the `HttpParams` class\n        // (e.g. `new HttpParams({ fromString: window.location.search })`). The `window.location.search`\n        // may start with the `?` char, so we strip it if it's present.\n        const params = rawParams.replace(/^\\?/, '').split('&');\n        params.forEach((param) => {\n            const eqIdx = param.indexOf('=');\n            const [key, val] = eqIdx == -1 ?\n                [codec.decodeKey(param), ''] :\n                [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))];\n            const list = map.get(key) || [];\n            list.push(val);\n            map.set(key, list);\n        });\n    }\n    return map;\n}\n/**\n * Encode input string with standard encodeURIComponent and then un-encode specific characters.\n */\nconst STANDARD_ENCODING_REGEX = /%(\\d[a-f0-9])/gi;\nconst STANDARD_ENCODING_REPLACEMENTS = {\n    '40': '@',\n    '3A': ':',\n    '24': '$',\n    '2C': ',',\n    '3B': ';',\n    '2B': '+',\n    '3D': '=',\n    '3F': '?',\n    '2F': '/',\n};\nfunction standardEncoding(v) {\n    return encodeURIComponent(v).replace(STANDARD_ENCODING_REGEX, (s, t) => { var _a; return (_a = STANDARD_ENCODING_REPLACEMENTS[t]) !== null && _a !== void 0 ? _a : s; });\n}\nfunction valueToString(value) {\n    return `${value}`;\n}\n/**\n * An HTTP request/response body that represents serialized parameters,\n * per the MIME type `application/x-www-form-urlencoded`.\n *\n * This class is immutable; all mutation operations return a new instance.\n *\n * @publicApi\n */\nclass HttpParams {\n    constructor(options = {}) {\n        this.updates = null;\n        this.cloneFrom = null;\n        this.encoder = options.encoder || new HttpUrlEncodingCodec();\n        if (!!options.fromString) {\n            if (!!options.fromObject) {\n                throw new Error(`Cannot specify both fromString and fromObject.`);\n            }\n            this.map = paramParser(options.fromString, this.encoder);\n        }\n        else if (!!options.fromObject) {\n            this.map = new Map();\n            Object.keys(options.fromObject).forEach(key => {\n                const value = options.fromObject[key];\n                this.map.set(key, Array.isArray(value) ? value : [value]);\n            });\n        }\n        else {\n            this.map = null;\n        }\n    }\n    /**\n     * Reports whether the body includes one or more values for a given parameter.\n     * @param param The parameter name.\n     * @returns True if the parameter has one or more values,\n     * false if it has no value or is not present.\n     */\n    has(param) {\n        this.init();\n        return this.map.has(param);\n    }\n    /**\n     * Retrieves the first value for a parameter.\n     * @param param The parameter name.\n     * @returns The first value of the given parameter,\n     * or `null` if the parameter is not present.\n     */\n    get(param) {\n        this.init();\n        const res = this.map.get(param);\n        return !!res ? res[0] : null;\n    }\n    /**\n     * Retrieves all values for a  parameter.\n     * @param param The parameter name.\n     * @returns All values in a string array,\n     * or `null` if the parameter not present.\n     */\n    getAll(param) {\n        this.init();\n        return this.map.get(param) || null;\n    }\n    /**\n     * Retrieves all the parameters for this body.\n     * @returns The parameter names in a string array.\n     */\n    keys() {\n        this.init();\n        return Array.from(this.map.keys());\n    }\n    /**\n     * Appends a new value to existing values for a parameter.\n     * @param param The parameter name.\n     * @param value The new value to add.\n     * @return A new body with the appended value.\n     */\n    append(param, value) {\n        return this.clone({ param, value, op: 'a' });\n    }\n    /**\n     * Constructs a new body with appended values for the given parameter name.\n     * @param params parameters and values\n     * @return A new body with the new value.\n     */\n    appendAll(params) {\n        const updates = [];\n        Object.keys(params).forEach(param => {\n            const value = params[param];\n            if (Array.isArray(value)) {\n                value.forEach(_value => {\n                    updates.push({ param, value: _value, op: 'a' });\n                });\n            }\n            else {\n                updates.push({ param, value: value, op: 'a' });\n            }\n        });\n        return this.clone(updates);\n    }\n    /**\n     * Replaces the value for a parameter.\n     * @param param The parameter name.\n     * @param value The new value.\n     * @return A new body with the new value.\n     */\n    set(param, value) {\n        return this.clone({ param, value, op: 's' });\n    }\n    /**\n     * Removes a given value or all values from a parameter.\n     * @param param The parameter name.\n     * @param value The value to remove, if provided.\n     * @return A new body with the given value removed, or with all values\n     * removed if no value is specified.\n     */\n    delete(param, value) {\n        return this.clone({ param, value, op: 'd' });\n    }\n    /**\n     * Serializes the body to an encoded string, where key-value pairs (separated by `=`) are\n     * separated by `&`s.\n     */\n    toString() {\n        this.init();\n        return this.keys()\n            .map(key => {\n            const eKey = this.encoder.encodeKey(key);\n            // `a: ['1']` produces `'a=1'`\n            // `b: []` produces `''`\n            // `c: ['1', '2']` produces `'c=1&c=2'`\n            return this.map.get(key).map(value => eKey + '=' + this.encoder.encodeValue(value))\n                .join('&');\n        })\n            // filter out empty values because `b: []` produces `''`\n            // which results in `a=1&&c=1&c=2` instead of `a=1&c=1&c=2` if we don't\n            .filter(param => param !== '')\n            .join('&');\n    }\n    clone(update) {\n        const clone = new HttpParams({ encoder: this.encoder });\n        clone.cloneFrom = this.cloneFrom || this;\n        clone.updates = (this.updates || []).concat(update);\n        return clone;\n    }\n    init() {\n        if (this.map === null) {\n            this.map = new Map();\n        }\n        if (this.cloneFrom !== null) {\n            this.cloneFrom.init();\n            this.cloneFrom.keys().forEach(key => this.map.set(key, this.cloneFrom.map.get(key)));\n            this.updates.forEach(update => {\n                switch (update.op) {\n                    case 'a':\n                    case 's':\n                        const base = (update.op === 'a' ? this.map.get(update.param) : undefined) || [];\n                        base.push(valueToString(update.value));\n                        this.map.set(update.param, base);\n                        break;\n                    case 'd':\n                        if (update.value !== undefined) {\n                            let base = this.map.get(update.param) || [];\n                            const idx = base.indexOf(valueToString(update.value));\n                            if (idx !== -1) {\n                                base.splice(idx, 1);\n                            }\n                            if (base.length > 0) {\n                                this.map.set(update.param, base);\n                            }\n                            else {\n                                this.map.delete(update.param);\n                            }\n                        }\n                        else {\n                            this.map.delete(update.param);\n                            break;\n                        }\n                }\n            });\n            this.cloneFrom = this.updates = null;\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A token used to manipulate and access values stored in `HttpContext`.\n *\n * @publicApi\n */\nclass HttpContextToken {\n    constructor(defaultValue) {\n        this.defaultValue = defaultValue;\n    }\n}\n/**\n * Http context stores arbitrary user defined values and ensures type safety without\n * actually knowing the types. It is backed by a `Map` and guarantees that keys do not clash.\n *\n * This context is mutable and is shared between cloned requests unless explicitly specified.\n *\n * @usageNotes\n *\n * ### Usage Example\n *\n * ```typescript\n * // inside cache.interceptors.ts\n * export const IS_CACHE_ENABLED = new HttpContextToken<boolean>(() => false);\n *\n * export class CacheInterceptor implements HttpInterceptor {\n *\n *   intercept(req: HttpRequest<any>, delegate: HttpHandler): Observable<HttpEvent<any>> {\n *     if (req.context.get(IS_CACHE_ENABLED) === true) {\n *       return ...;\n *     }\n *     return delegate.handle(req);\n *   }\n * }\n *\n * // inside a service\n *\n * this.httpClient.get('/api/weather', {\n *   context: new HttpContext().set(IS_CACHE_ENABLED, true)\n * }).subscribe(...);\n * ```\n *\n * @publicApi\n */\nclass HttpContext {\n    constructor() {\n        this.map = new Map();\n    }\n    /**\n     * Store a value in the context. If a value is already present it will be overwritten.\n     *\n     * @param token The reference to an instance of `HttpContextToken`.\n     * @param value The value to store.\n     *\n     * @returns A reference to itself for easy chaining.\n     */\n    set(token, value) {\n        this.map.set(token, value);\n        return this;\n    }\n    /**\n     * Retrieve the value associated with the given token.\n     *\n     * @param token The reference to an instance of `HttpContextToken`.\n     *\n     * @returns The stored value or default if one is defined.\n     */\n    get(token) {\n        if (!this.map.has(token)) {\n            this.map.set(token, token.defaultValue());\n        }\n        return this.map.get(token);\n    }\n    /**\n     * Delete the value associated with the given token.\n     *\n     * @param token The reference to an instance of `HttpContextToken`.\n     *\n     * @returns A reference to itself for easy chaining.\n     */\n    delete(token) {\n        this.map.delete(token);\n        return this;\n    }\n    /**\n     * @returns a list of tokens currently stored in the context.\n     */\n    keys() {\n        return this.map.keys();\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Determine whether the given HTTP method may include a body.\n */\nfunction mightHaveBody(method) {\n    switch (method) {\n        case 'DELETE':\n        case 'GET':\n        case 'HEAD':\n        case 'OPTIONS':\n        case 'JSONP':\n            return false;\n        default:\n            return true;\n    }\n}\n/**\n * Safely assert whether the given value is an ArrayBuffer.\n *\n * In some execution environments ArrayBuffer is not defined.\n */\nfunction isArrayBuffer(value) {\n    return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}\n/**\n * Safely assert whether the given value is a Blob.\n *\n * In some execution environments Blob is not defined.\n */\nfunction isBlob(value) {\n    return typeof Blob !== 'undefined' && value instanceof Blob;\n}\n/**\n * Safely assert whether the given value is a FormData instance.\n *\n * In some execution environments FormData is not defined.\n */\nfunction isFormData(value) {\n    return typeof FormData !== 'undefined' && value instanceof FormData;\n}\n/**\n * Safely assert whether the given value is a URLSearchParams instance.\n *\n * In some execution environments URLSearchParams is not defined.\n */\nfunction isUrlSearchParams(value) {\n    return typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams;\n}\n/**\n * An outgoing HTTP request with an optional typed body.\n *\n * `HttpRequest` represents an outgoing request, including URL, method,\n * headers, body, and other request configuration options. Instances should be\n * assumed to be immutable. To modify a `HttpRequest`, the `clone`\n * method should be used.\n *\n * @publicApi\n */\nclass HttpRequest {\n    constructor(method, url, third, fourth) {\n        this.url = url;\n        /**\n         * The request body, or `null` if one isn't set.\n         *\n         * Bodies are not enforced to be immutable, as they can include a reference to any\n         * user-defined data type. However, interceptors should take care to preserve\n         * idempotence by treating them as such.\n         */\n        this.body = null;\n        /**\n         * Whether this request should be made in a way that exposes progress events.\n         *\n         * Progress events are expensive (change detection runs on each event) and so\n         * they should only be requested if the consumer intends to monitor them.\n         */\n        this.reportProgress = false;\n        /**\n         * Whether this request should be sent with outgoing credentials (cookies).\n         */\n        this.withCredentials = false;\n        /**\n         * The expected response type of the server.\n         *\n         * This is used to parse the response appropriately before returning it to\n         * the requestee.\n         */\n        this.responseType = 'json';\n        this.method = method.toUpperCase();\n        // Next, need to figure out which argument holds the HttpRequestInit\n        // options, if any.\n        let options;\n        // Check whether a body argument is expected. The only valid way to omit\n        // the body argument is to use a known no-body method like GET.\n        if (mightHaveBody(this.method) || !!fourth) {\n            // Body is the third argument, options are the fourth.\n            this.body = (third !== undefined) ? third : null;\n            options = fourth;\n        }\n        else {\n            // No body required, options are the third argument. The body stays null.\n            options = third;\n        }\n        // If options have been passed, interpret them.\n        if (options) {\n            // Normalize reportProgress and withCredentials.\n            this.reportProgress = !!options.reportProgress;\n            this.withCredentials = !!options.withCredentials;\n            // Override default response type of 'json' if one is provided.\n            if (!!options.responseType) {\n                this.responseType = options.responseType;\n            }\n            // Override headers if they're provided.\n            if (!!options.headers) {\n                this.headers = options.headers;\n            }\n            if (!!options.context) {\n                this.context = options.context;\n            }\n            if (!!options.params) {\n                this.params = options.params;\n            }\n        }\n        // If no headers have been passed in, construct a new HttpHeaders instance.\n        if (!this.headers) {\n            this.headers = new HttpHeaders();\n        }\n        // If no context have been passed in, construct a new HttpContext instance.\n        if (!this.context) {\n            this.context = new HttpContext();\n        }\n        // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance.\n        if (!this.params) {\n            this.params = new HttpParams();\n            this.urlWithParams = url;\n        }\n        else {\n            // Encode the parameters to a string in preparation for inclusion in the URL.\n            const params = this.params.toString();\n            if (params.length === 0) {\n                // No parameters, the visible URL is just the URL given at creation time.\n                this.urlWithParams = url;\n            }\n            else {\n                // Does the URL already have query parameters? Look for '?'.\n                const qIdx = url.indexOf('?');\n                // There are 3 cases to handle:\n                // 1) No existing parameters -> append '?' followed by params.\n                // 2) '?' exists and is followed by existing query string ->\n                //    append '&' followed by params.\n                // 3) '?' exists at the end of the url -> append params directly.\n                // This basically amounts to determining the character, if any, with\n                // which to join the URL and parameters.\n                const sep = qIdx === -1 ? '?' : (qIdx < url.length - 1 ? '&' : '');\n                this.urlWithParams = url + sep + params;\n            }\n        }\n    }\n    /**\n     * Transform the free-form body into a serialized format suitable for\n     * transmission to the server.\n     */\n    serializeBody() {\n        // If no body is present, no need to serialize it.\n        if (this.body === null) {\n            return null;\n        }\n        // Check whether the body is already in a serialized form. If so,\n        // it can just be returned directly.\n        if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n            isUrlSearchParams(this.body) || typeof this.body === 'string') {\n            return this.body;\n        }\n        // Check whether the body is an instance of HttpUrlEncodedParams.\n        if (this.body instanceof HttpParams) {\n            return this.body.toString();\n        }\n        // Check whether the body is an object or array, and serialize with JSON if so.\n        if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n            Array.isArray(this.body)) {\n            return JSON.stringify(this.body);\n        }\n        // Fall back on toString() for everything else.\n        return this.body.toString();\n    }\n    /**\n     * Examine the body and attempt to infer an appropriate MIME type\n     * for it.\n     *\n     * If no such type can be inferred, this method will return `null`.\n     */\n    detectContentTypeHeader() {\n        // An empty body has no content type.\n        if (this.body === null) {\n            return null;\n        }\n        // FormData bodies rely on the browser's content type assignment.\n        if (isFormData(this.body)) {\n            return null;\n        }\n        // Blobs usually have their own content type. If it doesn't, then\n        // no type can be inferred.\n        if (isBlob(this.body)) {\n            return this.body.type || null;\n        }\n        // Array buffers have unknown contents and thus no type can be inferred.\n        if (isArrayBuffer(this.body)) {\n            return null;\n        }\n        // Technically, strings could be a form of JSON data, but it's safe enough\n        // to assume they're plain strings.\n        if (typeof this.body === 'string') {\n            return 'text/plain';\n        }\n        // `HttpUrlEncodedParams` has its own content-type.\n        if (this.body instanceof HttpParams) {\n            return 'application/x-www-form-urlencoded;charset=UTF-8';\n        }\n        // Arrays, objects, boolean and numbers will be encoded as JSON.\n        if (typeof this.body === 'object' || typeof this.body === 'number' ||\n            typeof this.body === 'boolean') {\n            return 'application/json';\n        }\n        // No type could be inferred.\n        return null;\n    }\n    clone(update = {}) {\n        var _a;\n        // For method, url, and responseType, take the current value unless\n        // it is overridden in the update hash.\n        const method = update.method || this.method;\n        const url = update.url || this.url;\n        const responseType = update.responseType || this.responseType;\n        // The body is somewhat special - a `null` value in update.body means\n        // whatever current body is present is being overridden with an empty\n        // body, whereas an `undefined` value in update.body implies no\n        // override.\n        const body = (update.body !== undefined) ? update.body : this.body;\n        // Carefully handle the boolean options to differentiate between\n        // `false` and `undefined` in the update args.\n        const withCredentials = (update.withCredentials !== undefined) ? update.withCredentials : this.withCredentials;\n        const reportProgress = (update.reportProgress !== undefined) ? update.reportProgress : this.reportProgress;\n        // Headers and params may be appended to if `setHeaders` or\n        // `setParams` are used.\n        let headers = update.headers || this.headers;\n        let params = update.params || this.params;\n        // Pass on context if needed\n        const context = (_a = update.context) !== null && _a !== void 0 ? _a : this.context;\n        // Check whether the caller has asked to add headers.\n        if (update.setHeaders !== undefined) {\n            // Set every requested header.\n            headers =\n                Object.keys(update.setHeaders)\n                    .reduce((headers, name) => headers.set(name, update.setHeaders[name]), headers);\n        }\n        // Check whether the caller has asked to set params.\n        if (update.setParams) {\n            // Set every requested param.\n            params = Object.keys(update.setParams)\n                .reduce((params, param) => params.set(param, update.setParams[param]), params);\n        }\n        // Finally, construct the new HttpRequest using the pieces from above.\n        return new HttpRequest(method, url, body, {\n            params,\n            headers,\n            context,\n            reportProgress,\n            responseType,\n            withCredentials,\n        });\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Type enumeration for the different kinds of `HttpEvent`.\n *\n * @publicApi\n */\nvar HttpEventType;\n(function (HttpEventType) {\n    /**\n     * The request was sent out over the wire.\n     */\n    HttpEventType[HttpEventType[\"Sent\"] = 0] = \"Sent\";\n    /**\n     * An upload progress event was received.\n     */\n    HttpEventType[HttpEventType[\"UploadProgress\"] = 1] = \"UploadProgress\";\n    /**\n     * The response status code and headers were received.\n     */\n    HttpEventType[HttpEventType[\"ResponseHeader\"] = 2] = \"ResponseHeader\";\n    /**\n     * A download progress event was received.\n     */\n    HttpEventType[HttpEventType[\"DownloadProgress\"] = 3] = \"DownloadProgress\";\n    /**\n     * The full response including the body was received.\n     */\n    HttpEventType[HttpEventType[\"Response\"] = 4] = \"Response\";\n    /**\n     * A custom event from an interceptor or a backend.\n     */\n    HttpEventType[HttpEventType[\"User\"] = 5] = \"User\";\n})(HttpEventType || (HttpEventType = {}));\n/**\n * Base class for both `HttpResponse` and `HttpHeaderResponse`.\n *\n * @publicApi\n */\nclass HttpResponseBase {\n    /**\n     * Super-constructor for all responses.\n     *\n     * The single parameter accepted is an initialization hash. Any properties\n     * of the response passed there will override the default values.\n     */\n    constructor(init, defaultStatus = 200 /* Ok */, defaultStatusText = 'OK') {\n        // If the hash has values passed, use them to initialize the response.\n        // Otherwise use the default values.\n        this.headers = init.headers || new HttpHeaders();\n        this.status = init.status !== undefined ? init.status : defaultStatus;\n        this.statusText = init.statusText || defaultStatusText;\n        this.url = init.url || null;\n        // Cache the ok value to avoid defining a getter.\n        this.ok = this.status >= 200 && this.status < 300;\n    }\n}\n/**\n * A partial HTTP response which only includes the status and header data,\n * but no response body.\n *\n * `HttpHeaderResponse` is a `HttpEvent` available on the response\n * event stream, only when progress events are requested.\n *\n * @publicApi\n */\nclass HttpHeaderResponse extends HttpResponseBase {\n    /**\n     * Create a new `HttpHeaderResponse` with the given parameters.\n     */\n    constructor(init = {}) {\n        super(init);\n        this.type = HttpEventType.ResponseHeader;\n    }\n    /**\n     * Copy this `HttpHeaderResponse`, overriding its contents with the\n     * given parameter hash.\n     */\n    clone(update = {}) {\n        // Perform a straightforward initialization of the new HttpHeaderResponse,\n        // overriding the current parameters with new ones if given.\n        return new HttpHeaderResponse({\n            headers: update.headers || this.headers,\n            status: update.status !== undefined ? update.status : this.status,\n            statusText: update.statusText || this.statusText,\n            url: update.url || this.url || undefined,\n        });\n    }\n}\n/**\n * A full HTTP response, including a typed response body (which may be `null`\n * if one was not returned).\n *\n * `HttpResponse` is a `HttpEvent` available on the response event\n * stream.\n *\n * @publicApi\n */\nclass HttpResponse extends HttpResponseBase {\n    /**\n     * Construct a new `HttpResponse`.\n     */\n    constructor(init = {}) {\n        super(init);\n        this.type = HttpEventType.Response;\n        this.body = init.body !== undefined ? init.body : null;\n    }\n    clone(update = {}) {\n        return new HttpResponse({\n            body: (update.body !== undefined) ? update.body : this.body,\n            headers: update.headers || this.headers,\n            status: (update.status !== undefined) ? update.status : this.status,\n            statusText: update.statusText || this.statusText,\n            url: update.url || this.url || undefined,\n        });\n    }\n}\n/**\n * A response that represents an error or failure, either from a\n * non-successful HTTP status, an error while executing the request,\n * or some other failure which occurred during the parsing of the response.\n *\n * Any error returned on the `Observable` response stream will be\n * wrapped in an `HttpErrorResponse` to provide additional context about\n * the state of the HTTP layer when the error occurred. The error property\n * will contain either a wrapped Error object or the error response returned\n * from the server.\n *\n * @publicApi\n */\nclass HttpErrorResponse extends HttpResponseBase {\n    constructor(init) {\n        // Initialize with a default status of 0 / Unknown Error.\n        super(init, 0, 'Unknown Error');\n        this.name = 'HttpErrorResponse';\n        /**\n         * Errors are never okay, even when the status code is in the 2xx success range.\n         */\n        this.ok = false;\n        // If the response was successful, then this was a parse error. Otherwise, it was\n        // a protocol-level failure of some sort. Either the request failed in transit\n        // or the server returned an unsuccessful status code.\n        if (this.status >= 200 && this.status < 300) {\n            this.message = `Http failure during parsing for ${init.url || '(unknown url)'}`;\n        }\n        else {\n            this.message = `Http failure response for ${init.url || '(unknown url)'}: ${init.status} ${init.statusText}`;\n        }\n        this.error = init.error || null;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Constructs an instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and\n * the given `body`. This function clones the object and adds the body.\n *\n * Note that the `responseType` *options* value is a String that identifies the\n * single data type of the response.\n * A single overload version of the method handles each response type.\n * The value of `responseType` cannot be a union, as the combined signature could imply.\n *\n */\nfunction addBody(options, body) {\n    return {\n        body,\n        headers: options.headers,\n        context: options.context,\n        observe: options.observe,\n        params: options.params,\n        reportProgress: options.reportProgress,\n        responseType: options.responseType,\n        withCredentials: options.withCredentials,\n    };\n}\n/**\n * Performs HTTP requests.\n * This service is available as an injectable class, with methods to perform HTTP requests.\n * Each request method has multiple signatures, and the return type varies based on\n * the signature that is called (mainly the values of `observe` and `responseType`).\n *\n * Note that the `responseType` *options* value is a String that identifies the\n * single data type of the response.\n * A single overload version of the method handles each response type.\n * The value of `responseType` cannot be a union, as the combined signature could imply.\n\n *\n * @usageNotes\n * Sample HTTP requests for the [Tour of Heroes](/tutorial/toh-pt0) application.\n *\n * ### HTTP Request Example\n *\n * ```\n *  // GET heroes whose name contains search term\n * searchHeroes(term: string): observable<Hero[]>{\n *\n *  const params = new HttpParams({fromString: 'name=term'});\n *    return this.httpClient.request('GET', this.heroesUrl, {responseType:'json', params});\n * }\n * ```\n *\n * Alternatively, the parameter string can be used without invoking HttpParams\n * by directly joining to the URL.\n * ```\n * this.httpClient.request('GET', this.heroesUrl + '?' + 'name=term', {responseType:'json'});\n * ```\n *\n *\n * ### JSONP Example\n * ```\n * requestJsonp(url, callback = 'callback') {\n *  return this.httpClient.jsonp(this.heroesURL, callback);\n * }\n * ```\n *\n * ### PATCH Example\n * ```\n * // PATCH one of the heroes' name\n * patchHero (id: number, heroName: string): Observable<{}> {\n * const url = `${this.heroesUrl}/${id}`;   // PATCH api/heroes/42\n *  return this.httpClient.patch(url, {name: heroName}, httpOptions)\n *    .pipe(catchError(this.handleError('patchHero')));\n * }\n * ```\n *\n * @see [HTTP Guide](guide/http)\n * @see [HTTP Request](api/common/http/HttpRequest)\n *\n * @publicApi\n */\nclass HttpClient {\n    constructor(handler) {\n        this.handler = handler;\n    }\n    /**\n     * Constructs an observable for a generic HTTP request that, when subscribed,\n     * fires the request through the chain of registered interceptors and on to the\n     * server.\n     *\n     * You can pass an `HttpRequest` directly as the only parameter. In this case,\n     * the call returns an observable of the raw `HttpEvent` stream.\n     *\n     * Alternatively you can pass an HTTP method as the first parameter,\n     * a URL string as the second, and an options hash containing the request body as the third.\n     * See `addBody()`. In this case, the specified `responseType` and `observe` options determine the\n     * type of returned observable.\n     *   * The `responseType` value determines how a successful response body is parsed.\n     *   * If `responseType` is the default `json`, you can pass a type interface for the resulting\n     * object as a type parameter to the call.\n     *\n     * The `observe` value determines the return type, according to what you are interested in\n     * observing.\n     *   * An `observe` value of events returns an observable of the raw `HttpEvent` stream, including\n     * progress events by default.\n     *   * An `observe` value of response returns an observable of `HttpResponse<T>`,\n     * where the `T` parameter depends on the `responseType` and any optionally provided type\n     * parameter.\n     *   * An `observe` value of body returns an observable of `<T>` with the same `T` body type.\n     *\n     */\n    request(first, url, options = {}) {\n        let req;\n        // First, check whether the primary argument is an instance of `HttpRequest`.\n        if (first instanceof HttpRequest) {\n            // It is. The other arguments must be undefined (per the signatures) and can be\n            // ignored.\n            req = first;\n        }\n        else {\n            // It's a string, so it represents a URL. Construct a request based on it,\n            // and incorporate the remaining arguments (assuming `GET` unless a method is\n            // provided.\n            // Figure out the headers.\n            let headers = undefined;\n            if (options.headers instanceof HttpHeaders) {\n                headers = options.headers;\n            }\n            else {\n                headers = new HttpHeaders(options.headers);\n            }\n            // Sort out parameters.\n            let params = undefined;\n            if (!!options.params) {\n                if (options.params instanceof HttpParams) {\n                    params = options.params;\n                }\n                else {\n                    params = new HttpParams({ fromObject: options.params });\n                }\n            }\n            // Construct the request.\n            req = new HttpRequest(first, url, (options.body !== undefined ? options.body : null), {\n                headers,\n                context: options.context,\n                params,\n                reportProgress: options.reportProgress,\n                // By default, JSON is assumed to be returned for all calls.\n                responseType: options.responseType || 'json',\n                withCredentials: options.withCredentials,\n            });\n        }\n        // Start with an Observable.of() the initial request, and run the handler (which\n        // includes all interceptors) inside a concatMap(). This way, the handler runs\n        // inside an Observable chain, which causes interceptors to be re-run on every\n        // subscription (this also makes retries re-run the handler, including interceptors).\n        const events$ = of(req).pipe(concatMap((req) => this.handler.handle(req)));\n        // If coming via the API signature which accepts a previously constructed HttpRequest,\n        // the only option is to get the event stream. Otherwise, return the event stream if\n        // that is what was requested.\n        if (first instanceof HttpRequest || options.observe === 'events') {\n            return events$;\n        }\n        // The requested stream contains either the full response or the body. In either\n        // case, the first step is to filter the event stream to extract a stream of\n        // responses(s).\n        const res$ = events$.pipe(filter((event) => event instanceof HttpResponse));\n        // Decide which stream to return.\n        switch (options.observe || 'body') {\n            case 'body':\n                // The requested stream is the body. Map the response stream to the response\n                // body. This could be done more simply, but a misbehaving interceptor might\n                // transform the response body into a different format and ignore the requested\n                // responseType. Guard against this by validating that the response is of the\n                // requested type.\n                switch (req.responseType) {\n                    case 'arraybuffer':\n                        return res$.pipe(map((res) => {\n                            // Validate that the body is an ArrayBuffer.\n                            if (res.body !== null && !(res.body instanceof ArrayBuffer)) {\n                                throw new Error('Response is not an ArrayBuffer.');\n                            }\n                            return res.body;\n                        }));\n                    case 'blob':\n                        return res$.pipe(map((res) => {\n                            // Validate that the body is a Blob.\n                            if (res.body !== null && !(res.body instanceof Blob)) {\n                                throw new Error('Response is not a Blob.');\n                            }\n                            return res.body;\n                        }));\n                    case 'text':\n                        return res$.pipe(map((res) => {\n                            // Validate that the body is a string.\n                            if (res.body !== null && typeof res.body !== 'string') {\n                                throw new Error('Response is not a string.');\n                            }\n                            return res.body;\n                        }));\n                    case 'json':\n                    default:\n                        // No validation needed for JSON responses, as they can be of any type.\n                        return res$.pipe(map((res) => res.body));\n                }\n            case 'response':\n                // The response stream was requested directly, so return it.\n                return res$;\n            default:\n                // Guard against new future observe types being added.\n                throw new Error(`Unreachable: unhandled observe type ${options.observe}}`);\n        }\n    }\n    /**\n     * Constructs an observable that, when subscribed, causes the configured\n     * `DELETE` request to execute on the server. See the individual overloads for\n     * details on the return type.\n     *\n     * @param url     The endpoint URL.\n     * @param options The HTTP options to send with the request.\n     *\n     */\n    delete(url, options = {}) {\n        return this.request('DELETE', url, options);\n    }\n    /**\n     * Constructs an observable that, when subscribed, causes the configured\n     * `GET` request to execute on the server. See the individual overloads for\n     * details on the return type.\n     */\n    get(url, options = {}) {\n        return this.request('GET', url, options);\n    }\n    /**\n     * Constructs an observable that, when subscribed, causes the configured\n     * `HEAD` request to execute on the server. The `HEAD` method returns\n     * meta information about the resource without transferring the\n     * resource itself. See the individual overloads for\n     * details on the return type.\n     */\n    head(url, options = {}) {\n        return this.request('HEAD', url, options);\n    }\n    /**\n     * Constructs an `Observable` that, when subscribed, causes a request with the special method\n     * `JSONP` to be dispatched via the interceptor pipeline.\n     * The [JSONP pattern](https://en.wikipedia.org/wiki/JSONP) works around limitations of certain\n     * API endpoints that don't support newer,\n     * and preferable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) protocol.\n     * JSONP treats the endpoint API as a JavaScript file and tricks the browser to process the\n     * requests even if the API endpoint is not located on the same domain (origin) as the client-side\n     * application making the request.\n     * The endpoint API must support JSONP callback for JSONP requests to work.\n     * The resource API returns the JSON response wrapped in a callback function.\n     * You can pass the callback function name as one of the query parameters.\n     * Note that JSONP requests can only be used with `GET` requests.\n     *\n     * @param url The resource URL.\n     * @param callbackParam The callback function name.\n     *\n     */\n    jsonp(url, callbackParam) {\n        return this.request('JSONP', url, {\n            params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'),\n            observe: 'body',\n            responseType: 'json',\n        });\n    }\n    /**\n     * Constructs an `Observable` that, when subscribed, causes the configured\n     * `OPTIONS` request to execute on the server. This method allows the client\n     * to determine the supported HTTP methods and other capabilities of an endpoint,\n     * without implying a resource action. See the individual overloads for\n     * details on the return type.\n     */\n    options(url, options = {}) {\n        return this.request('OPTIONS', url, options);\n    }\n    /**\n     * Constructs an observable that, when subscribed, causes the configured\n     * `PATCH` request to execute on the server. See the individual overloads for\n     * details on the return type.\n     */\n    patch(url, body, options = {}) {\n        return this.request('PATCH', url, addBody(options, body));\n    }\n    /**\n     * Constructs an observable that, when subscribed, causes the configured\n     * `POST` request to execute on the server. The server responds with the location of\n     * the replaced resource. See the individual overloads for\n     * details on the return type.\n     */\n    post(url, body, options = {}) {\n        return this.request('POST', url, addBody(options, body));\n    }\n    /**\n     * Constructs an observable that, when subscribed, causes the configured\n     * `PUT` request to execute on the server. The `PUT` method replaces an existing resource\n     * with a new set of values.\n     * See the individual overloads for details on the return type.\n     */\n    put(url, body, options = {}) {\n        return this.request('PUT', url, addBody(options, body));\n    }\n}\nHttpClient.ɵfac = function HttpClient_Factory(t) { return new (t || HttpClient)(ɵngcc0.ɵɵinject(HttpHandler)); };\nHttpClient.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: HttpClient, factory: HttpClient.ɵfac });\nHttpClient.ctorParameters = () => [\n    { type: HttpHandler }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(HttpClient, [{\n        type: Injectable\n    }], function () { return [{ type: HttpHandler }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`.\n *\n *\n */\nclass HttpInterceptorHandler {\n    constructor(next, interceptor) {\n        this.next = next;\n        this.interceptor = interceptor;\n    }\n    handle(req) {\n        return this.interceptor.intercept(req, this.next);\n    }\n}\n/**\n * A multi-provider token that represents the array of registered\n * `HttpInterceptor` objects.\n *\n * @publicApi\n */\nconst HTTP_INTERCEPTORS = new InjectionToken('HTTP_INTERCEPTORS');\nclass NoopInterceptor {\n    intercept(req, next) {\n        return next.handle(req);\n    }\n}\nNoopInterceptor.ɵfac = function NoopInterceptor_Factory(t) { return new (t || NoopInterceptor)(); };\nNoopInterceptor.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: NoopInterceptor, factory: NoopInterceptor.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(NoopInterceptor, [{\n        type: Injectable\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Every request made through JSONP needs a callback name that's unique across the\n// whole page. Each request is assigned an id and the callback name is constructed\n// from that. The next id to be assigned is tracked in a global variable here that\n// is shared among all applications on the page.\nlet nextRequestId = 0;\n// Error text given when a JSONP script is injected, but doesn't invoke the callback\n// passed in its URL.\nconst JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.';\n// Error text given when a request is passed to the JsonpClientBackend that doesn't\n// have a request method JSONP.\nconst JSONP_ERR_WRONG_METHOD = 'JSONP requests must use JSONP request method.';\nconst JSONP_ERR_WRONG_RESPONSE_TYPE = 'JSONP requests must use Json response type.';\n/**\n * DI token/abstract type representing a map of JSONP callbacks.\n *\n * In the browser, this should always be the `window` object.\n *\n *\n */\nclass JsonpCallbackContext {\n}\n/**\n * Processes an `HttpRequest` with the JSONP method,\n * by performing JSONP style requests.\n * @see `HttpHandler`\n * @see `HttpXhrBackend`\n *\n * @publicApi\n */\nclass JsonpClientBackend {\n    constructor(callbackMap, document) {\n        this.callbackMap = callbackMap;\n        this.document = document;\n        /**\n         * A resolved promise that can be used to schedule microtasks in the event handlers.\n         */\n        this.resolvedPromise = Promise.resolve();\n    }\n    /**\n     * Get the name of the next callback method, by incrementing the global `nextRequestId`.\n     */\n    nextCallback() {\n        return `ng_jsonp_callback_${nextRequestId++}`;\n    }\n    /**\n     * Processes a JSONP request and returns an event stream of the results.\n     * @param req The request object.\n     * @returns An observable of the response events.\n     *\n     */\n    handle(req) {\n        // Firstly, check both the method and response type. If either doesn't match\n        // then the request was improperly routed here and cannot be handled.\n        if (req.method !== 'JSONP') {\n            throw new Error(JSONP_ERR_WRONG_METHOD);\n        }\n        else if (req.responseType !== 'json') {\n            throw new Error(JSONP_ERR_WRONG_RESPONSE_TYPE);\n        }\n        // Everything else happens inside the Observable boundary.\n        return new Observable((observer) => {\n            // The first step to make a request is to generate the callback name, and replace the\n            // callback placeholder in the URL with the name. Care has to be taken here to ensure\n            // a trailing &, if matched, gets inserted back into the URL in the correct place.\n            const callback = this.nextCallback();\n            const url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, `=${callback}$1`);\n            // Construct the <script> tag and point it at the URL.\n            const node = this.document.createElement('script');\n            node.src = url;\n            // A JSONP request requires waiting for multiple callbacks. These variables\n            // are closed over and track state across those callbacks.\n            // The response object, if one has been received, or null otherwise.\n            let body = null;\n            // Whether the response callback has been called.\n            let finished = false;\n            // Whether the request has been cancelled (and thus any other callbacks)\n            // should be ignored.\n            let cancelled = false;\n            // Set the response callback in this.callbackMap (which will be the window\n            // object in the browser. The script being loaded via the <script> tag will\n            // eventually call this callback.\n            this.callbackMap[callback] = (data) => {\n                // Data has been received from the JSONP script. Firstly, delete this callback.\n                delete this.callbackMap[callback];\n                // Next, make sure the request wasn't cancelled in the meantime.\n                if (cancelled) {\n                    return;\n                }\n                // Set state to indicate data was received.\n                body = data;\n                finished = true;\n            };\n            // cleanup() is a utility closure that removes the <script> from the page and\n            // the response callback from the window. This logic is used in both the\n            // success, error, and cancellation paths, so it's extracted out for convenience.\n            const cleanup = () => {\n                // Remove the <script> tag if it's still on the page.\n                if (node.parentNode) {\n                    node.parentNode.removeChild(node);\n                }\n                // Remove the response callback from the callbackMap (window object in the\n                // browser).\n                delete this.callbackMap[callback];\n            };\n            // onLoad() is the success callback which runs after the response callback\n            // if the JSONP script loads successfully. The event itself is unimportant.\n            // If something went wrong, onLoad() may run without the response callback\n            // having been invoked.\n            const onLoad = (event) => {\n                // Do nothing if the request has been cancelled.\n                if (cancelled) {\n                    return;\n                }\n                // We wrap it in an extra Promise, to ensure the microtask\n                // is scheduled after the loaded endpoint has executed any potential microtask itself,\n                // which is not guaranteed in Internet Explorer and EdgeHTML. See issue #39496\n                this.resolvedPromise.then(() => {\n                    // Cleanup the page.\n                    cleanup();\n                    // Check whether the response callback has run.\n                    if (!finished) {\n                        // It hasn't, something went wrong with the request. Return an error via\n                        // the Observable error path. All JSONP errors have status 0.\n                        observer.error(new HttpErrorResponse({\n                            url,\n                            status: 0,\n                            statusText: 'JSONP Error',\n                            error: new Error(JSONP_ERR_NO_CALLBACK),\n                        }));\n                        return;\n                    }\n                    // Success. body either contains the response body or null if none was\n                    // returned.\n                    observer.next(new HttpResponse({\n                        body,\n                        status: 200 /* Ok */,\n                        statusText: 'OK',\n                        url,\n                    }));\n                    // Complete the stream, the response is over.\n                    observer.complete();\n                });\n            };\n            // onError() is the error callback, which runs if the script returned generates\n            // a Javascript error. It emits the error via the Observable error channel as\n            // a HttpErrorResponse.\n            const onError = (error) => {\n                // If the request was already cancelled, no need to emit anything.\n                if (cancelled) {\n                    return;\n                }\n                cleanup();\n                // Wrap the error in a HttpErrorResponse.\n                observer.error(new HttpErrorResponse({\n                    error,\n                    status: 0,\n                    statusText: 'JSONP Error',\n                    url,\n                }));\n            };\n            // Subscribe to both the success (load) and error events on the <script> tag,\n            // and add it to the page.\n            node.addEventListener('load', onLoad);\n            node.addEventListener('error', onError);\n            this.document.body.appendChild(node);\n            // The request has now been successfully sent.\n            observer.next({ type: HttpEventType.Sent });\n            // Cancellation handler.\n            return () => {\n                // Track the cancellation so event listeners won't do anything even if already scheduled.\n                cancelled = true;\n                // Remove the event listeners so they won't run if the events later fire.\n                node.removeEventListener('load', onLoad);\n                node.removeEventListener('error', onError);\n                // And finally, clean up the page.\n                cleanup();\n            };\n        });\n    }\n}\nJsonpClientBackend.ɵfac = function JsonpClientBackend_Factory(t) { return new (t || JsonpClientBackend)(ɵngcc0.ɵɵinject(JsonpCallbackContext), ɵngcc0.ɵɵinject(DOCUMENT)); };\nJsonpClientBackend.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: JsonpClientBackend, factory: JsonpClientBackend.ɵfac });\nJsonpClientBackend.ctorParameters = () => [\n    { type: JsonpCallbackContext },\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(JsonpClientBackend, [{\n        type: Injectable\n    }], function () { return [{ type: JsonpCallbackContext }, { type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }]; }, null); })();\n/**\n * Identifies requests with the method JSONP and\n * shifts them to the `JsonpClientBackend`.\n *\n * @see `HttpInterceptor`\n *\n * @publicApi\n */\nclass JsonpInterceptor {\n    constructor(jsonp) {\n        this.jsonp = jsonp;\n    }\n    /**\n     * Identifies and handles a given JSONP request.\n     * @param req The outgoing request object to handle.\n     * @param next The next interceptor in the chain, or the backend\n     * if no interceptors remain in the chain.\n     * @returns An observable of the event stream.\n     */\n    intercept(req, next) {\n        if (req.method === 'JSONP') {\n            return this.jsonp.handle(req);\n        }\n        // Fall through for normal HTTP requests.\n        return next.handle(req);\n    }\n}\nJsonpInterceptor.ɵfac = function JsonpInterceptor_Factory(t) { return new (t || JsonpInterceptor)(ɵngcc0.ɵɵinject(JsonpClientBackend)); };\nJsonpInterceptor.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: JsonpInterceptor, factory: JsonpInterceptor.ɵfac });\nJsonpInterceptor.ctorParameters = () => [\n    { type: JsonpClientBackend }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(JsonpInterceptor, [{\n        type: Injectable\n    }], function () { return [{ type: JsonpClientBackend }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst XSSI_PREFIX = /^\\)\\]\\}',?\\n/;\n/**\n * Determine an appropriate URL for the response, by checking either\n * XMLHttpRequest.responseURL or the X-Request-URL header.\n */\nfunction getResponseUrl(xhr) {\n    if ('responseURL' in xhr && xhr.responseURL) {\n        return xhr.responseURL;\n    }\n    if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n        return xhr.getResponseHeader('X-Request-URL');\n    }\n    return null;\n}\n/**\n * Uses `XMLHttpRequest` to send requests to a backend server.\n * @see `HttpHandler`\n * @see `JsonpClientBackend`\n *\n * @publicApi\n */\nclass HttpXhrBackend {\n    constructor(xhrFactory) {\n        this.xhrFactory = xhrFactory;\n    }\n    /**\n     * Processes a request and returns a stream of response events.\n     * @param req The request object.\n     * @returns An observable of the response events.\n     */\n    handle(req) {\n        // Quick check to give a better error message when a user attempts to use\n        // HttpClient.jsonp() without installing the HttpClientJsonpModule\n        if (req.method === 'JSONP') {\n            throw new Error(`Attempted to construct Jsonp request without HttpClientJsonpModule installed.`);\n        }\n        // Everything happens on Observable subscription.\n        return new Observable((observer) => {\n            // Start by setting up the XHR object with request method, URL, and withCredentials flag.\n            const xhr = this.xhrFactory.build();\n            xhr.open(req.method, req.urlWithParams);\n            if (!!req.withCredentials) {\n                xhr.withCredentials = true;\n            }\n            // Add all the requested headers.\n            req.headers.forEach((name, values) => xhr.setRequestHeader(name, values.join(',')));\n            // Add an Accept header if one isn't present already.\n            if (!req.headers.has('Accept')) {\n                xhr.setRequestHeader('Accept', 'application/json, text/plain, */*');\n            }\n            // Auto-detect the Content-Type header if one isn't present already.\n            if (!req.headers.has('Content-Type')) {\n                const detectedType = req.detectContentTypeHeader();\n                // Sometimes Content-Type detection fails.\n                if (detectedType !== null) {\n                    xhr.setRequestHeader('Content-Type', detectedType);\n                }\n            }\n            // Set the responseType if one was requested.\n            if (req.responseType) {\n                const responseType = req.responseType.toLowerCase();\n                // JSON responses need to be processed as text. This is because if the server\n                // returns an XSSI-prefixed JSON response, the browser will fail to parse it,\n                // xhr.response will be null, and xhr.responseText cannot be accessed to\n                // retrieve the prefixed JSON data in order to strip the prefix. Thus, all JSON\n                // is parsed by first requesting text and then applying JSON.parse.\n                xhr.responseType = ((responseType !== 'json') ? responseType : 'text');\n            }\n            // Serialize the request body if one is present. If not, this will be set to null.\n            const reqBody = req.serializeBody();\n            // If progress events are enabled, response headers will be delivered\n            // in two events - the HttpHeaderResponse event and the full HttpResponse\n            // event. However, since response headers don't change in between these\n            // two events, it doesn't make sense to parse them twice. So headerResponse\n            // caches the data extracted from the response whenever it's first parsed,\n            // to ensure parsing isn't duplicated.\n            let headerResponse = null;\n            // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest\n            // state, and memoizes it into headerResponse.\n            const partialFromXhr = () => {\n                if (headerResponse !== null) {\n                    return headerResponse;\n                }\n                // Read status and normalize an IE9 bug (https://bugs.jquery.com/ticket/1450).\n                const status = xhr.status === 1223 ? 204 /* NoContent */ : xhr.status;\n                const statusText = xhr.statusText || 'OK';\n                // Parse headers from XMLHttpRequest - this step is lazy.\n                const headers = new HttpHeaders(xhr.getAllResponseHeaders());\n                // Read the response URL from the XMLHttpResponse instance and fall back on the\n                // request URL.\n                const url = getResponseUrl(xhr) || req.url;\n                // Construct the HttpHeaderResponse and memoize it.\n                headerResponse = new HttpHeaderResponse({ headers, status, statusText, url });\n                return headerResponse;\n            };\n            // Next, a few closures are defined for the various events which XMLHttpRequest can\n            // emit. This allows them to be unregistered as event listeners later.\n            // First up is the load event, which represents a response being fully available.\n            const onLoad = () => {\n                // Read response state from the memoized partial data.\n                let { headers, status, statusText, url } = partialFromXhr();\n                // The body will be read out if present.\n                let body = null;\n                if (status !== 204 /* NoContent */) {\n                    // Use XMLHttpRequest.response if set, responseText otherwise.\n                    body = (typeof xhr.response === 'undefined') ? xhr.responseText : xhr.response;\n                }\n                // Normalize another potential bug (this one comes from CORS).\n                if (status === 0) {\n                    status = !!body ? 200 /* Ok */ : 0;\n                }\n                // ok determines whether the response will be transmitted on the event or\n                // error channel. Unsuccessful status codes (not 2xx) will always be errors,\n                // but a successful status code can still result in an error if the user\n                // asked for JSON data and the body cannot be parsed as such.\n                let ok = status >= 200 && status < 300;\n                // Check whether the body needs to be parsed as JSON (in many cases the browser\n                // will have done that already).\n                if (req.responseType === 'json' && typeof body === 'string') {\n                    // Save the original body, before attempting XSSI prefix stripping.\n                    const originalBody = body;\n                    body = body.replace(XSSI_PREFIX, '');\n                    try {\n                        // Attempt the parse. If it fails, a parse error should be delivered to the user.\n                        body = body !== '' ? JSON.parse(body) : null;\n                    }\n                    catch (error) {\n                        // Since the JSON.parse failed, it's reasonable to assume this might not have been a\n                        // JSON response. Restore the original body (including any XSSI prefix) to deliver\n                        // a better error response.\n                        body = originalBody;\n                        // If this was an error request to begin with, leave it as a string, it probably\n                        // just isn't JSON. Otherwise, deliver the parsing error to the user.\n                        if (ok) {\n                            // Even though the response status was 2xx, this is still an error.\n                            ok = false;\n                            // The parse error contains the text of the body that failed to parse.\n                            body = { error, text: body };\n                        }\n                    }\n                }\n                if (ok) {\n                    // A successful response is delivered on the event stream.\n                    observer.next(new HttpResponse({\n                        body,\n                        headers,\n                        status,\n                        statusText,\n                        url: url || undefined,\n                    }));\n                    // The full body has been received and delivered, no further events\n                    // are possible. This request is complete.\n                    observer.complete();\n                }\n                else {\n                    // An unsuccessful request is delivered on the error channel.\n                    observer.error(new HttpErrorResponse({\n                        // The error in this case is the response body (error from the server).\n                        error: body,\n                        headers,\n                        status,\n                        statusText,\n                        url: url || undefined,\n                    }));\n                }\n            };\n            // The onError callback is called when something goes wrong at the network level.\n            // Connection timeout, DNS error, offline, etc. These are actual errors, and are\n            // transmitted on the error channel.\n            const onError = (error) => {\n                const { url } = partialFromXhr();\n                const res = new HttpErrorResponse({\n                    error,\n                    status: xhr.status || 0,\n                    statusText: xhr.statusText || 'Unknown Error',\n                    url: url || undefined,\n                });\n                observer.error(res);\n            };\n            // The sentHeaders flag tracks whether the HttpResponseHeaders event\n            // has been sent on the stream. This is necessary to track if progress\n            // is enabled since the event will be sent on only the first download\n            // progerss event.\n            let sentHeaders = false;\n            // The download progress event handler, which is only registered if\n            // progress events are enabled.\n            const onDownProgress = (event) => {\n                // Send the HttpResponseHeaders event if it hasn't been sent already.\n                if (!sentHeaders) {\n                    observer.next(partialFromXhr());\n                    sentHeaders = true;\n                }\n                // Start building the download progress event to deliver on the response\n                // event stream.\n                let progressEvent = {\n                    type: HttpEventType.DownloadProgress,\n                    loaded: event.loaded,\n                };\n                // Set the total number of bytes in the event if it's available.\n                if (event.lengthComputable) {\n                    progressEvent.total = event.total;\n                }\n                // If the request was for text content and a partial response is\n                // available on XMLHttpRequest, include it in the progress event\n                // to allow for streaming reads.\n                if (req.responseType === 'text' && !!xhr.responseText) {\n                    progressEvent.partialText = xhr.responseText;\n                }\n                // Finally, fire the event.\n                observer.next(progressEvent);\n            };\n            // The upload progress event handler, which is only registered if\n            // progress events are enabled.\n            const onUpProgress = (event) => {\n                // Upload progress events are simpler. Begin building the progress\n                // event.\n                let progress = {\n                    type: HttpEventType.UploadProgress,\n                    loaded: event.loaded,\n                };\n                // If the total number of bytes being uploaded is available, include\n                // it.\n                if (event.lengthComputable) {\n                    progress.total = event.total;\n                }\n                // Send the event.\n                observer.next(progress);\n            };\n            // By default, register for load and error events.\n            xhr.addEventListener('load', onLoad);\n            xhr.addEventListener('error', onError);\n            xhr.addEventListener('timeout', onError);\n            xhr.addEventListener('abort', onError);\n            // Progress events are only enabled if requested.\n            if (req.reportProgress) {\n                // Download progress is always enabled if requested.\n                xhr.addEventListener('progress', onDownProgress);\n                // Upload progress depends on whether there is a body to upload.\n                if (reqBody !== null && xhr.upload) {\n                    xhr.upload.addEventListener('progress', onUpProgress);\n                }\n            }\n            // Fire the request, and notify the event stream that it was fired.\n            xhr.send(reqBody);\n            observer.next({ type: HttpEventType.Sent });\n            // This is the return from the Observable function, which is the\n            // request cancellation handler.\n            return () => {\n                // On a cancellation, remove all registered event listeners.\n                xhr.removeEventListener('error', onError);\n                xhr.removeEventListener('abort', onError);\n                xhr.removeEventListener('load', onLoad);\n                xhr.removeEventListener('timeout', onError);\n                if (req.reportProgress) {\n                    xhr.removeEventListener('progress', onDownProgress);\n                    if (reqBody !== null && xhr.upload) {\n                        xhr.upload.removeEventListener('progress', onUpProgress);\n                    }\n                }\n                // Finally, abort the in-flight request.\n                if (xhr.readyState !== xhr.DONE) {\n                    xhr.abort();\n                }\n            };\n        });\n    }\n}\nHttpXhrBackend.ɵfac = function HttpXhrBackend_Factory(t) { return new (t || HttpXhrBackend)(ɵngcc0.ɵɵinject(ɵngcc1.XhrFactory)); };\nHttpXhrBackend.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: HttpXhrBackend, factory: HttpXhrBackend.ɵfac });\nHttpXhrBackend.ctorParameters = () => [\n    { type: XhrFactory$1 }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(HttpXhrBackend, [{\n        type: Injectable\n    }], function () { return [{ type: ɵngcc1.XhrFactory }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst XSRF_COOKIE_NAME = new InjectionToken('XSRF_COOKIE_NAME');\nconst XSRF_HEADER_NAME = new InjectionToken('XSRF_HEADER_NAME');\n/**\n * Retrieves the current XSRF token to use with the next outgoing request.\n *\n * @publicApi\n */\nclass HttpXsrfTokenExtractor {\n}\n/**\n * `HttpXsrfTokenExtractor` which retrieves the token from a cookie.\n */\nclass HttpXsrfCookieExtractor {\n    constructor(doc, platform, cookieName) {\n        this.doc = doc;\n        this.platform = platform;\n        this.cookieName = cookieName;\n        this.lastCookieString = '';\n        this.lastToken = null;\n        /**\n         * @internal for testing\n         */\n        this.parseCount = 0;\n    }\n    getToken() {\n        if (this.platform === 'server') {\n            return null;\n        }\n        const cookieString = this.doc.cookie || '';\n        if (cookieString !== this.lastCookieString) {\n            this.parseCount++;\n            this.lastToken = ɵparseCookieValue(cookieString, this.cookieName);\n            this.lastCookieString = cookieString;\n        }\n        return this.lastToken;\n    }\n}\nHttpXsrfCookieExtractor.ɵfac = function HttpXsrfCookieExtractor_Factory(t) { return new (t || HttpXsrfCookieExtractor)(ɵngcc0.ɵɵinject(DOCUMENT), ɵngcc0.ɵɵinject(PLATFORM_ID), ɵngcc0.ɵɵinject(XSRF_COOKIE_NAME)); };\nHttpXsrfCookieExtractor.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: HttpXsrfCookieExtractor, factory: HttpXsrfCookieExtractor.ɵfac });\nHttpXsrfCookieExtractor.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },\n    { type: String, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },\n    { type: String, decorators: [{ type: Inject, args: [XSRF_COOKIE_NAME,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(HttpXsrfCookieExtractor, [{\n        type: Injectable\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Inject,\n                args: [DOCUMENT]\n            }] }, { type: String, decorators: [{\n                type: Inject,\n                args: [PLATFORM_ID]\n            }] }, { type: String, decorators: [{\n                type: Inject,\n                args: [XSRF_COOKIE_NAME]\n            }] }]; }, null); })();\n/**\n * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.\n */\nclass HttpXsrfInterceptor {\n    constructor(tokenService, headerName) {\n        this.tokenService = tokenService;\n        this.headerName = headerName;\n    }\n    intercept(req, next) {\n        const lcUrl = req.url.toLowerCase();\n        // Skip both non-mutating requests and absolute URLs.\n        // Non-mutating requests don't require a token, and absolute URLs require special handling\n        // anyway as the cookie set\n        // on our origin is not the same as the token expected by another origin.\n        if (req.method === 'GET' || req.method === 'HEAD' || lcUrl.startsWith('http://') ||\n            lcUrl.startsWith('https://')) {\n            return next.handle(req);\n        }\n        const token = this.tokenService.getToken();\n        // Be careful not to overwrite an existing header of the same name.\n        if (token !== null && !req.headers.has(this.headerName)) {\n            req = req.clone({ headers: req.headers.set(this.headerName, token) });\n        }\n        return next.handle(req);\n    }\n}\nHttpXsrfInterceptor.ɵfac = function HttpXsrfInterceptor_Factory(t) { return new (t || HttpXsrfInterceptor)(ɵngcc0.ɵɵinject(HttpXsrfTokenExtractor), ɵngcc0.ɵɵinject(XSRF_HEADER_NAME)); };\nHttpXsrfInterceptor.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: HttpXsrfInterceptor, factory: HttpXsrfInterceptor.ɵfac });\nHttpXsrfInterceptor.ctorParameters = () => [\n    { type: HttpXsrfTokenExtractor },\n    { type: String, decorators: [{ type: Inject, args: [XSRF_HEADER_NAME,] }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(HttpXsrfInterceptor, [{\n        type: Injectable\n    }], function () { return [{ type: HttpXsrfTokenExtractor }, { type: String, decorators: [{\n                type: Inject,\n                args: [XSRF_HEADER_NAME]\n            }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An injectable `HttpHandler` that applies multiple interceptors\n * to a request before passing it to the given `HttpBackend`.\n *\n * The interceptors are loaded lazily from the injector, to allow\n * interceptors to themselves inject classes depending indirectly\n * on `HttpInterceptingHandler` itself.\n * @see `HttpInterceptor`\n */\nclass HttpInterceptingHandler {\n    constructor(backend, injector) {\n        this.backend = backend;\n        this.injector = injector;\n        this.chain = null;\n    }\n    handle(req) {\n        if (this.chain === null) {\n            const interceptors = this.injector.get(HTTP_INTERCEPTORS, []);\n            this.chain = interceptors.reduceRight((next, interceptor) => new HttpInterceptorHandler(next, interceptor), this.backend);\n        }\n        return this.chain.handle(req);\n    }\n}\nHttpInterceptingHandler.ɵfac = function HttpInterceptingHandler_Factory(t) { return new (t || HttpInterceptingHandler)(ɵngcc0.ɵɵinject(HttpBackend), ɵngcc0.ɵɵinject(ɵngcc0.Injector)); };\nHttpInterceptingHandler.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: HttpInterceptingHandler, factory: HttpInterceptingHandler.ɵfac });\nHttpInterceptingHandler.ctorParameters = () => [\n    { type: HttpBackend },\n    { type: Injector }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(HttpInterceptingHandler, [{\n        type: Injectable\n    }], function () { return [{ type: HttpBackend }, { type: ɵngcc0.Injector }]; }, null); })();\n/**\n * Constructs an `HttpHandler` that applies interceptors\n * to a request before passing it to the given `HttpBackend`.\n *\n * Use as a factory function within `HttpClientModule`.\n *\n *\n */\nfunction interceptingHandler(backend, interceptors = []) {\n    if (!interceptors) {\n        return backend;\n    }\n    return interceptors.reduceRight((next, interceptor) => new HttpInterceptorHandler(next, interceptor), backend);\n}\n/**\n * Factory function that determines where to store JSONP callbacks.\n *\n * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist\n * in test environments. In that case, callbacks are stored on an anonymous object instead.\n *\n *\n */\nfunction jsonpCallbackContext() {\n    if (typeof window === 'object') {\n        return window;\n    }\n    return {};\n}\n/**\n * Configures XSRF protection support for outgoing requests.\n *\n * For a server that supports a cookie-based XSRF protection system,\n * use directly to configure XSRF protection with the correct\n * cookie and header names.\n *\n * If no names are supplied, the default cookie name is `XSRF-TOKEN`\n * and the default header name is `X-XSRF-TOKEN`.\n *\n * @publicApi\n */\nclass HttpClientXsrfModule {\n    /**\n     * Disable the default XSRF protection.\n     */\n    static disable() {\n        return {\n            ngModule: HttpClientXsrfModule,\n            providers: [\n                { provide: HttpXsrfInterceptor, useClass: NoopInterceptor },\n            ],\n        };\n    }\n    /**\n     * Configure XSRF protection.\n     * @param options An object that can specify either or both\n     * cookie name or header name.\n     * - Cookie name default is `XSRF-TOKEN`.\n     * - Header name default is `X-XSRF-TOKEN`.\n     *\n     */\n    static withOptions(options = {}) {\n        return {\n            ngModule: HttpClientXsrfModule,\n            providers: [\n                options.cookieName ? { provide: XSRF_COOKIE_NAME, useValue: options.cookieName } : [],\n                options.headerName ? { provide: XSRF_HEADER_NAME, useValue: options.headerName } : [],\n            ],\n        };\n    }\n}\nHttpClientXsrfModule.ɵfac = function HttpClientXsrfModule_Factory(t) { return new (t || HttpClientXsrfModule)(); };\nHttpClientXsrfModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: HttpClientXsrfModule });\nHttpClientXsrfModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [\n        HttpXsrfInterceptor,\n        { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },\n        { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n        { provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN' },\n        { provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN' },\n    ] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(HttpClientXsrfModule, [{\n        type: NgModule,\n        args: [{\n                providers: [\n                    HttpXsrfInterceptor,\n                    { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },\n                    { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n                    { provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN' },\n                    { provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN' },\n                ]\n            }]\n    }], null, null); })();\n/**\n * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`\n * with supporting services for XSRF. Automatically imported by `HttpClientModule`.\n *\n * You can add interceptors to the chain behind `HttpClient` by binding them to the\n * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.\n *\n * @publicApi\n */\nclass HttpClientModule {\n}\nHttpClientModule.ɵfac = function HttpClientModule_Factory(t) { return new (t || HttpClientModule)(); };\nHttpClientModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: HttpClientModule });\nHttpClientModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [\n        HttpClient,\n        { provide: HttpHandler, useClass: HttpInterceptingHandler },\n        HttpXhrBackend,\n        { provide: HttpBackend, useExisting: HttpXhrBackend },\n    ], imports: [[\n            HttpClientXsrfModule.withOptions({\n                cookieName: 'XSRF-TOKEN',\n                headerName: 'X-XSRF-TOKEN'\n            }),\n        ]] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(HttpClientModule, [{\n        type: NgModule,\n        args: [{\n                /**\n                 * Optional configuration for XSRF protection.\n                 */\n                imports: [\n                    HttpClientXsrfModule.withOptions({\n                        cookieName: 'XSRF-TOKEN',\n                        headerName: 'X-XSRF-TOKEN'\n                    }),\n                ],\n                /**\n                 * Configures the [dependency injector](guide/glossary#injector) where it is imported\n                 * with supporting services for HTTP communications.\n                 */\n                providers: [\n                    HttpClient,\n                    { provide: HttpHandler, useClass: HttpInterceptingHandler },\n                    HttpXhrBackend,\n                    { provide: HttpBackend, useExisting: HttpXhrBackend },\n                ]\n            }]\n    }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(HttpClientModule, { imports: [HttpClientXsrfModule] }); })();\n/**\n * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`\n * with supporting services for JSONP.\n * Without this module, Jsonp requests reach the backend\n * with method JSONP, where they are rejected.\n *\n * You can add interceptors to the chain behind `HttpClient` by binding them to the\n * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.\n *\n * @publicApi\n */\nclass HttpClientJsonpModule {\n}\nHttpClientJsonpModule.ɵfac = function HttpClientJsonpModule_Factory(t) { return new (t || HttpClientJsonpModule)(); };\nHttpClientJsonpModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: HttpClientJsonpModule });\nHttpClientJsonpModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [\n        JsonpClientBackend,\n        { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },\n        { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true },\n    ] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(HttpClientJsonpModule, [{\n        type: NgModule,\n        args: [{\n                providers: [\n                    JsonpClientBackend,\n                    { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },\n                    { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true },\n                ]\n            }]\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A wrapper around the `XMLHttpRequest` constructor.\n *\n * @publicApi\n * @see `XhrFactory`\n * @deprecated\n * `XhrFactory` has moved, please import `XhrFactory` from `@angular/common` instead.\n */\nconst XhrFactory = XhrFactory$1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { HTTP_INTERCEPTORS, HttpBackend, HttpClient, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, HttpContext, HttpContextToken, HttpErrorResponse, HttpEventType, HttpHandler, HttpHeaderResponse, HttpHeaders, HttpParams, HttpRequest, HttpResponse, HttpResponseBase, HttpUrlEncodingCodec, HttpXhrBackend, HttpXsrfTokenExtractor, JsonpClientBackend, JsonpInterceptor, XhrFactory, HttpInterceptingHandler as ɵHttpInterceptingHandler, NoopInterceptor as ɵangular_packages_common_http_http_a, JsonpCallbackContext as ɵangular_packages_common_http_http_b, jsonpCallbackContext as ɵangular_packages_common_http_http_c, XSRF_COOKIE_NAME as ɵangular_packages_common_http_http_d, XSRF_HEADER_NAME as ɵangular_packages_common_http_http_e, HttpXsrfCookieExtractor as ɵangular_packages_common_http_http_f, HttpXsrfInterceptor as ɵangular_packages_common_http_http_g };\n\n","const EmptyErrorImpl = (() => {\n    function EmptyErrorImpl() {\n        Error.call(this);\n        this.message = 'no elements in sequence';\n        this.name = 'EmptyError';\n        return this;\n    }\n    EmptyErrorImpl.prototype = Object.create(Error.prototype);\n    return EmptyErrorImpl;\n})();\nexport const EmptyError = EmptyErrorImpl;\n","import { Observable } from '../Observable';\nimport { from } from './from';\nimport { empty } from './empty';\nexport function defer(observableFactory) {\n    return new Observable(subscriber => {\n        let input;\n        try {\n            input = observableFactory();\n        }\n        catch (err) {\n            subscriber.error(err);\n            return undefined;\n        }\n        const source = input ? from(input) : empty();\n        return source.subscribe(subscriber);\n    });\n}\n","import { Subscriber } from '../Subscriber';\nexport function scan(accumulator, seed) {\n    let hasSeed = false;\n    if (arguments.length >= 2) {\n        hasSeed = true;\n    }\n    return function scanOperatorFunction(source) {\n        return source.lift(new ScanOperator(accumulator, seed, hasSeed));\n    };\n}\nclass ScanOperator {\n    constructor(accumulator, seed, hasSeed = false) {\n        this.accumulator = accumulator;\n        this.seed = seed;\n        this.hasSeed = hasSeed;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));\n    }\n}\nclass ScanSubscriber extends Subscriber {\n    constructor(destination, accumulator, _seed, hasSeed) {\n        super(destination);\n        this.accumulator = accumulator;\n        this._seed = _seed;\n        this.hasSeed = hasSeed;\n        this.index = 0;\n    }\n    get seed() {\n        return this._seed;\n    }\n    set seed(value) {\n        this.hasSeed = true;\n        this._seed = value;\n    }\n    _next(value) {\n        if (!this.hasSeed) {\n            this.seed = value;\n            this.destination.next(value);\n        }\n        else {\n            return this._tryNext(value);\n        }\n    }\n    _tryNext(value) {\n        const index = this.index++;\n        let result;\n        try {\n            result = this.accumulator(this.seed, value, index);\n        }\n        catch (err) {\n            this.destination.error(err);\n        }\n        this.seed = result;\n        this.destination.next(result);\n    }\n}\n","import { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function catchError(selector) {\n    return function catchErrorOperatorFunction(source) {\n        const operator = new CatchOperator(selector);\n        const caught = source.lift(operator);\n        return (operator.caught = caught);\n    };\n}\nclass CatchOperator {\n    constructor(selector) {\n        this.selector = selector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));\n    }\n}\nclass CatchSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, selector, caught) {\n        super(destination);\n        this.selector = selector;\n        this.caught = caught;\n    }\n    error(err) {\n        if (!this.isStopped) {\n            let result;\n            try {\n                result = this.selector(err, this.caught);\n            }\n            catch (err2) {\n                super.error(err2);\n                return;\n            }\n            this._unsubscribeAndRecycle();\n            const innerSubscriber = new SimpleInnerSubscriber(this);\n            this.add(innerSubscriber);\n            const innerSubscription = innerSubscribe(result, innerSubscriber);\n            if (innerSubscription !== innerSubscriber) {\n                this.add(innerSubscription);\n            }\n        }\n    }\n}\n","import { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nexport function takeLast(count) {\n    return function takeLastOperatorFunction(source) {\n        if (count === 0) {\n            return empty();\n        }\n        else {\n            return source.lift(new TakeLastOperator(count));\n        }\n    };\n}\nclass TakeLastOperator {\n    constructor(total) {\n        this.total = total;\n        if (this.total < 0) {\n            throw new ArgumentOutOfRangeError;\n        }\n    }\n    call(subscriber, source) {\n        return source.subscribe(new TakeLastSubscriber(subscriber, this.total));\n    }\n}\nclass TakeLastSubscriber extends Subscriber {\n    constructor(destination, total) {\n        super(destination);\n        this.total = total;\n        this.ring = new Array();\n        this.count = 0;\n    }\n    _next(value) {\n        const ring = this.ring;\n        const total = this.total;\n        const count = this.count++;\n        if (ring.length < total) {\n            ring.push(value);\n        }\n        else {\n            const index = count % total;\n            ring[index] = value;\n        }\n    }\n    _complete() {\n        const destination = this.destination;\n        let count = this.count;\n        if (count > 0) {\n            const total = this.count >= this.total ? this.total : this.count;\n            const ring = this.ring;\n            for (let i = 0; i < total; i++) {\n                const idx = (count++) % total;\n                destination.next(ring[idx]);\n            }\n        }\n        destination.complete();\n    }\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { Subscriber } from '../Subscriber';\nexport function throwIfEmpty(errorFactory = defaultErrorFactory) {\n    return (source) => {\n        return source.lift(new ThrowIfEmptyOperator(errorFactory));\n    };\n}\nclass ThrowIfEmptyOperator {\n    constructor(errorFactory) {\n        this.errorFactory = errorFactory;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));\n    }\n}\nclass ThrowIfEmptySubscriber extends Subscriber {\n    constructor(destination, errorFactory) {\n        super(destination);\n        this.errorFactory = errorFactory;\n        this.hasValue = false;\n    }\n    _next(value) {\n        this.hasValue = true;\n        this.destination.next(value);\n    }\n    _complete() {\n        if (!this.hasValue) {\n            let err;\n            try {\n                err = this.errorFactory();\n            }\n            catch (e) {\n                err = e;\n            }\n            this.destination.error(err);\n        }\n        else {\n            return this.destination.complete();\n        }\n    }\n}\nfunction defaultErrorFactory() {\n    return new EmptyError();\n}\n","import { Subscriber } from '../Subscriber';\nexport function defaultIfEmpty(defaultValue = null) {\n    return (source) => source.lift(new DefaultIfEmptyOperator(defaultValue));\n}\nclass DefaultIfEmptyOperator {\n    constructor(defaultValue) {\n        this.defaultValue = defaultValue;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));\n    }\n}\nclass DefaultIfEmptySubscriber extends Subscriber {\n    constructor(destination, defaultValue) {\n        super(destination);\n        this.defaultValue = defaultValue;\n        this.isEmpty = true;\n    }\n    _next(value) {\n        this.isEmpty = false;\n        this.destination.next(value);\n    }\n    _complete() {\n        if (this.isEmpty) {\n            this.destination.next(this.defaultValue);\n        }\n        this.destination.complete();\n    }\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n    const hasDefaultValue = arguments.length >= 2;\n    return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n","import { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nexport function finalize(callback) {\n    return (source) => source.lift(new FinallyOperator(callback));\n}\nclass FinallyOperator {\n    constructor(callback) {\n        this.callback = callback;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new FinallySubscriber(subscriber, this.callback));\n    }\n}\nclass FinallySubscriber extends Subscriber {\n    constructor(destination, callback) {\n        super(destination);\n        this.add(new Subscription(callback));\n    }\n}\n","/**\n * @license Angular v12.2.5\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { Location, LocationStrategy, ViewportScroller, PlatformLocation, APP_BASE_HREF, HashLocationStrategy, PathLocationStrategy, LOCATION_INITIALIZED } from '@angular/common';\nimport { ɵisObservable, ɵisPromise, Component, NgModuleRef, InjectionToken, InjectFlags, NgModuleFactory, ɵConsole, NgZone, Injectable, Type, Injector, NgModuleFactoryLoader, Compiler, Directive, Attribute, Renderer2, ElementRef, Input, HostListener, HostBinding, ChangeDetectorRef, Optional, ContentChildren, EventEmitter, ViewContainerRef, ComponentFactoryResolver, Output, SystemJsNgModuleLoader, NgProbeToken, ANALYZE_FOR_ENTRY_COMPONENTS, SkipSelf, Inject, APP_INITIALIZER, APP_BOOTSTRAP_LISTENER, NgModule, ApplicationRef, Version } from '@angular/core';\nimport { from, of, BehaviorSubject, combineLatest, Observable, EmptyError, concat, defer, EMPTY, ConnectableObservable, Subject } from 'rxjs';\nimport { map, switchMap, take, startWith, scan, filter, catchError, concatMap, last as last$1, first, mergeMap, tap, takeLast, refCount, finalize, mergeAll } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * import {Event, RouterEvent, Router} from '@angular/router';\n *\n * class MyService {\n *   constructor(public router: Router) {\n *     router.events.pipe(\n *        filter((e: Event): e is RouterEvent => e instanceof RouterEvent)\n *     ).subscribe((e: RouterEvent) => {\n *       // Do something\n *     });\n *   }\n * }\n * ```\n *\n * @see `Event`\n * @see [Router events summary](guide/router-reference#router-events)\n * @publicApi\n */\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/common';\nclass RouterEvent {\n    constructor(\n    /** A unique ID that the router assigns to every router navigation. */\n    id, \n    /** The URL that is the destination for this navigation. */\n    url) {\n        this.id = id;\n        this.url = url;\n    }\n}\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nclass NavigationStart extends RouterEvent {\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    navigationTrigger = 'imperative', \n    /** @docsNotRequired */\n    restoredState = null) {\n        super(id, url);\n        this.navigationTrigger = navigationTrigger;\n        this.restoredState = restoredState;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n    }\n}\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see `NavigationStart`\n * @see `NavigationCancel`\n * @see `NavigationError`\n *\n * @publicApi\n */\nclass NavigationEnd extends RouterEvent {\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    urlAfterRedirects) {\n        super(id, url);\n        this.urlAfterRedirects = urlAfterRedirects;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n    }\n}\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen for several reasons including when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationError`\n *\n * @publicApi\n */\nclass NavigationCancel extends RouterEvent {\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    reason) {\n        super(id, url);\n        this.reason = reason;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n    }\n}\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationCancel`\n *\n * @publicApi\n */\nclass NavigationError extends RouterEvent {\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    error) {\n        super(id, url);\n        this.error = error;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n    }\n}\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nclass RoutesRecognized extends RouterEvent {\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    urlAfterRedirects, \n    /** @docsNotRequired */\n    state) {\n        super(id, url);\n        this.urlAfterRedirects = urlAfterRedirects;\n        this.state = state;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n    }\n}\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see `GuardsCheckEnd`\n *\n * @publicApi\n */\nclass GuardsCheckStart extends RouterEvent {\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    urlAfterRedirects, \n    /** @docsNotRequired */\n    state) {\n        super(id, url);\n        this.urlAfterRedirects = urlAfterRedirects;\n        this.state = state;\n    }\n    toString() {\n        return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n    }\n}\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see `GuardsCheckStart`\n *\n * @publicApi\n */\nclass GuardsCheckEnd extends RouterEvent {\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    urlAfterRedirects, \n    /** @docsNotRequired */\n    state, \n    /** @docsNotRequired */\n    shouldActivate) {\n        super(id, url);\n        this.urlAfterRedirects = urlAfterRedirects;\n        this.state = state;\n        this.shouldActivate = shouldActivate;\n    }\n    toString() {\n        return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n    }\n}\n/**\n * An event triggered at the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @see `ResolveEnd`\n *\n * @publicApi\n */\nclass ResolveStart extends RouterEvent {\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    urlAfterRedirects, \n    /** @docsNotRequired */\n    state) {\n        super(id, url);\n        this.urlAfterRedirects = urlAfterRedirects;\n        this.state = state;\n    }\n    toString() {\n        return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n    }\n}\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see `ResolveStart`.\n *\n * @publicApi\n */\nclass ResolveEnd extends RouterEvent {\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    urlAfterRedirects, \n    /** @docsNotRequired */\n    state) {\n        super(id, url);\n        this.urlAfterRedirects = urlAfterRedirects;\n        this.state = state;\n    }\n    toString() {\n        return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n    }\n}\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see `RouteConfigLoadEnd`\n *\n * @publicApi\n */\nclass RouteConfigLoadStart {\n    constructor(\n    /** @docsNotRequired */\n    route) {\n        this.route = route;\n    }\n    toString() {\n        return `RouteConfigLoadStart(path: ${this.route.path})`;\n    }\n}\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see `RouteConfigLoadStart`\n *\n * @publicApi\n */\nclass RouteConfigLoadEnd {\n    constructor(\n    /** @docsNotRequired */\n    route) {\n        this.route = route;\n    }\n    toString() {\n        return `RouteConfigLoadEnd(path: ${this.route.path})`;\n    }\n}\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see  `ChildActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nclass ChildActivationStart {\n    constructor(\n    /** @docsNotRequired */\n    snapshot) {\n        this.snapshot = snapshot;\n    }\n    toString() {\n        const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n        return `ChildActivationStart(path: '${path}')`;\n    }\n}\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see `ChildActivationStart`\n * @see `ResolveStart`\n * @publicApi\n */\nclass ChildActivationEnd {\n    constructor(\n    /** @docsNotRequired */\n    snapshot) {\n        this.snapshot = snapshot;\n    }\n    toString() {\n        const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n        return `ChildActivationEnd(path: '${path}')`;\n    }\n}\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nclass ActivationStart {\n    constructor(\n    /** @docsNotRequired */\n    snapshot) {\n        this.snapshot = snapshot;\n    }\n    toString() {\n        const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n        return `ActivationStart(path: '${path}')`;\n    }\n}\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationStart`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nclass ActivationEnd {\n    constructor(\n    /** @docsNotRequired */\n    snapshot) {\n        this.snapshot = snapshot;\n    }\n    toString() {\n        const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n        return `ActivationEnd(path: '${path}')`;\n    }\n}\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nclass Scroll {\n    constructor(\n    /** @docsNotRequired */\n    routerEvent, \n    /** @docsNotRequired */\n    position, \n    /** @docsNotRequired */\n    anchor) {\n        this.routerEvent = routerEvent;\n        this.position = position;\n        this.anchor = anchor;\n    }\n    toString() {\n        const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n        return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nconst PRIMARY_OUTLET = 'primary';\nclass ParamsAsMap {\n    constructor(params) {\n        this.params = params || {};\n    }\n    has(name) {\n        return Object.prototype.hasOwnProperty.call(this.params, name);\n    }\n    get(name) {\n        if (this.has(name)) {\n            const v = this.params[name];\n            return Array.isArray(v) ? v[0] : v;\n        }\n        return null;\n    }\n    getAll(name) {\n        if (this.has(name)) {\n            const v = this.params[name];\n            return Array.isArray(v) ? v : [v];\n        }\n        return [];\n    }\n    get keys() {\n        return Object.keys(this.params);\n    }\n}\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nfunction convertToParamMap(params) {\n    return new ParamsAsMap(params);\n}\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\nfunction navigationCancelingError(message) {\n    const error = Error('NavigationCancelingError: ' + message);\n    error[NAVIGATION_CANCELING_ERROR] = true;\n    return error;\n}\nfunction isNavigationCancelingError(error) {\n    return error && error[NAVIGATION_CANCELING_ERROR];\n}\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nfunction defaultUrlMatcher(segments, segmentGroup, route) {\n    const parts = route.path.split('/');\n    if (parts.length > segments.length) {\n        // The actual URL is shorter than the config, no match\n        return null;\n    }\n    if (route.pathMatch === 'full' &&\n        (segmentGroup.hasChildren() || parts.length < segments.length)) {\n        // The config is longer than the actual URL but we are looking for a full match, return null\n        return null;\n    }\n    const posParams = {};\n    // Check each config part against the actual URL\n    for (let index = 0; index < parts.length; index++) {\n        const part = parts[index];\n        const segment = segments[index];\n        const isParameter = part.startsWith(':');\n        if (isParameter) {\n            posParams[part.substring(1)] = segment;\n        }\n        else if (part !== segment.path) {\n            // The actual URL part does not match the config, no match\n            return null;\n        }\n    }\n    return { consumed: segments.slice(0, parts.length), posParams };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction shallowEqualArrays(a, b) {\n    if (a.length !== b.length)\n        return false;\n    for (let i = 0; i < a.length; ++i) {\n        if (!shallowEqual(a[i], b[i]))\n            return false;\n    }\n    return true;\n}\nfunction shallowEqual(a, b) {\n    // While `undefined` should never be possible, it would sometimes be the case in IE 11\n    // and pre-chromium Edge. The check below accounts for this edge case.\n    const k1 = a ? Object.keys(a) : undefined;\n    const k2 = b ? Object.keys(b) : undefined;\n    if (!k1 || !k2 || k1.length != k2.length) {\n        return false;\n    }\n    let key;\n    for (let i = 0; i < k1.length; i++) {\n        key = k1[i];\n        if (!equalArraysOrString(a[key], b[key])) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Test equality for arrays of strings or a string.\n */\nfunction equalArraysOrString(a, b) {\n    if (Array.isArray(a) && Array.isArray(b)) {\n        if (a.length !== b.length)\n            return false;\n        const aSorted = [...a].sort();\n        const bSorted = [...b].sort();\n        return aSorted.every((val, index) => bSorted[index] === val);\n    }\n    else {\n        return a === b;\n    }\n}\n/**\n * Flattens single-level nested arrays.\n */\nfunction flatten(arr) {\n    return Array.prototype.concat.apply([], arr);\n}\n/**\n * Return the last element of an array.\n */\nfunction last(a) {\n    return a.length > 0 ? a[a.length - 1] : null;\n}\n/**\n * Verifys all booleans in an array are `true`.\n */\nfunction and(bools) {\n    return !bools.some(v => !v);\n}\nfunction forEach(map, callback) {\n    for (const prop in map) {\n        if (map.hasOwnProperty(prop)) {\n            callback(map[prop], prop);\n        }\n    }\n}\nfunction wrapIntoObservable(value) {\n    if (ɵisObservable(value)) {\n        return value;\n    }\n    if (ɵisPromise(value)) {\n        // Use `Promise.resolve()` to wrap promise-like instances.\n        // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n        // change detection.\n        return from(Promise.resolve(value));\n    }\n    return of(value);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction createEmptyUrlTree() {\n    return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\nconst pathCompareMap = {\n    'exact': equalSegmentGroups,\n    'subset': containsSegmentGroup,\n};\nconst paramCompareMap = {\n    'exact': equalParams,\n    'subset': containsParams,\n    'ignored': () => true,\n};\nfunction containsTree(container, containee, options) {\n    return pathCompareMap[options.paths](container.root, containee.root, options.matrixParams) &&\n        paramCompareMap[options.queryParams](container.queryParams, containee.queryParams) &&\n        !(options.fragment === 'exact' && container.fragment !== containee.fragment);\n}\nfunction equalParams(container, containee) {\n    // TODO: This does not handle array params correctly.\n    return shallowEqual(container, containee);\n}\nfunction equalSegmentGroups(container, containee, matrixParams) {\n    if (!equalPath(container.segments, containee.segments))\n        return false;\n    if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n        return false;\n    }\n    if (container.numberOfChildren !== containee.numberOfChildren)\n        return false;\n    for (const c in containee.children) {\n        if (!container.children[c])\n            return false;\n        if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams))\n            return false;\n    }\n    return true;\n}\nfunction containsParams(container, containee) {\n    return Object.keys(containee).length <= Object.keys(container).length &&\n        Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key]));\n}\nfunction containsSegmentGroup(container, containee, matrixParams) {\n    return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\nfunction containsSegmentGroupHelper(container, containee, containeePaths, matrixParams) {\n    if (container.segments.length > containeePaths.length) {\n        const current = container.segments.slice(0, containeePaths.length);\n        if (!equalPath(current, containeePaths))\n            return false;\n        if (containee.hasChildren())\n            return false;\n        if (!matrixParamsMatch(current, containeePaths, matrixParams))\n            return false;\n        return true;\n    }\n    else if (container.segments.length === containeePaths.length) {\n        if (!equalPath(container.segments, containeePaths))\n            return false;\n        if (!matrixParamsMatch(container.segments, containeePaths, matrixParams))\n            return false;\n        for (const c in containee.children) {\n            if (!container.children[c])\n                return false;\n            if (!containsSegmentGroup(container.children[c], containee.children[c], matrixParams)) {\n                return false;\n            }\n        }\n        return true;\n    }\n    else {\n        const current = containeePaths.slice(0, container.segments.length);\n        const next = containeePaths.slice(container.segments.length);\n        if (!equalPath(container.segments, current))\n            return false;\n        if (!matrixParamsMatch(container.segments, current, matrixParams))\n            return false;\n        if (!container.children[PRIMARY_OUTLET])\n            return false;\n        return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next, matrixParams);\n    }\n}\nfunction matrixParamsMatch(containerPaths, containeePaths, options) {\n    return containeePaths.every((containeeSegment, i) => {\n        return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\n    });\n}\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree =\n *       router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n *     const f = tree.fragment; // return 'fragment'\n *     const q = tree.queryParams; // returns {debug: 'true'}\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n *     g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n *     g.children['support'].segments; // return 1 segment 'help'\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nclass UrlTree {\n    /** @internal */\n    constructor(\n    /** The root segment group of the URL tree */\n    root, \n    /** The query params of the URL */\n    queryParams, \n    /** The fragment of the URL */\n    fragment) {\n        this.root = root;\n        this.queryParams = queryParams;\n        this.fragment = fragment;\n    }\n    get queryParamMap() {\n        if (!this._queryParamMap) {\n            this._queryParamMap = convertToParamMap(this.queryParams);\n        }\n        return this._queryParamMap;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return DEFAULT_SERIALIZER.serialize(this);\n    }\n}\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nclass UrlSegmentGroup {\n    constructor(\n    /** The URL segments of this group. See `UrlSegment` for more information */\n    segments, \n    /** The list of children of this group */\n    children) {\n        this.segments = segments;\n        this.children = children;\n        /** The parent node in the url tree */\n        this.parent = null;\n        forEach(children, (v, k) => v.parent = this);\n    }\n    /** Whether the segment has child segments */\n    hasChildren() {\n        return this.numberOfChildren > 0;\n    }\n    /** Number of child segments */\n    get numberOfChildren() {\n        return Object.keys(this.children).length;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return serializePaths(this);\n    }\n}\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree = router.parseUrl('/team;id=33');\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments;\n *     s[0].path; // returns 'team'\n *     s[0].parameters; // returns {id: 33}\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nclass UrlSegment {\n    constructor(\n    /** The path part of a URL segment */\n    path, \n    /** The matrix parameters associated with a segment */\n    parameters) {\n        this.path = path;\n        this.parameters = parameters;\n    }\n    get parameterMap() {\n        if (!this._parameterMap) {\n            this._parameterMap = convertToParamMap(this.parameters);\n        }\n        return this._parameterMap;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return serializePath(this);\n    }\n}\nfunction equalSegments(as, bs) {\n    return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\nfunction equalPath(as, bs) {\n    if (as.length !== bs.length)\n        return false;\n    return as.every((a, i) => a.path === bs[i].path);\n}\nfunction mapChildrenIntoArray(segment, fn) {\n    let res = [];\n    forEach(segment.children, (child, childOutlet) => {\n        if (childOutlet === PRIMARY_OUTLET) {\n            res = res.concat(fn(child, childOutlet));\n        }\n    });\n    forEach(segment.children, (child, childOutlet) => {\n        if (childOutlet !== PRIMARY_OUTLET) {\n            res = res.concat(fn(child, childOutlet));\n        }\n    });\n    return res;\n}\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nclass UrlSerializer {\n}\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nclass DefaultUrlSerializer {\n    /** Parses a url into a `UrlTree` */\n    parse(url) {\n        const p = new UrlParser(url);\n        return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n    }\n    /** Converts a `UrlTree` into a url */\n    serialize(tree) {\n        const segment = `/${serializeSegment(tree.root, true)}`;\n        const query = serializeQueryParams(tree.queryParams);\n        const fragment = typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n        return `${segment}${query}${fragment}`;\n    }\n}\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\nfunction serializePaths(segment) {\n    return segment.segments.map(p => serializePath(p)).join('/');\n}\nfunction serializeSegment(segment, root) {\n    if (!segment.hasChildren()) {\n        return serializePaths(segment);\n    }\n    if (root) {\n        const primary = segment.children[PRIMARY_OUTLET] ?\n            serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n            '';\n        const children = [];\n        forEach(segment.children, (v, k) => {\n            if (k !== PRIMARY_OUTLET) {\n                children.push(`${k}:${serializeSegment(v, false)}`);\n            }\n        });\n        return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n    }\n    else {\n        const children = mapChildrenIntoArray(segment, (v, k) => {\n            if (k === PRIMARY_OUTLET) {\n                return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n            }\n            return [`${k}:${serializeSegment(v, false)}`];\n        });\n        // use no parenthesis if the only child is a primary outlet route\n        if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {\n            return `${serializePaths(segment)}/${children[0]}`;\n        }\n        return `${serializePaths(segment)}/(${children.join('//')})`;\n    }\n}\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s) {\n    return encodeURIComponent(s)\n        .replace(/%40/g, '@')\n        .replace(/%3A/gi, ':')\n        .replace(/%24/g, '$')\n        .replace(/%2C/gi, ',');\n}\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriQuery(s) {\n    return encodeUriString(s).replace(/%3B/gi, ';');\n}\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriFragment(s) {\n    return encodeURI(s);\n}\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriSegment(s) {\n    return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\nfunction decode(s) {\n    return decodeURIComponent(s);\n}\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nfunction decodeQuery(s) {\n    return decode(s.replace(/\\+/g, '%20'));\n}\nfunction serializePath(path) {\n    return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\nfunction serializeMatrixParams(params) {\n    return Object.keys(params)\n        .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n        .join('');\n}\nfunction serializeQueryParams(params) {\n    const strParams = Object.keys(params)\n        .map((name) => {\n        const value = params[name];\n        return Array.isArray(value) ?\n            value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n            `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n    })\n        .filter(s => !!s);\n    return strParams.length ? `?${strParams.join('&')}` : '';\n}\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str) {\n    const match = str.match(SEGMENT_RE);\n    return match ? match[0] : '';\n}\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str) {\n    const match = str.match(QUERY_PARAM_RE);\n    return match ? match[0] : '';\n}\nconst QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str) {\n    const match = str.match(QUERY_PARAM_VALUE_RE);\n    return match ? match[0] : '';\n}\nclass UrlParser {\n    constructor(url) {\n        this.url = url;\n        this.remaining = url;\n    }\n    parseRootSegment() {\n        this.consumeOptional('/');\n        if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n            return new UrlSegmentGroup([], {});\n        }\n        // The root segment group never has segments\n        return new UrlSegmentGroup([], this.parseChildren());\n    }\n    parseQueryParams() {\n        const params = {};\n        if (this.consumeOptional('?')) {\n            do {\n                this.parseQueryParam(params);\n            } while (this.consumeOptional('&'));\n        }\n        return params;\n    }\n    parseFragment() {\n        return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n    }\n    parseChildren() {\n        if (this.remaining === '') {\n            return {};\n        }\n        this.consumeOptional('/');\n        const segments = [];\n        if (!this.peekStartsWith('(')) {\n            segments.push(this.parseSegment());\n        }\n        while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n            this.capture('/');\n            segments.push(this.parseSegment());\n        }\n        let children = {};\n        if (this.peekStartsWith('/(')) {\n            this.capture('/');\n            children = this.parseParens(true);\n        }\n        let res = {};\n        if (this.peekStartsWith('(')) {\n            res = this.parseParens(false);\n        }\n        if (segments.length > 0 || Object.keys(children).length > 0) {\n            res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n        }\n        return res;\n    }\n    // parse a segment with its matrix parameters\n    // ie `name;k1=v1;k2`\n    parseSegment() {\n        const path = matchSegments(this.remaining);\n        if (path === '' && this.peekStartsWith(';')) {\n            throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n        }\n        this.capture(path);\n        return new UrlSegment(decode(path), this.parseMatrixParams());\n    }\n    parseMatrixParams() {\n        const params = {};\n        while (this.consumeOptional(';')) {\n            this.parseParam(params);\n        }\n        return params;\n    }\n    parseParam(params) {\n        const key = matchSegments(this.remaining);\n        if (!key) {\n            return;\n        }\n        this.capture(key);\n        let value = '';\n        if (this.consumeOptional('=')) {\n            const valueMatch = matchSegments(this.remaining);\n            if (valueMatch) {\n                value = valueMatch;\n                this.capture(value);\n            }\n        }\n        params[decode(key)] = decode(value);\n    }\n    // Parse a single query parameter `name[=value]`\n    parseQueryParam(params) {\n        const key = matchQueryParams(this.remaining);\n        if (!key) {\n            return;\n        }\n        this.capture(key);\n        let value = '';\n        if (this.consumeOptional('=')) {\n            const valueMatch = matchUrlQueryParamValue(this.remaining);\n            if (valueMatch) {\n                value = valueMatch;\n                this.capture(value);\n            }\n        }\n        const decodedKey = decodeQuery(key);\n        const decodedVal = decodeQuery(value);\n        if (params.hasOwnProperty(decodedKey)) {\n            // Append to existing values\n            let currentVal = params[decodedKey];\n            if (!Array.isArray(currentVal)) {\n                currentVal = [currentVal];\n                params[decodedKey] = currentVal;\n            }\n            currentVal.push(decodedVal);\n        }\n        else {\n            // Create a new value\n            params[decodedKey] = decodedVal;\n        }\n    }\n    // parse `(a/b//outlet_name:c/d)`\n    parseParens(allowPrimary) {\n        const segments = {};\n        this.capture('(');\n        while (!this.consumeOptional(')') && this.remaining.length > 0) {\n            const path = matchSegments(this.remaining);\n            const next = this.remaining[path.length];\n            // if is is not one of these characters, then the segment was unescaped\n            // or the group was not closed\n            if (next !== '/' && next !== ')' && next !== ';') {\n                throw new Error(`Cannot parse url '${this.url}'`);\n            }\n            let outletName = undefined;\n            if (path.indexOf(':') > -1) {\n                outletName = path.substr(0, path.indexOf(':'));\n                this.capture(outletName);\n                this.capture(':');\n            }\n            else if (allowPrimary) {\n                outletName = PRIMARY_OUTLET;\n            }\n            const children = this.parseChildren();\n            segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n                new UrlSegmentGroup([], children);\n            this.consumeOptional('//');\n        }\n        return segments;\n    }\n    peekStartsWith(str) {\n        return this.remaining.startsWith(str);\n    }\n    // Consumes the prefix when it is present and returns whether it has been consumed\n    consumeOptional(str) {\n        if (this.peekStartsWith(str)) {\n            this.remaining = this.remaining.substring(str.length);\n            return true;\n        }\n        return false;\n    }\n    capture(str) {\n        if (!this.consumeOptional(str)) {\n            throw new Error(`Expected \"${str}\".`);\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass Tree {\n    constructor(root) {\n        this._root = root;\n    }\n    get root() {\n        return this._root.value;\n    }\n    /**\n     * @internal\n     */\n    parent(t) {\n        const p = this.pathFromRoot(t);\n        return p.length > 1 ? p[p.length - 2] : null;\n    }\n    /**\n     * @internal\n     */\n    children(t) {\n        const n = findNode(t, this._root);\n        return n ? n.children.map(t => t.value) : [];\n    }\n    /**\n     * @internal\n     */\n    firstChild(t) {\n        const n = findNode(t, this._root);\n        return n && n.children.length > 0 ? n.children[0].value : null;\n    }\n    /**\n     * @internal\n     */\n    siblings(t) {\n        const p = findPath(t, this._root);\n        if (p.length < 2)\n            return [];\n        const c = p[p.length - 2].children.map(c => c.value);\n        return c.filter(cc => cc !== t);\n    }\n    /**\n     * @internal\n     */\n    pathFromRoot(t) {\n        return findPath(t, this._root).map(s => s.value);\n    }\n}\n// DFS for the node matching the value\nfunction findNode(value, node) {\n    if (value === node.value)\n        return node;\n    for (const child of node.children) {\n        const node = findNode(value, child);\n        if (node)\n            return node;\n    }\n    return null;\n}\n// Return the path to the node with the given value using DFS\nfunction findPath(value, node) {\n    if (value === node.value)\n        return [node];\n    for (const child of node.children) {\n        const path = findPath(value, child);\n        if (path.length) {\n            path.unshift(node);\n            return path;\n        }\n    }\n    return [];\n}\nclass TreeNode {\n    constructor(value, children) {\n        this.value = value;\n        this.children = children;\n    }\n    toString() {\n        return `TreeNode(${this.value})`;\n    }\n}\n// Return the list of T indexed by outlet name\nfunction nodeChildrenAsMap(node) {\n    const map = {};\n    if (node) {\n        node.children.forEach(child => map[child.value.outlet] = child);\n    }\n    return map;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * The following fragment shows how a component gets the root node\n * of the current state to establish its own route tree:\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const root: ActivatedRoute = state.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @see `ActivatedRoute`\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nclass RouterState extends Tree {\n    /** @internal */\n    constructor(root, \n    /** The current snapshot of the router state */\n    snapshot) {\n        super(root);\n        this.snapshot = snapshot;\n        setRouterState(this, root);\n    }\n    toString() {\n        return this.snapshot.toString();\n    }\n}\nfunction createEmptyState(urlTree, rootComponent) {\n    const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n    const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n    const emptyParams = new BehaviorSubject({});\n    const emptyData = new BehaviorSubject({});\n    const emptyQueryParams = new BehaviorSubject({});\n    const fragment = new BehaviorSubject('');\n    const activated = new ActivatedRoute(emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, snapshot.root);\n    activated.snapshot = snapshot.root;\n    return new RouterState(new TreeNode(activated, []), snapshot);\n}\nfunction createEmptyStateSnapshot(urlTree, rootComponent) {\n    const emptyParams = {};\n    const emptyData = {};\n    const emptyQueryParams = {};\n    const fragment = '';\n    const activated = new ActivatedRouteSnapshot([], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null, urlTree.root, -1, {});\n    return new RouterStateSnapshot('', new TreeNode(activated, []));\n}\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * The following example shows how to construct a component using information from a\n * currently activated route.\n *\n * Note: the observables in this class only emit when the current and previous values differ based\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n *     header=\"activated-route.component.ts\"}\n *\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nclass ActivatedRoute {\n    /** @internal */\n    constructor(\n    /** An observable of the URL segments matched by this route. */\n    url, \n    /** An observable of the matrix parameters scoped to this route. */\n    params, \n    /** An observable of the query parameters shared by all the routes. */\n    queryParams, \n    /** An observable of the URL fragment shared by all the routes. */\n    fragment, \n    /** An observable of the static and resolved data of this route. */\n    data, \n    /** The outlet name of the route, a constant. */\n    outlet, \n    /** The component of the route, a constant. */\n    // TODO(vsavkin): remove |string\n    component, futureSnapshot) {\n        this.url = url;\n        this.params = params;\n        this.queryParams = queryParams;\n        this.fragment = fragment;\n        this.data = data;\n        this.outlet = outlet;\n        this.component = component;\n        this._futureSnapshot = futureSnapshot;\n    }\n    /** The configuration used to match this route. */\n    get routeConfig() {\n        return this._futureSnapshot.routeConfig;\n    }\n    /** The root of the router state. */\n    get root() {\n        return this._routerState.root;\n    }\n    /** The parent of this route in the router state tree. */\n    get parent() {\n        return this._routerState.parent(this);\n    }\n    /** The first child of this route in the router state tree. */\n    get firstChild() {\n        return this._routerState.firstChild(this);\n    }\n    /** The children of this route in the router state tree. */\n    get children() {\n        return this._routerState.children(this);\n    }\n    /** The path from the root of the router state tree to this route. */\n    get pathFromRoot() {\n        return this._routerState.pathFromRoot(this);\n    }\n    /**\n     * An Observable that contains a map of the required and optional parameters\n     * specific to the route.\n     * The map supports retrieving single and multiple values from the same parameter.\n     */\n    get paramMap() {\n        if (!this._paramMap) {\n            this._paramMap = this.params.pipe(map((p) => convertToParamMap(p)));\n        }\n        return this._paramMap;\n    }\n    /**\n     * An Observable that contains a map of the query parameters available to all routes.\n     * The map supports retrieving single and multiple values from the query parameter.\n     */\n    get queryParamMap() {\n        if (!this._queryParamMap) {\n            this._queryParamMap =\n                this.queryParams.pipe(map((p) => convertToParamMap(p)));\n        }\n        return this._queryParamMap;\n    }\n    toString() {\n        return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n    }\n}\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nfunction inheritedParamsDataResolve(route, paramsInheritanceStrategy = 'emptyOnly') {\n    const pathFromRoot = route.pathFromRoot;\n    let inheritingStartingFrom = 0;\n    if (paramsInheritanceStrategy !== 'always') {\n        inheritingStartingFrom = pathFromRoot.length - 1;\n        while (inheritingStartingFrom >= 1) {\n            const current = pathFromRoot[inheritingStartingFrom];\n            const parent = pathFromRoot[inheritingStartingFrom - 1];\n            // current route is an empty path => inherits its parent's params and data\n            if (current.routeConfig && current.routeConfig.path === '') {\n                inheritingStartingFrom--;\n                // parent is componentless => current route should inherit its params and data\n            }\n            else if (!parent.component) {\n                inheritingStartingFrom--;\n            }\n            else {\n                break;\n            }\n        }\n    }\n    return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n/** @internal */\nfunction flattenInherited(pathFromRoot) {\n    return pathFromRoot.reduce((res, curr) => {\n        const params = Object.assign(Object.assign({}, res.params), curr.params);\n        const data = Object.assign(Object.assign({}, res.data), curr.data);\n        const resolve = Object.assign(Object.assign({}, res.resolve), curr._resolvedData);\n        return { params, data, resolve };\n    }, { params: {}, data: {}, resolve: {} });\n}\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * The following example initializes a component with route information extracted\n * from the snapshot of the root node at the time of creation.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n *   constructor(route: ActivatedRoute) {\n *     const id: string = route.snapshot.params.id;\n *     const url: string = route.snapshot.url.join('');\n *     const user = route.snapshot.data.user;\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nclass ActivatedRouteSnapshot {\n    /** @internal */\n    constructor(\n    /** The URL segments matched by this route */\n    url, \n    /**\n     *  The matrix parameters scoped to this route.\n     *\n     *  You can compute all params (or data) in the router state or to get params outside\n     *  of an activated component by traversing the `RouterState` tree as in the following\n     *  example:\n     *  ```\n     *  collectRouteParams(router: Router) {\n     *    let params = {};\n     *    let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\n     *    while (stack.length > 0) {\n     *      const route = stack.pop()!;\n     *      params = {...params, ...route.params};\n     *      stack.push(...route.children);\n     *    }\n     *    return params;\n     *  }\n     *  ```\n     */\n    params, \n    /** The query parameters shared by all the routes */\n    queryParams, \n    /** The URL fragment shared by all the routes */\n    fragment, \n    /** The static and resolved data of this route */\n    data, \n    /** The outlet name of the route */\n    outlet, \n    /** The component of the route */\n    component, routeConfig, urlSegment, lastPathIndex, resolve) {\n        this.url = url;\n        this.params = params;\n        this.queryParams = queryParams;\n        this.fragment = fragment;\n        this.data = data;\n        this.outlet = outlet;\n        this.component = component;\n        this.routeConfig = routeConfig;\n        this._urlSegment = urlSegment;\n        this._lastPathIndex = lastPathIndex;\n        this._resolve = resolve;\n    }\n    /** The root of the router state */\n    get root() {\n        return this._routerState.root;\n    }\n    /** The parent of this route in the router state tree */\n    get parent() {\n        return this._routerState.parent(this);\n    }\n    /** The first child of this route in the router state tree */\n    get firstChild() {\n        return this._routerState.firstChild(this);\n    }\n    /** The children of this route in the router state tree */\n    get children() {\n        return this._routerState.children(this);\n    }\n    /** The path from the root of the router state tree to this route */\n    get pathFromRoot() {\n        return this._routerState.pathFromRoot(this);\n    }\n    get paramMap() {\n        if (!this._paramMap) {\n            this._paramMap = convertToParamMap(this.params);\n        }\n        return this._paramMap;\n    }\n    get queryParamMap() {\n        if (!this._queryParamMap) {\n            this._queryParamMap = convertToParamMap(this.queryParams);\n        }\n        return this._queryParamMap;\n    }\n    toString() {\n        const url = this.url.map(segment => segment.toString()).join('/');\n        const matched = this.routeConfig ? this.routeConfig.path : '';\n        return `Route(url:'${url}', path:'${matched}')`;\n    }\n}\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * The following example shows how a component is initialized with information\n * from the snapshot of the root node's state at the time of creation.\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const snapshot: RouterStateSnapshot = state.snapshot;\n *     const root: ActivatedRouteSnapshot = snapshot.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nclass RouterStateSnapshot extends Tree {\n    /** @internal */\n    constructor(\n    /** The url from which this snapshot was created */\n    url, root) {\n        super(root);\n        this.url = url;\n        setRouterState(this, root);\n    }\n    toString() {\n        return serializeNode(this._root);\n    }\n}\nfunction setRouterState(state, node) {\n    node.value._routerState = state;\n    node.children.forEach(c => setRouterState(state, c));\n}\nfunction serializeNode(node) {\n    const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n    return `${node.value}${c}`;\n}\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nfunction advanceActivatedRoute(route) {\n    if (route.snapshot) {\n        const currentSnapshot = route.snapshot;\n        const nextSnapshot = route._futureSnapshot;\n        route.snapshot = nextSnapshot;\n        if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n            route.queryParams.next(nextSnapshot.queryParams);\n        }\n        if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n            route.fragment.next(nextSnapshot.fragment);\n        }\n        if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n            route.params.next(nextSnapshot.params);\n        }\n        if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n            route.url.next(nextSnapshot.url);\n        }\n        if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n            route.data.next(nextSnapshot.data);\n        }\n    }\n    else {\n        route.snapshot = route._futureSnapshot;\n        // this is for resolved data\n        route.data.next(route._futureSnapshot.data);\n    }\n}\nfunction equalParamsAndUrlSegments(a, b) {\n    const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n    const parentsMismatch = !a.parent !== !b.parent;\n    return equalUrlParams && !parentsMismatch &&\n        (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction createRouterState(routeReuseStrategy, curr, prevState) {\n    const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n    return new RouterState(root, curr);\n}\nfunction createNode(routeReuseStrategy, curr, prevState) {\n    // reuse an activated route that is currently displayed on the screen\n    if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n        const value = prevState.value;\n        value._futureSnapshot = curr.value;\n        const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n        return new TreeNode(value, children);\n    }\n    else {\n        if (routeReuseStrategy.shouldAttach(curr.value)) {\n            // retrieve an activated route that is used to be displayed, but is not currently displayed\n            const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n            if (detachedRouteHandle !== null) {\n                const tree = detachedRouteHandle.route;\n                setFutureSnapshotsOfActivatedRoutes(curr, tree);\n                return tree;\n            }\n        }\n        const value = createActivatedRoute(curr.value);\n        const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n        return new TreeNode(value, children);\n    }\n}\nfunction setFutureSnapshotsOfActivatedRoutes(curr, result) {\n    if (curr.value.routeConfig !== result.value.routeConfig) {\n        throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n    }\n    if (curr.children.length !== result.children.length) {\n        throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n    }\n    result.value._futureSnapshot = curr.value;\n    for (let i = 0; i < curr.children.length; ++i) {\n        setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n    }\n}\nfunction createOrReuseChildren(routeReuseStrategy, curr, prevState) {\n    return curr.children.map(child => {\n        for (const p of prevState.children) {\n            if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) {\n                return createNode(routeReuseStrategy, child, p);\n            }\n        }\n        return createNode(routeReuseStrategy, child);\n    });\n}\nfunction createActivatedRoute(c) {\n    return new ActivatedRoute(new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams), new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction createUrlTree(route, urlTree, commands, queryParams, fragment) {\n    if (commands.length === 0) {\n        return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n    }\n    const nav = computeNavigation(commands);\n    if (nav.toRoot()) {\n        return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n    }\n    const startingPosition = findStartingPosition(nav, urlTree, route);\n    const segmentGroup = startingPosition.processChildren ?\n        updateSegmentGroupChildren(startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n        updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n    return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\nfunction isMatrixParams(command) {\n    return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n/**\n * Determines if a given command has an `outlets` map. When we encounter a command\n * with an outlets k/v map, we need to apply each outlet individually to the existing segment.\n */\nfunction isCommandWithOutlets(command) {\n    return typeof command === 'object' && command != null && command.outlets;\n}\nfunction tree(oldSegmentGroup, newSegmentGroup, urlTree, queryParams, fragment) {\n    let qp = {};\n    if (queryParams) {\n        forEach(queryParams, (value, name) => {\n            qp[name] = Array.isArray(value) ? value.map((v) => `${v}`) : `${value}`;\n        });\n    }\n    if (urlTree.root === oldSegmentGroup) {\n        return new UrlTree(newSegmentGroup, qp, fragment);\n    }\n    return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\nfunction replaceSegment(current, oldSegment, newSegment) {\n    const children = {};\n    forEach(current.children, (c, outletName) => {\n        if (c === oldSegment) {\n            children[outletName] = newSegment;\n        }\n        else {\n            children[outletName] = replaceSegment(c, oldSegment, newSegment);\n        }\n    });\n    return new UrlSegmentGroup(current.segments, children);\n}\nclass Navigation {\n    constructor(isAbsolute, numberOfDoubleDots, commands) {\n        this.isAbsolute = isAbsolute;\n        this.numberOfDoubleDots = numberOfDoubleDots;\n        this.commands = commands;\n        if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n            throw new Error('Root segment cannot have matrix parameters');\n        }\n        const cmdWithOutlet = commands.find(isCommandWithOutlets);\n        if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n            throw new Error('{outlets:{}} has to be the last command');\n        }\n    }\n    toRoot() {\n        return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n    }\n}\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands) {\n    if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n        return new Navigation(true, 0, commands);\n    }\n    let numberOfDoubleDots = 0;\n    let isAbsolute = false;\n    const res = commands.reduce((res, cmd, cmdIdx) => {\n        if (typeof cmd === 'object' && cmd != null) {\n            if (cmd.outlets) {\n                const outlets = {};\n                forEach(cmd.outlets, (commands, name) => {\n                    outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n                });\n                return [...res, { outlets }];\n            }\n            if (cmd.segmentPath) {\n                return [...res, cmd.segmentPath];\n            }\n        }\n        if (!(typeof cmd === 'string')) {\n            return [...res, cmd];\n        }\n        if (cmdIdx === 0) {\n            cmd.split('/').forEach((urlPart, partIndex) => {\n                if (partIndex == 0 && urlPart === '.') {\n                    // skip './a'\n                }\n                else if (partIndex == 0 && urlPart === '') { //  '/a'\n                    isAbsolute = true;\n                }\n                else if (urlPart === '..') { //  '../a'\n                    numberOfDoubleDots++;\n                }\n                else if (urlPart != '') {\n                    res.push(urlPart);\n                }\n            });\n            return res;\n        }\n        return [...res, cmd];\n    }, []);\n    return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\nclass Position {\n    constructor(segmentGroup, processChildren, index) {\n        this.segmentGroup = segmentGroup;\n        this.processChildren = processChildren;\n        this.index = index;\n    }\n}\nfunction findStartingPosition(nav, tree, route) {\n    if (nav.isAbsolute) {\n        return new Position(tree.root, true, 0);\n    }\n    if (route.snapshot._lastPathIndex === -1) {\n        const segmentGroup = route.snapshot._urlSegment;\n        // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children\n        // see issue #26224, #13011, #35687\n        // However, if the ActivatedRoute is the root we should process children like above.\n        const processChildren = segmentGroup === tree.root;\n        return new Position(segmentGroup, processChildren, 0);\n    }\n    const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n    const index = route.snapshot._lastPathIndex + modifier;\n    return createPositionApplyingDoubleDots(route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\nfunction createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {\n    let g = group;\n    let ci = index;\n    let dd = numberOfDoubleDots;\n    while (dd > ci) {\n        dd -= ci;\n        g = g.parent;\n        if (!g) {\n            throw new Error('Invalid number of \\'../\\'');\n        }\n        ci = g.segments.length;\n    }\n    return new Position(g, false, ci - dd);\n}\nfunction getOutlets(commands) {\n    if (isCommandWithOutlets(commands[0])) {\n        return commands[0].outlets;\n    }\n    return { [PRIMARY_OUTLET]: commands };\n}\nfunction updateSegmentGroup(segmentGroup, startIndex, commands) {\n    if (!segmentGroup) {\n        segmentGroup = new UrlSegmentGroup([], {});\n    }\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n        return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n    }\n    const m = prefixedWith(segmentGroup, startIndex, commands);\n    const slicedCommands = commands.slice(m.commandIndex);\n    if (m.match && m.pathIndex < segmentGroup.segments.length) {\n        const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n        g.children[PRIMARY_OUTLET] =\n            new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n        return updateSegmentGroupChildren(g, 0, slicedCommands);\n    }\n    else if (m.match && slicedCommands.length === 0) {\n        return new UrlSegmentGroup(segmentGroup.segments, {});\n    }\n    else if (m.match && !segmentGroup.hasChildren()) {\n        return createNewSegmentGroup(segmentGroup, startIndex, commands);\n    }\n    else if (m.match) {\n        return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n    }\n    else {\n        return createNewSegmentGroup(segmentGroup, startIndex, commands);\n    }\n}\nfunction updateSegmentGroupChildren(segmentGroup, startIndex, commands) {\n    if (commands.length === 0) {\n        return new UrlSegmentGroup(segmentGroup.segments, {});\n    }\n    else {\n        const outlets = getOutlets(commands);\n        const children = {};\n        forEach(outlets, (commands, outlet) => {\n            if (typeof commands === 'string') {\n                commands = [commands];\n            }\n            if (commands !== null) {\n                children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n            }\n        });\n        forEach(segmentGroup.children, (child, childOutlet) => {\n            if (outlets[childOutlet] === undefined) {\n                children[childOutlet] = child;\n            }\n        });\n        return new UrlSegmentGroup(segmentGroup.segments, children);\n    }\n}\nfunction prefixedWith(segmentGroup, startIndex, commands) {\n    let currentCommandIndex = 0;\n    let currentPathIndex = startIndex;\n    const noMatch = { match: false, pathIndex: 0, commandIndex: 0 };\n    while (currentPathIndex < segmentGroup.segments.length) {\n        if (currentCommandIndex >= commands.length)\n            return noMatch;\n        const path = segmentGroup.segments[currentPathIndex];\n        const command = commands[currentCommandIndex];\n        // Do not try to consume command as part of the prefixing if it has outlets because it can\n        // contain outlets other than the one being processed. Consuming the outlets command would\n        // result in other outlets being ignored.\n        if (isCommandWithOutlets(command)) {\n            break;\n        }\n        const curr = `${command}`;\n        const next = currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n        if (currentPathIndex > 0 && curr === undefined)\n            break;\n        if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n            if (!compare(curr, next, path))\n                return noMatch;\n            currentCommandIndex += 2;\n        }\n        else {\n            if (!compare(curr, {}, path))\n                return noMatch;\n            currentCommandIndex++;\n        }\n        currentPathIndex++;\n    }\n    return { match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex };\n}\nfunction createNewSegmentGroup(segmentGroup, startIndex, commands) {\n    const paths = segmentGroup.segments.slice(0, startIndex);\n    let i = 0;\n    while (i < commands.length) {\n        const command = commands[i];\n        if (isCommandWithOutlets(command)) {\n            const children = createNewSegmentChildren(command.outlets);\n            return new UrlSegmentGroup(paths, children);\n        }\n        // if we start with an object literal, we need to reuse the path part from the segment\n        if (i === 0 && isMatrixParams(commands[0])) {\n            const p = segmentGroup.segments[startIndex];\n            paths.push(new UrlSegment(p.path, stringify(commands[0])));\n            i++;\n            continue;\n        }\n        const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`;\n        const next = (i < commands.length - 1) ? commands[i + 1] : null;\n        if (curr && next && isMatrixParams(next)) {\n            paths.push(new UrlSegment(curr, stringify(next)));\n            i += 2;\n        }\n        else {\n            paths.push(new UrlSegment(curr, {}));\n            i++;\n        }\n    }\n    return new UrlSegmentGroup(paths, {});\n}\nfunction createNewSegmentChildren(outlets) {\n    const children = {};\n    forEach(outlets, (commands, outlet) => {\n        if (typeof commands === 'string') {\n            commands = [commands];\n        }\n        if (commands !== null) {\n            children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n        }\n    });\n    return children;\n}\nfunction stringify(params) {\n    const res = {};\n    forEach(params, (v, k) => res[k] = `${v}`);\n    return res;\n}\nfunction compare(path, params, segment) {\n    return path == segment.path && shallowEqual(params, segment.parameters);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst activateRoutes = (rootContexts, routeReuseStrategy, forwardEvent) => map(t => {\n    new ActivateRoutes(routeReuseStrategy, t.targetRouterState, t.currentRouterState, forwardEvent)\n        .activate(rootContexts);\n    return t;\n});\nclass ActivateRoutes {\n    constructor(routeReuseStrategy, futureState, currState, forwardEvent) {\n        this.routeReuseStrategy = routeReuseStrategy;\n        this.futureState = futureState;\n        this.currState = currState;\n        this.forwardEvent = forwardEvent;\n    }\n    activate(parentContexts) {\n        const futureRoot = this.futureState._root;\n        const currRoot = this.currState ? this.currState._root : null;\n        this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n        advanceActivatedRoute(this.futureState.root);\n        this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n    }\n    // De-activate the child route that are not re-used for the future state\n    deactivateChildRoutes(futureNode, currNode, contexts) {\n        const children = nodeChildrenAsMap(currNode);\n        // Recurse on the routes active in the future state to de-activate deeper children\n        futureNode.children.forEach(futureChild => {\n            const childOutletName = futureChild.value.outlet;\n            this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n            delete children[childOutletName];\n        });\n        // De-activate the routes that will not be re-used\n        forEach(children, (v, childName) => {\n            this.deactivateRouteAndItsChildren(v, contexts);\n        });\n    }\n    deactivateRoutes(futureNode, currNode, parentContext) {\n        const future = futureNode.value;\n        const curr = currNode ? currNode.value : null;\n        if (future === curr) {\n            // Reusing the node, check to see if the children need to be de-activated\n            if (future.component) {\n                // If we have a normal route, we need to go through an outlet.\n                const context = parentContext.getContext(future.outlet);\n                if (context) {\n                    this.deactivateChildRoutes(futureNode, currNode, context.children);\n                }\n            }\n            else {\n                // if we have a componentless route, we recurse but keep the same outlet map.\n                this.deactivateChildRoutes(futureNode, currNode, parentContext);\n            }\n        }\n        else {\n            if (curr) {\n                // Deactivate the current route which will not be re-used\n                this.deactivateRouteAndItsChildren(currNode, parentContext);\n            }\n        }\n    }\n    deactivateRouteAndItsChildren(route, parentContexts) {\n        if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n            this.detachAndStoreRouteSubtree(route, parentContexts);\n        }\n        else {\n            this.deactivateRouteAndOutlet(route, parentContexts);\n        }\n    }\n    detachAndStoreRouteSubtree(route, parentContexts) {\n        const context = parentContexts.getContext(route.value.outlet);\n        if (context && context.outlet) {\n            const componentRef = context.outlet.detach();\n            const contexts = context.children.onOutletDeactivated();\n            this.routeReuseStrategy.store(route.value.snapshot, { componentRef, route, contexts });\n        }\n    }\n    deactivateRouteAndOutlet(route, parentContexts) {\n        const context = parentContexts.getContext(route.value.outlet);\n        // The context could be `null` if we are on a componentless route but there may still be\n        // children that need deactivating.\n        const contexts = context && route.value.component ? context.children : parentContexts;\n        const children = nodeChildrenAsMap(route);\n        for (const childOutlet of Object.keys(children)) {\n            this.deactivateRouteAndItsChildren(children[childOutlet], contexts);\n        }\n        if (context && context.outlet) {\n            // Destroy the component\n            context.outlet.deactivate();\n            // Destroy the contexts for all the outlets that were in the component\n            context.children.onOutletDeactivated();\n            // Clear the information about the attached component on the context but keep the reference to\n            // the outlet.\n            context.attachRef = null;\n            context.resolver = null;\n            context.route = null;\n        }\n    }\n    activateChildRoutes(futureNode, currNode, contexts) {\n        const children = nodeChildrenAsMap(currNode);\n        futureNode.children.forEach(c => {\n            this.activateRoutes(c, children[c.value.outlet], contexts);\n            this.forwardEvent(new ActivationEnd(c.value.snapshot));\n        });\n        if (futureNode.children.length) {\n            this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n        }\n    }\n    activateRoutes(futureNode, currNode, parentContexts) {\n        const future = futureNode.value;\n        const curr = currNode ? currNode.value : null;\n        advanceActivatedRoute(future);\n        // reusing the node\n        if (future === curr) {\n            if (future.component) {\n                // If we have a normal route, we need to go through an outlet.\n                const context = parentContexts.getOrCreateContext(future.outlet);\n                this.activateChildRoutes(futureNode, currNode, context.children);\n            }\n            else {\n                // if we have a componentless route, we recurse but keep the same outlet map.\n                this.activateChildRoutes(futureNode, currNode, parentContexts);\n            }\n        }\n        else {\n            if (future.component) {\n                // if we have a normal route, we need to place the component into the outlet and recurse.\n                const context = parentContexts.getOrCreateContext(future.outlet);\n                if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n                    const stored = this.routeReuseStrategy.retrieve(future.snapshot);\n                    this.routeReuseStrategy.store(future.snapshot, null);\n                    context.children.onOutletReAttached(stored.contexts);\n                    context.attachRef = stored.componentRef;\n                    context.route = stored.route.value;\n                    if (context.outlet) {\n                        // Attach right away when the outlet has already been instantiated\n                        // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n                        context.outlet.attach(stored.componentRef, stored.route.value);\n                    }\n                    advanceActivatedRouteNodeAndItsChildren(stored.route);\n                }\n                else {\n                    const config = parentLoadedConfig(future.snapshot);\n                    const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n                    context.attachRef = null;\n                    context.route = future;\n                    context.resolver = cmpFactoryResolver;\n                    if (context.outlet) {\n                        // Activate the outlet when it has already been instantiated\n                        // Otherwise it will get activated from its `ngOnInit` when instantiated\n                        context.outlet.activateWith(future, cmpFactoryResolver);\n                    }\n                    this.activateChildRoutes(futureNode, null, context.children);\n                }\n            }\n            else {\n                // if we have a componentless route, we recurse but keep the same outlet map.\n                this.activateChildRoutes(futureNode, null, parentContexts);\n            }\n        }\n    }\n}\nfunction advanceActivatedRouteNodeAndItsChildren(node) {\n    advanceActivatedRoute(node.value);\n    node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\nfunction parentLoadedConfig(snapshot) {\n    for (let s = snapshot.parent; s; s = s.parent) {\n        const route = s.routeConfig;\n        if (route && route._loadedConfig)\n            return route._loadedConfig;\n        if (route && route.component)\n            return null;\n    }\n    return null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass LoadedRouterConfig {\n    constructor(routes, module) {\n        this.routes = routes;\n        this.module = module;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n *   return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n *   return fn(1, 2);\n * } else {\n *   throw \"Must provide the `product` function\";\n * }\n */\nfunction isFunction(v) {\n    return typeof v === 'function';\n}\nfunction isBoolean(v) {\n    return typeof v === 'boolean';\n}\nfunction isUrlTree(v) {\n    return v instanceof UrlTree;\n}\nfunction isCanLoad(guard) {\n    return guard && isFunction(guard.canLoad);\n}\nfunction isCanActivate(guard) {\n    return guard && isFunction(guard.canActivate);\n}\nfunction isCanActivateChild(guard) {\n    return guard && isFunction(guard.canActivateChild);\n}\nfunction isCanDeactivate(guard) {\n    return guard && isFunction(guard.canDeactivate);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\nfunction prioritizedGuardValue() {\n    return switchMap(obs => {\n        return combineLatest(obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE))))\n            .pipe(scan((acc, list) => {\n            let isPending = false;\n            return list.reduce((innerAcc, val, i) => {\n                if (innerAcc !== INITIAL_VALUE)\n                    return innerAcc;\n                // Toggle pending flag if any values haven't been set yet\n                if (val === INITIAL_VALUE)\n                    isPending = true;\n                // Any other return values are only valid if we haven't yet hit a pending\n                // call. This guarantees that in the case of a guard at the bottom of the\n                // tree that returns a redirect, we will wait for the higher priority\n                // guard at the top to finish before performing the redirect.\n                if (!isPending) {\n                    // Early return when we hit a `false` value as that should always\n                    // cancel navigation\n                    if (val === false)\n                        return val;\n                    if (i === list.length - 1 || isUrlTree(val)) {\n                        return val;\n                    }\n                }\n                return innerAcc;\n            }, acc);\n        }, INITIAL_VALUE), filter(item => item !== INITIAL_VALUE), map(item => isUrlTree(item) ? item : item === true), //\n        take(1));\n    });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\nclass ɵEmptyOutletComponent {\n}\nɵEmptyOutletComponent.ɵfac = function ɵEmptyOutletComponent_Factory(t) { return new (t || ɵEmptyOutletComponent)(); };\nɵEmptyOutletComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: ɵEmptyOutletComponent, selectors: [[\"ng-component\"]], decls: 1, vars: 0, template: function ɵEmptyOutletComponent_Template(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵelement(0, \"router-outlet\");\n    } }, directives: function () { return [RouterOutlet]; }, encapsulation: 2 });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ɵEmptyOutletComponent, [{\n        type: Component,\n        args: [{ template: `<router-outlet></router-outlet>` }]\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction validateConfig(config, parentPath = '') {\n    // forEach doesn't iterate undefined values\n    for (let i = 0; i < config.length; i++) {\n        const route = config[i];\n        const fullPath = getFullPath(parentPath, route);\n        validateNode(route, fullPath);\n    }\n}\nfunction validateNode(route, fullPath) {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        if (!route) {\n            throw new Error(`\n      Invalid configuration of route '${fullPath}': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    `);\n        }\n        if (Array.isArray(route)) {\n            throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n        }\n        if (!route.component && !route.children && !route.loadChildren &&\n            (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n            throw new Error(`Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n        }\n        if (route.redirectTo && route.children) {\n            throw new Error(`Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);\n        }\n        if (route.redirectTo && route.loadChildren) {\n            throw new Error(`Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);\n        }\n        if (route.children && route.loadChildren) {\n            throw new Error(`Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);\n        }\n        if (route.redirectTo && route.component) {\n            throw new Error(`Invalid configuration of route '${fullPath}': redirectTo and component cannot be used together`);\n        }\n        if (route.redirectTo && route.canActivate) {\n            throw new Error(`Invalid configuration of route '${fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +\n                `so canActivate will never be executed.`);\n        }\n        if (route.path && route.matcher) {\n            throw new Error(`Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n        }\n        if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n            throw new Error(`Invalid configuration of route '${fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n        }\n        if (route.path === void 0 && route.matcher === void 0) {\n            throw new Error(`Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);\n        }\n        if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n            throw new Error(`Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n        }\n        if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n            const exp = `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n            throw new Error(`Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n        }\n        if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n            throw new Error(`Invalid configuration of route '${fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n        }\n    }\n    if (route.children) {\n        validateConfig(route.children, fullPath);\n    }\n}\nfunction getFullPath(parentPath, currentRoute) {\n    if (!currentRoute) {\n        return parentPath;\n    }\n    if (!parentPath && !currentRoute.path) {\n        return '';\n    }\n    else if (parentPath && !currentRoute.path) {\n        return `${parentPath}/`;\n    }\n    else if (!parentPath && currentRoute.path) {\n        return currentRoute.path;\n    }\n    else {\n        return `${parentPath}/${currentRoute.path}`;\n    }\n}\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nfunction standardizeConfig(r) {\n    const children = r.children && r.children.map(standardizeConfig);\n    const c = children ? Object.assign(Object.assign({}, r), { children }) : Object.assign({}, r);\n    if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n        c.component = ɵEmptyOutletComponent;\n    }\n    return c;\n}\n/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nfunction getOutlet(route) {\n    return route.outlet || PRIMARY_OUTLET;\n}\n/**\n * Sorts the `routes` such that the ones with an outlet matching `outletName` come first.\n * The order of the configs is otherwise preserved.\n */\nfunction sortByMatchingOutlets(routes, outletName) {\n    const sortedConfig = routes.filter(r => getOutlet(r) === outletName);\n    sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName));\n    return sortedConfig;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst noMatch = {\n    matched: false,\n    consumedSegments: [],\n    lastChild: 0,\n    parameters: {},\n    positionalParamSegments: {}\n};\nfunction match(segmentGroup, route, segments) {\n    var _a;\n    if (route.path === '') {\n        if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n            return Object.assign({}, noMatch);\n        }\n        return {\n            matched: true,\n            consumedSegments: [],\n            lastChild: 0,\n            parameters: {},\n            positionalParamSegments: {}\n        };\n    }\n    const matcher = route.matcher || defaultUrlMatcher;\n    const res = matcher(segments, segmentGroup, route);\n    if (!res)\n        return Object.assign({}, noMatch);\n    const posParams = {};\n    forEach(res.posParams, (v, k) => {\n        posParams[k] = v.path;\n    });\n    const parameters = res.consumed.length > 0 ? Object.assign(Object.assign({}, posParams), res.consumed[res.consumed.length - 1].parameters) :\n        posParams;\n    return {\n        matched: true,\n        consumedSegments: res.consumed,\n        lastChild: res.consumed.length,\n        // TODO(atscott): investigate combining parameters and positionalParamSegments\n        parameters,\n        positionalParamSegments: (_a = res.posParams) !== null && _a !== void 0 ? _a : {}\n    };\n}\nfunction split(segmentGroup, consumedSegments, slicedSegments, config, relativeLinkResolution = 'corrected') {\n    if (slicedSegments.length > 0 &&\n        containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n        const s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(segmentGroup, consumedSegments, config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n        s._sourceSegment = segmentGroup;\n        s._segmentIndexShift = consumedSegments.length;\n        return { segmentGroup: s, slicedSegments: [] };\n    }\n    if (slicedSegments.length === 0 &&\n        containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n        const s = new UrlSegmentGroup(segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children, relativeLinkResolution));\n        s._sourceSegment = segmentGroup;\n        s._segmentIndexShift = consumedSegments.length;\n        return { segmentGroup: s, slicedSegments };\n    }\n    const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return { segmentGroup: s, slicedSegments };\n}\nfunction addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, routes, children, relativeLinkResolution) {\n    const res = {};\n    for (const r of routes) {\n        if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n            const s = new UrlSegmentGroup([], {});\n            s._sourceSegment = segmentGroup;\n            if (relativeLinkResolution === 'legacy') {\n                s._segmentIndexShift = segmentGroup.segments.length;\n            }\n            else {\n                s._segmentIndexShift = consumedSegments.length;\n            }\n            res[getOutlet(r)] = s;\n        }\n    }\n    return Object.assign(Object.assign({}, children), res);\n}\nfunction createChildrenForEmptyPaths(segmentGroup, consumedSegments, routes, primarySegment) {\n    const res = {};\n    res[PRIMARY_OUTLET] = primarySegment;\n    primarySegment._sourceSegment = segmentGroup;\n    primarySegment._segmentIndexShift = consumedSegments.length;\n    for (const r of routes) {\n        if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n            const s = new UrlSegmentGroup([], {});\n            s._sourceSegment = segmentGroup;\n            s._segmentIndexShift = consumedSegments.length;\n            res[getOutlet(r)] = s;\n        }\n    }\n    return res;\n}\nfunction containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) {\n    return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\nfunction containsEmptyPathMatches(segmentGroup, slicedSegments, routes) {\n    return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\nfunction emptyPathMatch(segmentGroup, slicedSegments, r) {\n    if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n        return false;\n    }\n    return r.path === '';\n}\n/**\n * Determines if `route` is a path match for the `rawSegment`, `segments`, and `outlet` without\n * verifying that its children are a full match for the remainder of the `rawSegment` children as\n * well.\n */\nfunction isImmediateMatch(route, rawSegment, segments, outlet) {\n    // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to\n    // a config like\n    // * `{path: '', children: [{path: 'b', outlet: 'b'}]}`\n    // or even\n    // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]`\n    //\n    // The exception here is when the segment outlet is for the primary outlet. This would\n    // result in a match inside the named outlet because all children there are written as primary\n    // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like\n    // * `{path: '', outlet: 'x' children: [{path: 'b'}]}`\n    // This should only match if the url is `/(x:b)`.\n    if (getOutlet(route) !== outlet &&\n        (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) {\n        return false;\n    }\n    if (route.path === '**') {\n        return true;\n    }\n    return match(rawSegment, route, segments).matched;\n}\nfunction noLeftoversInUrl(segmentGroup, segments, outlet) {\n    return segments.length === 0 && !segmentGroup.children[outlet];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass NoMatch {\n    constructor(segmentGroup) {\n        this.segmentGroup = segmentGroup || null;\n    }\n}\nclass AbsoluteRedirect {\n    constructor(urlTree) {\n        this.urlTree = urlTree;\n    }\n}\nfunction noMatch$1(segmentGroup) {\n    return new Observable((obs) => obs.error(new NoMatch(segmentGroup)));\n}\nfunction absoluteRedirect(newTree) {\n    return new Observable((obs) => obs.error(new AbsoluteRedirect(newTree)));\n}\nfunction namedOutletsRedirect(redirectTo) {\n    return new Observable((obs) => obs.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\nfunction canLoadFails(route) {\n    return new Observable((obs) => obs.error(navigationCancelingError(`Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`)));\n}\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nfunction applyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {\n    return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\nclass ApplyRedirects {\n    constructor(moduleInjector, configLoader, urlSerializer, urlTree, config) {\n        this.configLoader = configLoader;\n        this.urlSerializer = urlSerializer;\n        this.urlTree = urlTree;\n        this.config = config;\n        this.allowRedirects = true;\n        this.ngModule = moduleInjector.get(NgModuleRef);\n    }\n    apply() {\n        const splitGroup = split(this.urlTree.root, [], [], this.config).segmentGroup;\n        // TODO(atscott): creating a new segment removes the _sourceSegment _segmentIndexShift, which is\n        // only necessary to prevent failures in tests which assert exact object matches. The `split` is\n        // now shared between `applyRedirects` and `recognize` but only the `recognize` step needs these\n        // properties. Before the implementations were merged, the `applyRedirects` would not assign\n        // them. We should be able to remove this logic as a \"breaking change\" but should do some more\n        // investigation into the failures first.\n        const rootSegmentGroup = new UrlSegmentGroup(splitGroup.segments, splitGroup.children);\n        const expanded$ = this.expandSegmentGroup(this.ngModule, this.config, rootSegmentGroup, PRIMARY_OUTLET);\n        const urlTrees$ = expanded$.pipe(map((rootSegmentGroup) => {\n            return this.createUrlTree(squashSegmentGroup(rootSegmentGroup), this.urlTree.queryParams, this.urlTree.fragment);\n        }));\n        return urlTrees$.pipe(catchError((e) => {\n            if (e instanceof AbsoluteRedirect) {\n                // After an absolute redirect we do not apply any more redirects!\n                // If this implementation changes, update the documentation note in `redirectTo`.\n                this.allowRedirects = false;\n                // we need to run matching, so we can fetch all lazy-loaded modules\n                return this.match(e.urlTree);\n            }\n            if (e instanceof NoMatch) {\n                throw this.noMatchError(e);\n            }\n            throw e;\n        }));\n    }\n    match(tree) {\n        const expanded$ = this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n        const mapped$ = expanded$.pipe(map((rootSegmentGroup) => {\n            return this.createUrlTree(squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment);\n        }));\n        return mapped$.pipe(catchError((e) => {\n            if (e instanceof NoMatch) {\n                throw this.noMatchError(e);\n            }\n            throw e;\n        }));\n    }\n    noMatchError(e) {\n        return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n    }\n    createUrlTree(rootCandidate, queryParams, fragment) {\n        const root = rootCandidate.segments.length > 0 ?\n            new UrlSegmentGroup([], { [PRIMARY_OUTLET]: rootCandidate }) :\n            rootCandidate;\n        return new UrlTree(root, queryParams, fragment);\n    }\n    expandSegmentGroup(ngModule, routes, segmentGroup, outlet) {\n        if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n            return this.expandChildren(ngModule, routes, segmentGroup)\n                .pipe(map((children) => new UrlSegmentGroup([], children)));\n        }\n        return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n    }\n    // Recursively expand segment groups for all the child outlets\n    expandChildren(ngModule, routes, segmentGroup) {\n        // Expand outlets one at a time, starting with the primary outlet. We need to do it this way\n        // because an absolute redirect from the primary outlet takes precedence.\n        const childOutlets = [];\n        for (const child of Object.keys(segmentGroup.children)) {\n            if (child === 'primary') {\n                childOutlets.unshift(child);\n            }\n            else {\n                childOutlets.push(child);\n            }\n        }\n        return from(childOutlets)\n            .pipe(concatMap(childOutlet => {\n            const child = segmentGroup.children[childOutlet];\n            // Sort the routes so routes with outlets that match the segment appear\n            // first, followed by routes for other outlets, which might match if they have an\n            // empty path.\n            const sortedRoutes = sortByMatchingOutlets(routes, childOutlet);\n            return this.expandSegmentGroup(ngModule, sortedRoutes, child, childOutlet)\n                .pipe(map(s => ({ segment: s, outlet: childOutlet })));\n        }), scan((children, expandedChild) => {\n            children[expandedChild.outlet] = expandedChild.segment;\n            return children;\n        }, {}), last$1());\n    }\n    expandSegment(ngModule, segmentGroup, routes, segments, outlet, allowRedirects) {\n        return from(routes).pipe(concatMap((r) => {\n            const expanded$ = this.expandSegmentAgainstRoute(ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n            return expanded$.pipe(catchError((e) => {\n                if (e instanceof NoMatch) {\n                    return of(null);\n                }\n                throw e;\n            }));\n        }), first((s) => !!s), catchError((e, _) => {\n            if (e instanceof EmptyError || e.name === 'EmptyError') {\n                if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n                    return of(new UrlSegmentGroup([], {}));\n                }\n                throw new NoMatch(segmentGroup);\n            }\n            throw e;\n        }));\n    }\n    expandSegmentAgainstRoute(ngModule, segmentGroup, routes, route, paths, outlet, allowRedirects) {\n        if (!isImmediateMatch(route, segmentGroup, paths, outlet)) {\n            return noMatch$1(segmentGroup);\n        }\n        if (route.redirectTo === undefined) {\n            return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths, outlet);\n        }\n        if (allowRedirects && this.allowRedirects) {\n            return this.expandSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, paths, outlet);\n        }\n        return noMatch$1(segmentGroup);\n    }\n    expandSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet) {\n        if (route.path === '**') {\n            return this.expandWildCardWithParamsAgainstRouteUsingRedirect(ngModule, routes, route, outlet);\n        }\n        return this.expandRegularSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet);\n    }\n    expandWildCardWithParamsAgainstRouteUsingRedirect(ngModule, routes, route, outlet) {\n        const newTree = this.applyRedirectCommands([], route.redirectTo, {});\n        if (route.redirectTo.startsWith('/')) {\n            return absoluteRedirect(newTree);\n        }\n        return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments) => {\n            const group = new UrlSegmentGroup(newSegments, {});\n            return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n        }));\n    }\n    expandRegularSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet) {\n        const { matched, consumedSegments, lastChild, positionalParamSegments } = match(segmentGroup, route, segments);\n        if (!matched)\n            return noMatch$1(segmentGroup);\n        const newTree = this.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments);\n        if (route.redirectTo.startsWith('/')) {\n            return absoluteRedirect(newTree);\n        }\n        return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments) => {\n            return this.expandSegment(ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet, false);\n        }));\n    }\n    matchSegmentAgainstRoute(ngModule, rawSegmentGroup, route, segments, outlet) {\n        if (route.path === '**') {\n            if (route.loadChildren) {\n                const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                    this.configLoader.load(ngModule.injector, route);\n                return loaded$.pipe(map((cfg) => {\n                    route._loadedConfig = cfg;\n                    return new UrlSegmentGroup(segments, {});\n                }));\n            }\n            return of(new UrlSegmentGroup(segments, {}));\n        }\n        const { matched, consumedSegments, lastChild } = match(rawSegmentGroup, route, segments);\n        if (!matched)\n            return noMatch$1(rawSegmentGroup);\n        const rawSlicedSegments = segments.slice(lastChild);\n        const childConfig$ = this.getChildConfig(ngModule, route, segments);\n        return childConfig$.pipe(mergeMap((routerConfig) => {\n            const childModule = routerConfig.module;\n            const childConfig = routerConfig.routes;\n            const { segmentGroup: splitSegmentGroup, slicedSegments } = split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n            // See comment on the other call to `split` about why this is necessary.\n            const segmentGroup = new UrlSegmentGroup(splitSegmentGroup.segments, splitSegmentGroup.children);\n            if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n                const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n                return expanded$.pipe(map((children) => new UrlSegmentGroup(consumedSegments, children)));\n            }\n            if (childConfig.length === 0 && slicedSegments.length === 0) {\n                return of(new UrlSegmentGroup(consumedSegments, {}));\n            }\n            const matchedOnOutlet = getOutlet(route) === outlet;\n            const expanded$ = this.expandSegment(childModule, segmentGroup, childConfig, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet, true);\n            return expanded$.pipe(map((cs) => new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n        }));\n    }\n    getChildConfig(ngModule, route, segments) {\n        if (route.children) {\n            // The children belong to the same module\n            return of(new LoadedRouterConfig(route.children, ngModule));\n        }\n        if (route.loadChildren) {\n            // lazy children belong to the loaded module\n            if (route._loadedConfig !== undefined) {\n                return of(route._loadedConfig);\n            }\n            return this.runCanLoadGuards(ngModule.injector, route, segments)\n                .pipe(mergeMap((shouldLoadResult) => {\n                if (shouldLoadResult) {\n                    return this.configLoader.load(ngModule.injector, route)\n                        .pipe(map((cfg) => {\n                        route._loadedConfig = cfg;\n                        return cfg;\n                    }));\n                }\n                return canLoadFails(route);\n            }));\n        }\n        return of(new LoadedRouterConfig([], ngModule));\n    }\n    runCanLoadGuards(moduleInjector, route, segments) {\n        const canLoad = route.canLoad;\n        if (!canLoad || canLoad.length === 0)\n            return of(true);\n        const canLoadObservables = canLoad.map((injectionToken) => {\n            const guard = moduleInjector.get(injectionToken);\n            let guardVal;\n            if (isCanLoad(guard)) {\n                guardVal = guard.canLoad(route, segments);\n            }\n            else if (isFunction(guard)) {\n                guardVal = guard(route, segments);\n            }\n            else {\n                throw new Error('Invalid CanLoad guard');\n            }\n            return wrapIntoObservable(guardVal);\n        });\n        return of(canLoadObservables)\n            .pipe(prioritizedGuardValue(), tap((result) => {\n            if (!isUrlTree(result))\n                return;\n            const error = navigationCancelingError(`Redirecting to \"${this.urlSerializer.serialize(result)}\"`);\n            error.url = result;\n            throw error;\n        }), map(result => result === true));\n    }\n    lineralizeSegments(route, urlTree) {\n        let res = [];\n        let c = urlTree.root;\n        while (true) {\n            res = res.concat(c.segments);\n            if (c.numberOfChildren === 0) {\n                return of(res);\n            }\n            if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n                return namedOutletsRedirect(route.redirectTo);\n            }\n            c = c.children[PRIMARY_OUTLET];\n        }\n    }\n    applyRedirectCommands(segments, redirectTo, posParams) {\n        return this.applyRedirectCreatreUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n    }\n    applyRedirectCreatreUrlTree(redirectTo, urlTree, segments, posParams) {\n        const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n        return new UrlTree(newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), urlTree.fragment);\n    }\n    createQueryParams(redirectToParams, actualParams) {\n        const res = {};\n        forEach(redirectToParams, (v, k) => {\n            const copySourceValue = typeof v === 'string' && v.startsWith(':');\n            if (copySourceValue) {\n                const sourceName = v.substring(1);\n                res[k] = actualParams[sourceName];\n            }\n            else {\n                res[k] = v;\n            }\n        });\n        return res;\n    }\n    createSegmentGroup(redirectTo, group, segments, posParams) {\n        const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n        let children = {};\n        forEach(group.children, (child, name) => {\n            children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n        });\n        return new UrlSegmentGroup(updatedSegments, children);\n    }\n    createSegments(redirectTo, redirectToSegments, actualSegments, posParams) {\n        return redirectToSegments.map(s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n            this.findOrReturn(s, actualSegments));\n    }\n    findPosParam(redirectTo, redirectToUrlSegment, posParams) {\n        const pos = posParams[redirectToUrlSegment.path.substring(1)];\n        if (!pos)\n            throw new Error(`Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n        return pos;\n    }\n    findOrReturn(redirectToUrlSegment, actualSegments) {\n        let idx = 0;\n        for (const s of actualSegments) {\n            if (s.path === redirectToUrlSegment.path) {\n                actualSegments.splice(idx);\n                return s;\n            }\n            idx++;\n        }\n        return redirectToUrlSegment;\n    }\n}\n/**\n * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`.\n *\n * When a segment group has only one child which is a primary outlet, merges that child into the\n * parent. That is, the child segment group's segments are merged into the `s` and the child's\n * children become the children of `s`. Think of this like a 'squash', merging the child segment\n * group into the parent.\n */\nfunction mergeTrivialChildren(s) {\n    if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n        const c = s.children[PRIMARY_OUTLET];\n        return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n    }\n    return s;\n}\n/**\n * Recursively merges primary segment children into their parents and also drops empty children\n * (those which have no segments and no children themselves). The latter prevents serializing a\n * group into something like `/a(aux:)`, where `aux` is an empty child segment.\n */\nfunction squashSegmentGroup(segmentGroup) {\n    const newChildren = {};\n    for (const childOutlet of Object.keys(segmentGroup.children)) {\n        const child = segmentGroup.children[childOutlet];\n        const childCandidate = squashSegmentGroup(child);\n        // don't add empty children\n        if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {\n            newChildren[childOutlet] = childCandidate;\n        }\n    }\n    const s = new UrlSegmentGroup(segmentGroup.segments, newChildren);\n    return mergeTrivialChildren(s);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction applyRedirects$1(moduleInjector, configLoader, urlSerializer, config) {\n    return switchMap(t => applyRedirects(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n        .pipe(map(urlAfterRedirects => (Object.assign(Object.assign({}, t), { urlAfterRedirects })))));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass CanActivate {\n    constructor(path) {\n        this.path = path;\n        this.route = this.path[this.path.length - 1];\n    }\n}\nclass CanDeactivate {\n    constructor(component, route) {\n        this.component = component;\n        this.route = route;\n    }\n}\nfunction getAllRouteGuards(future, curr, parentContexts) {\n    const futureRoot = future._root;\n    const currRoot = curr ? curr._root : null;\n    return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\nfunction getCanActivateChild(p) {\n    const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n    if (!canActivateChild || canActivateChild.length === 0)\n        return null;\n    return { node: p, guards: canActivateChild };\n}\nfunction getToken(token, snapshot, moduleInjector) {\n    const config = getClosestLoadedConfig(snapshot);\n    const injector = config ? config.module.injector : moduleInjector;\n    return injector.get(token);\n}\nfunction getClosestLoadedConfig(snapshot) {\n    if (!snapshot)\n        return null;\n    for (let s = snapshot.parent; s; s = s.parent) {\n        const route = s.routeConfig;\n        if (route && route._loadedConfig)\n            return route._loadedConfig;\n    }\n    return null;\n}\nfunction getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks = {\n    canDeactivateChecks: [],\n    canActivateChecks: []\n}) {\n    const prevChildren = nodeChildrenAsMap(currNode);\n    // Process the children of the future route\n    futureNode.children.forEach(c => {\n        getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n        delete prevChildren[c.value.outlet];\n    });\n    // Process any children left from the current route (not active for the future route)\n    forEach(prevChildren, (v, k) => deactivateRouteAndItsChildren(v, contexts.getContext(k), checks));\n    return checks;\n}\nfunction getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks = {\n    canDeactivateChecks: [],\n    canActivateChecks: []\n}) {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n    const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n    // reusing the node\n    if (curr && future.routeConfig === curr.routeConfig) {\n        const shouldRun = shouldRunGuardsAndResolvers(curr, future, future.routeConfig.runGuardsAndResolvers);\n        if (shouldRun) {\n            checks.canActivateChecks.push(new CanActivate(futurePath));\n        }\n        else {\n            // we need to set the data\n            future.data = curr.data;\n            future._resolvedData = curr._resolvedData;\n        }\n        // If we have a component, we need to go through an outlet.\n        if (future.component) {\n            getChildRouteGuards(futureNode, currNode, context ? context.children : null, futurePath, checks);\n            // if we have a componentless route, we recurse but keep the same outlet map.\n        }\n        else {\n            getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n        }\n        if (shouldRun && context && context.outlet && context.outlet.isActivated) {\n            checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));\n        }\n    }\n    else {\n        if (curr) {\n            deactivateRouteAndItsChildren(currNode, context, checks);\n        }\n        checks.canActivateChecks.push(new CanActivate(futurePath));\n        // If we have a component, we need to go through an outlet.\n        if (future.component) {\n            getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n            // if we have a componentless route, we recurse but keep the same outlet map.\n        }\n        else {\n            getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n        }\n    }\n    return checks;\n}\nfunction shouldRunGuardsAndResolvers(curr, future, mode) {\n    if (typeof mode === 'function') {\n        return mode(curr, future);\n    }\n    switch (mode) {\n        case 'pathParamsChange':\n            return !equalPath(curr.url, future.url);\n        case 'pathParamsOrQueryParamsChange':\n            return !equalPath(curr.url, future.url) ||\n                !shallowEqual(curr.queryParams, future.queryParams);\n        case 'always':\n            return true;\n        case 'paramsOrQueryParamsChange':\n            return !equalParamsAndUrlSegments(curr, future) ||\n                !shallowEqual(curr.queryParams, future.queryParams);\n        case 'paramsChange':\n        default:\n            return !equalParamsAndUrlSegments(curr, future);\n    }\n}\nfunction deactivateRouteAndItsChildren(route, context, checks) {\n    const children = nodeChildrenAsMap(route);\n    const r = route.value;\n    forEach(children, (node, childName) => {\n        if (!r.component) {\n            deactivateRouteAndItsChildren(node, context, checks);\n        }\n        else if (context) {\n            deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n        }\n        else {\n            deactivateRouteAndItsChildren(node, null, checks);\n        }\n    });\n    if (!r.component) {\n        checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n    }\n    else if (context && context.outlet && context.outlet.isActivated) {\n        checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n    }\n    else {\n        checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction checkGuards(moduleInjector, forwardEvent) {\n    return mergeMap(t => {\n        const { targetSnapshot, currentSnapshot, guards: { canActivateChecks, canDeactivateChecks } } = t;\n        if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n            return of(Object.assign(Object.assign({}, t), { guardsResult: true }));\n        }\n        return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, moduleInjector)\n            .pipe(mergeMap(canDeactivate => {\n            return canDeactivate && isBoolean(canDeactivate) ?\n                runCanActivateChecks(targetSnapshot, canActivateChecks, moduleInjector, forwardEvent) :\n                of(canDeactivate);\n        }), map(guardsResult => (Object.assign(Object.assign({}, t), { guardsResult }))));\n    });\n}\nfunction runCanDeactivateChecks(checks, futureRSS, currRSS, moduleInjector) {\n    return from(checks).pipe(mergeMap(check => runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)), first(result => {\n        return result !== true;\n    }, true));\n}\nfunction runCanActivateChecks(futureSnapshot, checks, moduleInjector, forwardEvent) {\n    return from(checks).pipe(concatMap((check) => {\n        return concat(fireChildActivationStart(check.route.parent, forwardEvent), fireActivationStart(check.route, forwardEvent), runCanActivateChild(futureSnapshot, check.path, moduleInjector), runCanActivate(futureSnapshot, check.route, moduleInjector));\n    }), first(result => {\n        return result !== true;\n    }, true));\n}\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(snapshot, forwardEvent) {\n    if (snapshot !== null && forwardEvent) {\n        forwardEvent(new ActivationStart(snapshot));\n    }\n    return of(true);\n}\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(snapshot, forwardEvent) {\n    if (snapshot !== null && forwardEvent) {\n        forwardEvent(new ChildActivationStart(snapshot));\n    }\n    return of(true);\n}\nfunction runCanActivate(futureRSS, futureARS, moduleInjector) {\n    const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n    if (!canActivate || canActivate.length === 0)\n        return of(true);\n    const canActivateObservables = canActivate.map((c) => {\n        return defer(() => {\n            const guard = getToken(c, futureARS, moduleInjector);\n            let observable;\n            if (isCanActivate(guard)) {\n                observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n            }\n            else if (isFunction(guard)) {\n                observable = wrapIntoObservable(guard(futureARS, futureRSS));\n            }\n            else {\n                throw new Error('Invalid CanActivate guard');\n            }\n            return observable.pipe(first());\n        });\n    });\n    return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\nfunction runCanActivateChild(futureRSS, path, moduleInjector) {\n    const futureARS = path[path.length - 1];\n    const canActivateChildGuards = path.slice(0, path.length - 1)\n        .reverse()\n        .map(p => getCanActivateChild(p))\n        .filter(_ => _ !== null);\n    const canActivateChildGuardsMapped = canActivateChildGuards.map((d) => {\n        return defer(() => {\n            const guardsMapped = d.guards.map((c) => {\n                const guard = getToken(c, d.node, moduleInjector);\n                let observable;\n                if (isCanActivateChild(guard)) {\n                    observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n                }\n                else if (isFunction(guard)) {\n                    observable = wrapIntoObservable(guard(futureARS, futureRSS));\n                }\n                else {\n                    throw new Error('Invalid CanActivateChild guard');\n                }\n                return observable.pipe(first());\n            });\n            return of(guardsMapped).pipe(prioritizedGuardValue());\n        });\n    });\n    return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\nfunction runCanDeactivate(component, currARS, currRSS, futureRSS, moduleInjector) {\n    const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n    if (!canDeactivate || canDeactivate.length === 0)\n        return of(true);\n    const canDeactivateObservables = canDeactivate.map((c) => {\n        const guard = getToken(c, currARS, moduleInjector);\n        let observable;\n        if (isCanDeactivate(guard)) {\n            observable = wrapIntoObservable(guard.canDeactivate(component, currARS, currRSS, futureRSS));\n        }\n        else if (isFunction(guard)) {\n            observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n        }\n        else {\n            throw new Error('Invalid CanDeactivate guard');\n        }\n        return observable.pipe(first());\n    });\n    return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass NoMatch$1 {\n}\nfunction newObservableError(e) {\n    // TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead.\n    return new Observable((obs) => obs.error(e));\n}\nfunction recognize(rootComponentType, config, urlTree, url, paramsInheritanceStrategy = 'emptyOnly', relativeLinkResolution = 'legacy') {\n    try {\n        const result = new Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution)\n            .recognize();\n        if (result === null) {\n            return newObservableError(new NoMatch$1());\n        }\n        else {\n            return of(result);\n        }\n    }\n    catch (e) {\n        // Catch the potential error from recognize due to duplicate outlet matches and return as an\n        // `Observable` error instead.\n        return newObservableError(e);\n    }\n}\nclass Recognizer {\n    constructor(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution) {\n        this.rootComponentType = rootComponentType;\n        this.config = config;\n        this.urlTree = urlTree;\n        this.url = url;\n        this.paramsInheritanceStrategy = paramsInheritanceStrategy;\n        this.relativeLinkResolution = relativeLinkResolution;\n    }\n    recognize() {\n        const rootSegmentGroup = split(this.urlTree.root, [], [], this.config.filter(c => c.redirectTo === undefined), this.relativeLinkResolution)\n            .segmentGroup;\n        const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n        if (children === null) {\n            return null;\n        }\n        // Use Object.freeze to prevent readers of the Router state from modifying it outside of a\n        // navigation, resulting in the router being out of sync with the browser.\n        const root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n        const rootNode = new TreeNode(root, children);\n        const routeState = new RouterStateSnapshot(this.url, rootNode);\n        this.inheritParamsAndData(routeState._root);\n        return routeState;\n    }\n    inheritParamsAndData(routeNode) {\n        const route = routeNode.value;\n        const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n        route.params = Object.freeze(i.params);\n        route.data = Object.freeze(i.data);\n        routeNode.children.forEach(n => this.inheritParamsAndData(n));\n    }\n    processSegmentGroup(config, segmentGroup, outlet) {\n        if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n            return this.processChildren(config, segmentGroup);\n        }\n        return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n    }\n    /**\n     * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n     * we cannot find a match for _any_ of the children.\n     *\n     * @param config - The `Routes` to match against\n     * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n     *     config.\n     */\n    processChildren(config, segmentGroup) {\n        const children = [];\n        for (const childOutlet of Object.keys(segmentGroup.children)) {\n            const child = segmentGroup.children[childOutlet];\n            // Sort the config so that routes with outlets that match the one being activated appear\n            // first, followed by routes for other outlets, which might match if they have an empty path.\n            const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n            const outletChildren = this.processSegmentGroup(sortedConfig, child, childOutlet);\n            if (outletChildren === null) {\n                // Configs must match all segment children so because we did not find a match for this\n                // outlet, return `null`.\n                return null;\n            }\n            children.push(...outletChildren);\n        }\n        // Because we may have matched two outlets to the same empty path segment, we can have multiple\n        // activated results for the same outlet. We should merge the children of these results so the\n        // final return value is only one `TreeNode` per outlet.\n        const mergedChildren = mergeEmptyPathMatches(children);\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            // This should really never happen - we are only taking the first match for each outlet and\n            // merge the empty path matches.\n            checkOutletNameUniqueness(mergedChildren);\n        }\n        sortActivatedRouteSnapshots(mergedChildren);\n        return mergedChildren;\n    }\n    processSegment(config, segmentGroup, segments, outlet) {\n        for (const r of config) {\n            const children = this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n            if (children !== null) {\n                return children;\n            }\n        }\n        if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n            return [];\n        }\n        return null;\n    }\n    processSegmentAgainstRoute(route, rawSegment, segments, outlet) {\n        if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet))\n            return null;\n        let snapshot;\n        let consumedSegments = [];\n        let rawSlicedSegments = [];\n        if (route.path === '**') {\n            const params = segments.length > 0 ? last(segments).parameters : {};\n            snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), getOutlet(route), route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length, getResolve(route));\n        }\n        else {\n            const result = match(rawSegment, route, segments);\n            if (!result.matched) {\n                return null;\n            }\n            consumedSegments = result.consumedSegments;\n            rawSlicedSegments = segments.slice(result.lastChild);\n            snapshot = new ActivatedRouteSnapshot(consumedSegments, result.parameters, Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), getOutlet(route), route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n        }\n        const childConfig = getChildConfig(route);\n        const { segmentGroup, slicedSegments } = split(rawSegment, consumedSegments, rawSlicedSegments, \n        // Filter out routes with redirectTo because we are trying to create activated route\n        // snapshots and don't handle redirects here. That should have been done in\n        // `applyRedirects`.\n        childConfig.filter(c => c.redirectTo === undefined), this.relativeLinkResolution);\n        if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n            const children = this.processChildren(childConfig, segmentGroup);\n            if (children === null) {\n                return null;\n            }\n            return [new TreeNode(snapshot, children)];\n        }\n        if (childConfig.length === 0 && slicedSegments.length === 0) {\n            return [new TreeNode(snapshot, [])];\n        }\n        const matchedOnOutlet = getOutlet(route) === outlet;\n        // If we matched a config due to empty path match on a different outlet, we need to continue\n        // passing the current outlet for the segment rather than switch to PRIMARY.\n        // Note that we switch to primary when we have a match because outlet configs look like this:\n        // {path: 'a', outlet: 'a', children: [\n        //  {path: 'b', component: B},\n        //  {path: 'c', component: C},\n        // ]}\n        // Notice that the children of the named outlet are configured with the primary outlet\n        const children = this.processSegment(childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet);\n        if (children === null) {\n            return null;\n        }\n        return [new TreeNode(snapshot, children)];\n    }\n}\nfunction sortActivatedRouteSnapshots(nodes) {\n    nodes.sort((a, b) => {\n        if (a.value.outlet === PRIMARY_OUTLET)\n            return -1;\n        if (b.value.outlet === PRIMARY_OUTLET)\n            return 1;\n        return a.value.outlet.localeCompare(b.value.outlet);\n    });\n}\nfunction getChildConfig(route) {\n    if (route.children) {\n        return route.children;\n    }\n    if (route.loadChildren) {\n        return route._loadedConfig.routes;\n    }\n    return [];\n}\nfunction hasEmptyPathConfig(node) {\n    const config = node.value.routeConfig;\n    return config && config.path === '' && config.redirectTo === undefined;\n}\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with the\n * children from each duplicate. This is necessary because different outlets can match a single\n * empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(nodes) {\n    const result = [];\n    // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n    const mergedNodes = new Set();\n    for (const node of nodes) {\n        if (!hasEmptyPathConfig(node)) {\n            result.push(node);\n            continue;\n        }\n        const duplicateEmptyPathNode = result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n        if (duplicateEmptyPathNode !== undefined) {\n            duplicateEmptyPathNode.children.push(...node.children);\n            mergedNodes.add(duplicateEmptyPathNode);\n        }\n        else {\n            result.push(node);\n        }\n    }\n    // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n    // by also merging those children. This is necessary when there are multiple empty path configs in\n    // a row. Put another way: whenever we combine children of two nodes, we need to also check if any\n    // of those children can be combined into a single node as well.\n    for (const mergedNode of mergedNodes) {\n        const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n        result.push(new TreeNode(mergedNode.value, mergedChildren));\n    }\n    return result.filter(n => !mergedNodes.has(n));\n}\nfunction checkOutletNameUniqueness(nodes) {\n    const names = {};\n    nodes.forEach(n => {\n        const routeWithSameOutletName = names[n.value.outlet];\n        if (routeWithSameOutletName) {\n            const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n            const c = n.value.url.map(s => s.toString()).join('/');\n            throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n        }\n        names[n.value.outlet] = n.value;\n    });\n}\nfunction getSourceSegmentGroup(segmentGroup) {\n    let s = segmentGroup;\n    while (s._sourceSegment) {\n        s = s._sourceSegment;\n    }\n    return s;\n}\nfunction getPathIndexShift(segmentGroup) {\n    let s = segmentGroup;\n    let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n    while (s._sourceSegment) {\n        s = s._sourceSegment;\n        res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n    }\n    return res - 1;\n}\nfunction getData(route) {\n    return route.data || {};\n}\nfunction getResolve(route) {\n    return route.resolve || {};\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction recognize$1(rootComponentType, config, serializer, paramsInheritanceStrategy, relativeLinkResolution) {\n    return mergeMap(t => recognize(rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects), paramsInheritanceStrategy, relativeLinkResolution)\n        .pipe(map(targetSnapshot => (Object.assign(Object.assign({}, t), { targetSnapshot })))));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction resolveData(paramsInheritanceStrategy, moduleInjector) {\n    return mergeMap(t => {\n        const { targetSnapshot, guards: { canActivateChecks } } = t;\n        if (!canActivateChecks.length) {\n            return of(t);\n        }\n        let canActivateChecksResolved = 0;\n        return from(canActivateChecks)\n            .pipe(concatMap(check => runResolve(check.route, targetSnapshot, paramsInheritanceStrategy, moduleInjector)), tap(() => canActivateChecksResolved++), takeLast(1), mergeMap(_ => canActivateChecksResolved === canActivateChecks.length ? of(t) : EMPTY));\n    });\n}\nfunction runResolve(futureARS, futureRSS, paramsInheritanceStrategy, moduleInjector) {\n    const resolve = futureARS._resolve;\n    return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n        .pipe(map((resolvedData) => {\n        futureARS._resolvedData = resolvedData;\n        futureARS.data = Object.assign(Object.assign({}, futureARS.data), inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve);\n        return null;\n    }));\n}\nfunction resolveNode(resolve, futureARS, futureRSS, moduleInjector) {\n    const keys = Object.keys(resolve);\n    if (keys.length === 0) {\n        return of({});\n    }\n    const data = {};\n    return from(keys).pipe(mergeMap((key) => getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n        .pipe(tap((value) => {\n        data[key] = value;\n    }))), takeLast(1), mergeMap(() => {\n        // Ensure all resolvers returned values, otherwise don't emit any \"next\" and just complete\n        // the chain which will cancel navigation\n        if (Object.keys(data).length === keys.length) {\n            return of(data);\n        }\n        return EMPTY;\n    }));\n}\nfunction getResolver(injectionToken, futureARS, futureRSS, moduleInjector) {\n    const resolver = getToken(injectionToken, futureARS, moduleInjector);\n    return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n        wrapIntoObservable(resolver(futureARS, futureRSS));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nfunction switchTap(next) {\n    return switchMap(v => {\n        const nextResult = next(v);\n        if (nextResult) {\n            return from(nextResult).pipe(map(() => v));\n        }\n        return of(v);\n    });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nclass RouteReuseStrategy {\n}\n/**\n * @description\n *\n * This base route reuse strategy only reuses routes when the matched router configs are\n * identical. This prevents components from being destroyed and recreated\n * when just the fragment or query parameters change\n * (that is, the existing component is _reused_).\n *\n * This strategy does not store any routes for later reuse.\n *\n * Angular uses this strategy by default.\n *\n *\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\n * class that extends the `BaseRouteReuseStrategy` one.\n * @publicApi\n */\nclass BaseRouteReuseStrategy {\n    /**\n     * Whether the given route should detach for later reuse.\n     * Always returns false for `BaseRouteReuseStrategy`.\n     * */\n    shouldDetach(route) {\n        return false;\n    }\n    /**\n     * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\n     */\n    store(route, detachedTree) { }\n    /** Returns `false`, meaning the route (and its subtree) is never reattached */\n    shouldAttach(route) {\n        return false;\n    }\n    /** Returns `null` because this strategy does not store routes for later re-use. */\n    retrieve(route) {\n        return null;\n    }\n    /**\n     * Determines if a route should be reused.\n     * This strategy returns `true` when the future route config and current route config are\n     * identical.\n     */\n    shouldReuseRoute(future, curr) {\n        return future.routeConfig === curr.routeConfig;\n    }\n}\nclass DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The [DI token](guide/glossary/#di-token) for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nconst ROUTES = new InjectionToken('ROUTES');\nclass RouterConfigLoader {\n    constructor(loader, compiler, onLoadStartListener, onLoadEndListener) {\n        this.loader = loader;\n        this.compiler = compiler;\n        this.onLoadStartListener = onLoadStartListener;\n        this.onLoadEndListener = onLoadEndListener;\n    }\n    load(parentInjector, route) {\n        if (route._loader$) {\n            return route._loader$;\n        }\n        if (this.onLoadStartListener) {\n            this.onLoadStartListener(route);\n        }\n        const moduleFactory$ = this.loadModuleFactory(route.loadChildren);\n        const loadRunner = moduleFactory$.pipe(map((factory) => {\n            if (this.onLoadEndListener) {\n                this.onLoadEndListener(route);\n            }\n            const module = factory.create(parentInjector);\n            // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n            // will get stuck in an infinite loop. The child module's Injector will look to\n            // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n            // for it's parent module instead.\n            return new LoadedRouterConfig(flatten(module.injector.get(ROUTES, undefined, InjectFlags.Self | InjectFlags.Optional))\n                .map(standardizeConfig), module);\n        }), catchError((err) => {\n            route._loader$ = undefined;\n            throw err;\n        }));\n        // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n        route._loader$ = new ConnectableObservable(loadRunner, () => new Subject())\n            .pipe(refCount());\n        return route._loader$;\n    }\n    loadModuleFactory(loadChildren) {\n        if (typeof loadChildren === 'string') {\n            return from(this.loader.load(loadChildren));\n        }\n        else {\n            return wrapIntoObservable(loadChildren()).pipe(mergeMap((t) => {\n                if (t instanceof NgModuleFactory) {\n                    return of(t);\n                }\n                else {\n                    return from(this.compiler.compileModuleAsync(t));\n                }\n            }));\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nclass OutletContext {\n    constructor() {\n        this.outlet = null;\n        this.route = null;\n        this.resolver = null;\n        this.children = new ChildrenOutletContexts();\n        this.attachRef = null;\n    }\n}\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nclass ChildrenOutletContexts {\n    constructor() {\n        // contexts for child outlets, by name.\n        this.contexts = new Map();\n    }\n    /** Called when a `RouterOutlet` directive is instantiated */\n    onChildOutletCreated(childName, outlet) {\n        const context = this.getOrCreateContext(childName);\n        context.outlet = outlet;\n        this.contexts.set(childName, context);\n    }\n    /**\n     * Called when a `RouterOutlet` directive is destroyed.\n     * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n     * re-created later.\n     */\n    onChildOutletDestroyed(childName) {\n        const context = this.getContext(childName);\n        if (context) {\n            context.outlet = null;\n        }\n    }\n    /**\n     * Called when the corresponding route is deactivated during navigation.\n     * Because the component get destroyed, all children outlet are destroyed.\n     */\n    onOutletDeactivated() {\n        const contexts = this.contexts;\n        this.contexts = new Map();\n        return contexts;\n    }\n    onOutletReAttached(contexts) {\n        this.contexts = contexts;\n    }\n    getOrCreateContext(childName) {\n        let context = this.getContext(childName);\n        if (!context) {\n            context = new OutletContext();\n            this.contexts.set(childName, context);\n        }\n        return context;\n    }\n    getContext(childName) {\n        return this.contexts.get(childName) || null;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nclass UrlHandlingStrategy {\n}\n/**\n * @publicApi\n */\nclass DefaultUrlHandlingStrategy {\n    shouldProcessUrl(url) {\n        return true;\n    }\n    extract(url) {\n        return url;\n    }\n    merge(newUrlPart, wholeUrl) {\n        return newUrlPart;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction defaultErrorHandler(error) {\n    throw error;\n}\nfunction defaultMalformedUriErrorHandler(error, urlSerializer, url) {\n    return urlSerializer.parse('/');\n}\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot, runExtras) {\n    return of(null);\n}\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nconst exactMatchOptions = {\n    paths: 'exact',\n    fragment: 'ignored',\n    matrixParams: 'ignored',\n    queryParams: 'exact'\n};\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nconst subsetMatchOptions = {\n    paths: 'subset',\n    fragment: 'ignored',\n    matrixParams: 'ignored',\n    queryParams: 'subset'\n};\n/**\n * @description\n *\n * A service that provides navigation among views and URL manipulation capabilities.\n *\n * @see `Route`.\n * @see [Routing and Navigation Guide](guide/router).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass Router {\n    /**\n     * Creates the router service.\n     */\n    // TODO: vsavkin make internal after the final is out.\n    constructor(rootComponentType, urlSerializer, rootContexts, location, injector, loader, compiler, config) {\n        this.rootComponentType = rootComponentType;\n        this.urlSerializer = urlSerializer;\n        this.rootContexts = rootContexts;\n        this.location = location;\n        this.config = config;\n        this.lastSuccessfulNavigation = null;\n        this.currentNavigation = null;\n        this.disposed = false;\n        /**\n         * Tracks the previously seen location change from the location subscription so we can compare\n         * the two latest to see if they are duplicates. See setUpLocationChangeListener.\n         */\n        this.lastLocationChangeInfo = null;\n        this.navigationId = 0;\n        /**\n         * The id of the currently active page in the router.\n         * Updated to the transition's target id on a successful navigation.\n         *\n         * This is used to track what page the router last activated. When an attempted navigation fails,\n         * the router can then use this to compute how to restore the state back to the previously active\n         * page.\n         */\n        this.currentPageId = 0;\n        this.isNgZoneEnabled = false;\n        /**\n         * An event stream for routing events in this NgModule.\n         */\n        this.events = new Subject();\n        /**\n         * A handler for navigation errors in this NgModule.\n         */\n        this.errorHandler = defaultErrorHandler;\n        /**\n         * A handler for errors thrown by `Router.parseUrl(url)`\n         * when `url` contains an invalid character.\n         * The most common case is a `%` sign\n         * that's not encoded and is not part of a percent encoded sequence.\n         */\n        this.malformedUriErrorHandler = defaultMalformedUriErrorHandler;\n        /**\n         * True if at least one navigation event has occurred,\n         * false otherwise.\n         */\n        this.navigated = false;\n        this.lastSuccessfulId = -1;\n        /**\n         * Hooks that enable you to pause navigation,\n         * either before or after the preactivation phase.\n         * Used by `RouterModule`.\n         *\n         * @internal\n         */\n        this.hooks = { beforePreactivation: defaultRouterHook, afterPreactivation: defaultRouterHook };\n        /**\n         * A strategy for extracting and merging URLs.\n         * Used for AngularJS to Angular migrations.\n         */\n        this.urlHandlingStrategy = new DefaultUrlHandlingStrategy();\n        /**\n         * A strategy for re-using routes.\n         */\n        this.routeReuseStrategy = new DefaultRouteReuseStrategy();\n        /**\n         * How to handle a navigation request to the current URL. One of:\n         *\n         * - `'ignore'` :  The router ignores the request.\n         * - `'reload'` : The router reloads the URL. Use to implement a \"refresh\" feature.\n         *\n         * Note that this only configures whether the Route reprocesses the URL and triggers related\n         * action and events like redirects, guards, and resolvers. By default, the router re-uses a\n         * component instance when it re-navigates to the same component type without visiting a different\n         * component first. This behavior is configured by the `RouteReuseStrategy`. In order to reload\n         * routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`\n         * _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`.\n         */\n        this.onSameUrlNavigation = 'ignore';\n        /**\n         * How to merge parameters, data, and resolved data from parent to child\n         * routes. One of:\n         *\n         * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\n         * for path-less or component-less routes.\n         * - `'always'` : Inherit parent parameters, data, and resolved data\n         * for all child routes.\n         */\n        this.paramsInheritanceStrategy = 'emptyOnly';\n        /**\n         * Determines when the router updates the browser URL.\n         * By default (`\"deferred\"`), updates the browser URL after navigation has finished.\n         * Set to `'eager'` to update the browser URL at the beginning of navigation.\n         * You can choose to update early so that, if navigation fails,\n         * you can show an error message with the URL that failed.\n         */\n        this.urlUpdateStrategy = 'deferred';\n        /**\n         * Enables a bug fix that corrects relative link resolution in components with empty paths.\n         * @see `RouterModule`\n         */\n        this.relativeLinkResolution = 'corrected';\n        /**\n         * Configures how the Router attempts to restore state when a navigation is cancelled.\n         *\n         * 'replace' - Always uses `location.replaceState` to set the browser state to the state of the\n         * router before the navigation started.\n         *\n         * 'computed' - Will always return to the same state that corresponds to the actual Angular route\n         * when the navigation gets cancelled right after triggering a `popstate` event.\n         *\n         * The default value is `replace`\n         *\n         * @internal\n         */\n        // TODO(atscott): Determine how/when/if to make this public API\n        // This shouldn’t be an option at all but may need to be in order to allow migration without a\n        // breaking change. We need to determine if it should be made into public api (or if we forgo\n        // the option and release as a breaking change bug fix in a major version).\n        this.canceledNavigationResolution = 'replace';\n        const onLoadStart = (r) => this.triggerEvent(new RouteConfigLoadStart(r));\n        const onLoadEnd = (r) => this.triggerEvent(new RouteConfigLoadEnd(r));\n        this.ngModule = injector.get(NgModuleRef);\n        this.console = injector.get(ɵConsole);\n        const ngZone = injector.get(NgZone);\n        this.isNgZoneEnabled = ngZone instanceof NgZone && NgZone.isInAngularZone();\n        this.resetConfig(config);\n        this.currentUrlTree = createEmptyUrlTree();\n        this.rawUrlTree = this.currentUrlTree;\n        this.browserUrlTree = this.currentUrlTree;\n        this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n        this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n        this.transitions = new BehaviorSubject({\n            id: 0,\n            targetPageId: 0,\n            currentUrlTree: this.currentUrlTree,\n            currentRawUrl: this.currentUrlTree,\n            extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n            urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n            rawUrl: this.currentUrlTree,\n            extras: {},\n            resolve: null,\n            reject: null,\n            promise: Promise.resolve(true),\n            source: 'imperative',\n            restoredState: null,\n            currentSnapshot: this.routerState.snapshot,\n            targetSnapshot: null,\n            currentRouterState: this.routerState,\n            targetRouterState: null,\n            guards: { canActivateChecks: [], canDeactivateChecks: [] },\n            guardsResult: null,\n        });\n        this.navigations = this.setupNavigations(this.transitions);\n        this.processNavigations();\n    }\n    /**\n     * The ɵrouterPageId of whatever page is currently active in the browser history. This is\n     * important for computing the target page id for new navigations because we need to ensure each\n     * page id in the browser history is 1 more than the previous entry.\n     */\n    get browserPageId() {\n        var _a;\n        return (_a = this.location.getState()) === null || _a === void 0 ? void 0 : _a.ɵrouterPageId;\n    }\n    setupNavigations(transitions) {\n        const eventsSubject = this.events;\n        return transitions.pipe(filter(t => t.id !== 0), \n        // Extract URL\n        map(t => (Object.assign(Object.assign({}, t), { extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl) }))), \n        // Using switchMap so we cancel executing navigations when a new one comes in\n        switchMap(t => {\n            let completed = false;\n            let errored = false;\n            return of(t).pipe(\n            // Store the Navigation object\n            tap(t => {\n                this.currentNavigation = {\n                    id: t.id,\n                    initialUrl: t.currentRawUrl,\n                    extractedUrl: t.extractedUrl,\n                    trigger: t.source,\n                    extras: t.extras,\n                    previousNavigation: this.lastSuccessfulNavigation ? Object.assign(Object.assign({}, this.lastSuccessfulNavigation), { previousNavigation: null }) :\n                        null\n                };\n            }), switchMap(t => {\n                const urlTransition = !this.navigated ||\n                    t.extractedUrl.toString() !== this.browserUrlTree.toString();\n                const processCurrentUrl = (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n                    this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n                // If the source of the navigation is from a browser event, the URL is\n                // already updated. We already need to sync the internal state.\n                if (isBrowserTriggeredNavigation(t.source)) {\n                    this.browserUrlTree = t.rawUrl;\n                }\n                if (processCurrentUrl) {\n                    return of(t).pipe(\n                    // Fire NavigationStart event\n                    switchMap(t => {\n                        const transition = this.transitions.getValue();\n                        eventsSubject.next(new NavigationStart(t.id, this.serializeUrl(t.extractedUrl), t.source, t.restoredState));\n                        if (transition !== this.transitions.getValue()) {\n                            return EMPTY;\n                        }\n                        // This delay is required to match old behavior that forced\n                        // navigation to always be async\n                        return Promise.resolve(t);\n                    }), \n                    // ApplyRedirects\n                    applyRedirects$1(this.ngModule.injector, this.configLoader, this.urlSerializer, this.config), \n                    // Update the currentNavigation\n                    tap(t => {\n                        this.currentNavigation = Object.assign(Object.assign({}, this.currentNavigation), { finalUrl: t.urlAfterRedirects });\n                    }), \n                    // Recognize\n                    recognize$1(this.rootComponentType, this.config, (url) => this.serializeUrl(url), this.paramsInheritanceStrategy, this.relativeLinkResolution), \n                    // Update URL if in `eager` update mode\n                    tap(t => {\n                        if (this.urlUpdateStrategy === 'eager') {\n                            if (!t.extras.skipLocationChange) {\n                                this.setBrowserUrl(t.urlAfterRedirects, t);\n                            }\n                            this.browserUrlTree = t.urlAfterRedirects;\n                        }\n                        // Fire RoutesRecognized\n                        const routesRecognized = new RoutesRecognized(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n                        eventsSubject.next(routesRecognized);\n                    }));\n                }\n                else {\n                    const processPreviousUrl = urlTransition && this.rawUrlTree &&\n                        this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n                    /* When the current URL shouldn't be processed, but the previous one was,\n                     * we handle this \"error condition\" by navigating to the previously\n                     * successful URL, but leaving the URL intact.*/\n                    if (processPreviousUrl) {\n                        const { id, extractedUrl, source, restoredState, extras } = t;\n                        const navStart = new NavigationStart(id, this.serializeUrl(extractedUrl), source, restoredState);\n                        eventsSubject.next(navStart);\n                        const targetSnapshot = createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n                        return of(Object.assign(Object.assign({}, t), { targetSnapshot, urlAfterRedirects: extractedUrl, extras: Object.assign(Object.assign({}, extras), { skipLocationChange: false, replaceUrl: false }) }));\n                    }\n                    else {\n                        /* When neither the current or previous URL can be processed, do nothing\n                         * other than update router's internal reference to the current \"settled\"\n                         * URL. This way the next navigation will be coming from the current URL\n                         * in the browser.\n                         */\n                        this.rawUrlTree = t.rawUrl;\n                        this.browserUrlTree = t.urlAfterRedirects;\n                        t.resolve(null);\n                        return EMPTY;\n                    }\n                }\n            }), \n            // Before Preactivation\n            switchTap(t => {\n                const { targetSnapshot, id: navigationId, extractedUrl: appliedUrlTree, rawUrl: rawUrlTree, extras: { skipLocationChange, replaceUrl } } = t;\n                return this.hooks.beforePreactivation(targetSnapshot, {\n                    navigationId,\n                    appliedUrlTree,\n                    rawUrlTree,\n                    skipLocationChange: !!skipLocationChange,\n                    replaceUrl: !!replaceUrl,\n                });\n            }), \n            // --- GUARDS ---\n            tap(t => {\n                const guardsStart = new GuardsCheckStart(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n                this.triggerEvent(guardsStart);\n            }), map(t => (Object.assign(Object.assign({}, t), { guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts) }))), checkGuards(this.ngModule.injector, (evt) => this.triggerEvent(evt)), tap(t => {\n                if (isUrlTree(t.guardsResult)) {\n                    const error = navigationCancelingError(`Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n                    error.url = t.guardsResult;\n                    throw error;\n                }\n                const guardsEnd = new GuardsCheckEnd(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);\n                this.triggerEvent(guardsEnd);\n            }), filter(t => {\n                if (!t.guardsResult) {\n                    this.restoreHistory(t);\n                    this.cancelNavigationTransition(t, '');\n                    return false;\n                }\n                return true;\n            }), \n            // --- RESOLVE ---\n            switchTap(t => {\n                if (t.guards.canActivateChecks.length) {\n                    return of(t).pipe(tap(t => {\n                        const resolveStart = new ResolveStart(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n                        this.triggerEvent(resolveStart);\n                    }), switchMap(t => {\n                        let dataResolved = false;\n                        return of(t).pipe(resolveData(this.paramsInheritanceStrategy, this.ngModule.injector), tap({\n                            next: () => dataResolved = true,\n                            complete: () => {\n                                if (!dataResolved) {\n                                    this.restoreHistory(t);\n                                    this.cancelNavigationTransition(t, `At least one route resolver didn't emit any value.`);\n                                }\n                            }\n                        }));\n                    }), tap(t => {\n                        const resolveEnd = new ResolveEnd(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n                        this.triggerEvent(resolveEnd);\n                    }));\n                }\n                return undefined;\n            }), \n            // --- AFTER PREACTIVATION ---\n            switchTap((t) => {\n                const { targetSnapshot, id: navigationId, extractedUrl: appliedUrlTree, rawUrl: rawUrlTree, extras: { skipLocationChange, replaceUrl } } = t;\n                return this.hooks.afterPreactivation(targetSnapshot, {\n                    navigationId,\n                    appliedUrlTree,\n                    rawUrlTree,\n                    skipLocationChange: !!skipLocationChange,\n                    replaceUrl: !!replaceUrl,\n                });\n            }), map((t) => {\n                const targetRouterState = createRouterState(this.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);\n                return (Object.assign(Object.assign({}, t), { targetRouterState }));\n            }), \n            /* Once here, we are about to activate syncronously. The assumption is this\n               will succeed, and user code may read from the Router service. Therefore\n               before activation, we need to update router properties storing the current\n               URL and the RouterState, as well as updated the browser URL. All this should\n               happen *before* activating. */\n            tap((t) => {\n                this.currentUrlTree = t.urlAfterRedirects;\n                this.rawUrlTree =\n                    this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n                this.routerState = t.targetRouterState;\n                if (this.urlUpdateStrategy === 'deferred') {\n                    if (!t.extras.skipLocationChange) {\n                        this.setBrowserUrl(this.rawUrlTree, t);\n                    }\n                    this.browserUrlTree = t.urlAfterRedirects;\n                }\n            }), activateRoutes(this.rootContexts, this.routeReuseStrategy, (evt) => this.triggerEvent(evt)), tap({\n                next() {\n                    completed = true;\n                },\n                complete() {\n                    completed = true;\n                }\n            }), finalize(() => {\n                /* When the navigation stream finishes either through error or success, we\n                 * set the `completed` or `errored` flag. However, there are some situations\n                 * where we could get here without either of those being set. For instance, a\n                 * redirect during NavigationStart. Therefore, this is a catch-all to make\n                 * sure the NavigationCancel\n                 * event is fired when a navigation gets cancelled but not caught by other\n                 * means. */\n                if (!completed && !errored) {\n                    const cancelationReason = `Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`;\n                    if (this.canceledNavigationResolution === 'replace') {\n                        // Must reset to current URL tree here to ensure history.state is set. On\n                        // a fresh page load, if a new navigation comes in before a successful\n                        // navigation completes, there will be nothing in\n                        // history.state.navigationId. This can cause sync problems with\n                        // AngularJS sync code which looks for a value here in order to determine\n                        // whether or not to handle a given popstate event or to leave it to the\n                        // Angular router.\n                        this.restoreHistory(t);\n                        this.cancelNavigationTransition(t, cancelationReason);\n                    }\n                    else {\n                        // We cannot trigger a `location.historyGo` if the\n                        // cancellation was due to a new navigation before the previous could\n                        // complete. This is because `location.historyGo` triggers a `popstate`\n                        // which would also trigger another navigation. Instead, treat this as a\n                        // redirect and do not reset the state.\n                        this.cancelNavigationTransition(t, cancelationReason);\n                        // TODO(atscott): The same problem happens here with a fresh page load\n                        // and a new navigation before that completes where we won't set a page\n                        // id.\n                    }\n                }\n                // currentNavigation should always be reset to null here. If navigation was\n                // successful, lastSuccessfulTransition will have already been set. Therefore\n                // we can safely set currentNavigation to null here.\n                this.currentNavigation = null;\n            }), catchError((e) => {\n                // TODO(atscott): The NavigationTransition `t` used here does not accurately\n                // reflect the current state of the whole transition because some operations\n                // return a new object rather than modifying the one in the outermost\n                // `switchMap`.\n                //  The fix can likely be to:\n                //  1. Rename the outer `t` variable so it's not shadowed all the time and\n                //  confusing\n                //  2. Keep reassigning to the outer variable after each stage to ensure it\n                //  gets updated. Or change the implementations to not return a copy.\n                // Not changed yet because it affects existing code and would need to be\n                // tested more thoroughly.\n                errored = true;\n                /* This error type is issued during Redirect, and is handled as a\n                 * cancellation rather than an error. */\n                if (isNavigationCancelingError(e)) {\n                    const redirecting = isUrlTree(e.url);\n                    if (!redirecting) {\n                        // Set property only if we're not redirecting. If we landed on a page and\n                        // redirect to `/` route, the new navigation is going to see the `/`\n                        // isn't a change from the default currentUrlTree and won't navigate.\n                        // This is only applicable with initial navigation, so setting\n                        // `navigated` only when not redirecting resolves this scenario.\n                        this.navigated = true;\n                        this.restoreHistory(t, true);\n                    }\n                    const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message);\n                    eventsSubject.next(navCancel);\n                    // When redirecting, we need to delay resolving the navigation\n                    // promise and push it to the redirect navigation\n                    if (!redirecting) {\n                        t.resolve(false);\n                    }\n                    else {\n                        // setTimeout is required so this navigation finishes with\n                        // the return EMPTY below. If it isn't allowed to finish\n                        // processing, there can be multiple navigations to the same\n                        // URL.\n                        setTimeout(() => {\n                            const mergedTree = this.urlHandlingStrategy.merge(e.url, this.rawUrlTree);\n                            const extras = {\n                                skipLocationChange: t.extras.skipLocationChange,\n                                // The URL is already updated at this point if we have 'eager' URL\n                                // updates or if the navigation was triggered by the browser (back\n                                // button, URL bar, etc). We want to replace that item in history if\n                                // the navigation is rejected.\n                                replaceUrl: this.urlUpdateStrategy === 'eager' ||\n                                    isBrowserTriggeredNavigation(t.source)\n                            };\n                            this.scheduleNavigation(mergedTree, 'imperative', null, extras, { resolve: t.resolve, reject: t.reject, promise: t.promise });\n                        }, 0);\n                    }\n                    /* All other errors should reset to the router's internal URL reference to\n                     * the pre-error state. */\n                }\n                else {\n                    this.restoreHistory(t, true);\n                    const navError = new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n                    eventsSubject.next(navError);\n                    try {\n                        t.resolve(this.errorHandler(e));\n                    }\n                    catch (ee) {\n                        t.reject(ee);\n                    }\n                }\n                return EMPTY;\n            }));\n            // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n        }));\n    }\n    /**\n     * @internal\n     * TODO: this should be removed once the constructor of the router made internal\n     */\n    resetRootComponentType(rootComponentType) {\n        this.rootComponentType = rootComponentType;\n        // TODO: vsavkin router 4.0 should make the root component set to null\n        // this will simplify the lifecycle of the router.\n        this.routerState.root.component = this.rootComponentType;\n    }\n    getTransition() {\n        const transition = this.transitions.value;\n        // This value needs to be set. Other values such as extractedUrl are set on initial navigation\n        // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not\n        // processing the previous URL.\n        transition.urlAfterRedirects = this.browserUrlTree;\n        return transition;\n    }\n    setTransition(t) {\n        this.transitions.next(Object.assign(Object.assign({}, this.getTransition()), t));\n    }\n    /**\n     * Sets up the location change listener and performs the initial navigation.\n     */\n    initialNavigation() {\n        this.setUpLocationChangeListener();\n        if (this.navigationId === 0) {\n            this.navigateByUrl(this.location.path(true), { replaceUrl: true });\n        }\n    }\n    /**\n     * Sets up the location change listener. This listener detects navigations triggered from outside\n     * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\n     * navigation so that the correct events, guards, etc. are triggered.\n     */\n    setUpLocationChangeListener() {\n        // Don't need to use Zone.wrap any more, because zone.js\n        // already patch onPopState, so location change callback will\n        // run into ngZone\n        if (!this.locationSubscription) {\n            this.locationSubscription = this.location.subscribe(event => {\n                const currentChange = this.extractLocationChangeInfoFromEvent(event);\n                // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n                // hybrid apps.\n                if (this.shouldScheduleNavigation(this.lastLocationChangeInfo, currentChange)) {\n                    setTimeout(() => {\n                        const { source, state, urlTree } = currentChange;\n                        const extras = { replaceUrl: true };\n                        if (state) {\n                            const stateCopy = Object.assign({}, state);\n                            delete stateCopy.navigationId;\n                            delete stateCopy.ɵrouterPageId;\n                            if (Object.keys(stateCopy).length !== 0) {\n                                extras.state = stateCopy;\n                            }\n                        }\n                        this.scheduleNavigation(urlTree, source, state, extras);\n                    }, 0);\n                }\n                this.lastLocationChangeInfo = currentChange;\n            });\n        }\n    }\n    /** Extracts router-related information from a `PopStateEvent`. */\n    extractLocationChangeInfoFromEvent(change) {\n        var _a;\n        return {\n            source: change['type'] === 'popstate' ? 'popstate' : 'hashchange',\n            urlTree: this.parseUrl(change['url']),\n            // Navigations coming from Angular router have a navigationId state\n            // property. When this exists, restore the state.\n            state: ((_a = change.state) === null || _a === void 0 ? void 0 : _a.navigationId) ? change.state : null,\n            transitionId: this.getTransition().id\n        };\n    }\n    /**\n     * Determines whether two events triggered by the Location subscription are due to the same\n     * navigation. The location subscription can fire two events (popstate and hashchange) for a\n     * single navigation. The second one should be ignored, that is, we should not schedule another\n     * navigation in the Router.\n     */\n    shouldScheduleNavigation(previous, current) {\n        if (!previous)\n            return true;\n        const sameDestination = current.urlTree.toString() === previous.urlTree.toString();\n        const eventsOccurredAtSameTime = current.transitionId === previous.transitionId;\n        if (!eventsOccurredAtSameTime || !sameDestination) {\n            return true;\n        }\n        if ((current.source === 'hashchange' && previous.source === 'popstate') ||\n            (current.source === 'popstate' && previous.source === 'hashchange')) {\n            return false;\n        }\n        return true;\n    }\n    /** The current URL. */\n    get url() {\n        return this.serializeUrl(this.currentUrlTree);\n    }\n    /**\n     * Returns the current `Navigation` object when the router is navigating,\n     * and `null` when idle.\n     */\n    getCurrentNavigation() {\n        return this.currentNavigation;\n    }\n    /** @internal */\n    triggerEvent(event) {\n        this.events.next(event);\n    }\n    /**\n     * Resets the route configuration used for navigation and generating links.\n     *\n     * @param config The route array for the new configuration.\n     *\n     * @usageNotes\n     *\n     * ```\n     * router.resetConfig([\n     *  { path: 'team/:id', component: TeamCmp, children: [\n     *    { path: 'simple', component: SimpleCmp },\n     *    { path: 'user/:name', component: UserCmp }\n     *  ]}\n     * ]);\n     * ```\n     */\n    resetConfig(config) {\n        validateConfig(config);\n        this.config = config.map(standardizeConfig);\n        this.navigated = false;\n        this.lastSuccessfulId = -1;\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        this.dispose();\n    }\n    /** Disposes of the router. */\n    dispose() {\n        this.transitions.complete();\n        if (this.locationSubscription) {\n            this.locationSubscription.unsubscribe();\n            this.locationSubscription = undefined;\n        }\n        this.disposed = true;\n    }\n    /**\n     * Appends URL segments to the current URL tree to create a new URL tree.\n     *\n     * @param commands An array of URL fragments with which to construct the new URL tree.\n     * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n     * segments, followed by the parameters for each segment.\n     * The fragments are applied to the current URL tree or the one provided  in the `relativeTo`\n     * property of the options object, if supplied.\n     * @param navigationExtras Options that control the navigation strategy.\n     * @returns The new URL tree.\n     *\n     * @usageNotes\n     *\n     * ```\n     * // create /team/33/user/11\n     * router.createUrlTree(['/team', 33, 'user', 11]);\n     *\n     * // create /team/33;expand=true/user/11\n     * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n     *\n     * // you can collapse static segments like this (this works only with the first passed-in value):\n     * router.createUrlTree(['/team/33/user', userId]);\n     *\n     * // If the first segment can contain slashes, and you do not want the router to split it,\n     * // you can do the following:\n     * router.createUrlTree([{segmentPath: '/one/two'}]);\n     *\n     * // create /team/33/(user/11//right:chat)\n     * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n     *\n     * // remove the right secondary node\n     * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n     *\n     * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n     *\n     * // navigate to /team/33/user/11/details\n     * router.createUrlTree(['details'], {relativeTo: route});\n     *\n     * // navigate to /team/33/user/22\n     * router.createUrlTree(['../22'], {relativeTo: route});\n     *\n     * // navigate to /team/44/user/22\n     * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n     *\n     * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\n     * tree should be created relative to the root.\n     * ```\n     */\n    createUrlTree(commands, navigationExtras = {}) {\n        const { relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment } = navigationExtras;\n        const a = relativeTo || this.routerState.root;\n        const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n        let q = null;\n        switch (queryParamsHandling) {\n            case 'merge':\n                q = Object.assign(Object.assign({}, this.currentUrlTree.queryParams), queryParams);\n                break;\n            case 'preserve':\n                q = this.currentUrlTree.queryParams;\n                break;\n            default:\n                q = queryParams || null;\n        }\n        if (q !== null) {\n            q = this.removeEmptyProps(q);\n        }\n        return createUrlTree(a, this.currentUrlTree, commands, q, f !== null && f !== void 0 ? f : null);\n    }\n    /**\n     * Navigates to a view using an absolute route path.\n     *\n     * @param url An absolute path for a defined route. The function does not apply any delta to the\n     *     current URL.\n     * @param extras An object containing properties that modify the navigation strategy.\n     *\n     * @returns A Promise that resolves to 'true' when navigation succeeds,\n     * to 'false' when navigation fails, or is rejected on error.\n     *\n     * @usageNotes\n     *\n     * The following calls request navigation to an absolute path.\n     *\n     * ```\n     * router.navigateByUrl(\"/team/33/user/11\");\n     *\n     * // Navigate without updating the URL\n     * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n     * ```\n     *\n     * @see [Routing and Navigation guide](guide/router)\n     *\n     */\n    navigateByUrl(url, extras = {\n        skipLocationChange: false\n    }) {\n        if (typeof ngDevMode === 'undefined' ||\n            ngDevMode && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n            this.console.warn(`Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n        }\n        const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n        const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n        return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n    }\n    /**\n     * Navigate based on the provided array of commands and a starting point.\n     * If no starting route is provided, the navigation is absolute.\n     *\n     * @param commands An array of URL fragments with which to construct the target URL.\n     * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n     * segments, followed by the parameters for each segment.\n     * The fragments are applied to the current URL or the one provided  in the `relativeTo` property\n     * of the options object, if supplied.\n     * @param extras An options object that determines how the URL should be constructed or\n     *     interpreted.\n     *\n     * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation\n     *     fails,\n     * or is rejected on error.\n     *\n     * @usageNotes\n     *\n     * The following calls request navigation to a dynamic route path relative to the current URL.\n     *\n     * ```\n     * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n     *\n     * // Navigate without updating the URL, overriding the default behavior\n     * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n     * ```\n     *\n     * @see [Routing and Navigation guide](guide/router)\n     *\n     */\n    navigate(commands, extras = { skipLocationChange: false }) {\n        validateCommands(commands);\n        return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n    }\n    /** Serializes a `UrlTree` into a string */\n    serializeUrl(url) {\n        return this.urlSerializer.serialize(url);\n    }\n    /** Parses a string into a `UrlTree` */\n    parseUrl(url) {\n        let urlTree;\n        try {\n            urlTree = this.urlSerializer.parse(url);\n        }\n        catch (e) {\n            urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n        }\n        return urlTree;\n    }\n    isActive(url, matchOptions) {\n        let options;\n        if (matchOptions === true) {\n            options = Object.assign({}, exactMatchOptions);\n        }\n        else if (matchOptions === false) {\n            options = Object.assign({}, subsetMatchOptions);\n        }\n        else {\n            options = matchOptions;\n        }\n        if (isUrlTree(url)) {\n            return containsTree(this.currentUrlTree, url, options);\n        }\n        const urlTree = this.parseUrl(url);\n        return containsTree(this.currentUrlTree, urlTree, options);\n    }\n    removeEmptyProps(params) {\n        return Object.keys(params).reduce((result, key) => {\n            const value = params[key];\n            if (value !== null && value !== undefined) {\n                result[key] = value;\n            }\n            return result;\n        }, {});\n    }\n    processNavigations() {\n        this.navigations.subscribe(t => {\n            this.navigated = true;\n            this.lastSuccessfulId = t.id;\n            this.currentPageId = t.targetPageId;\n            this.events\n                .next(new NavigationEnd(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n            this.lastSuccessfulNavigation = this.currentNavigation;\n            t.resolve(true);\n        }, e => {\n            this.console.warn(`Unhandled Navigation Error: ${e}`);\n        });\n    }\n    scheduleNavigation(rawUrl, source, restoredState, extras, priorPromise) {\n        var _a, _b;\n        if (this.disposed) {\n            return Promise.resolve(false);\n        }\n        // * Imperative navigations (router.navigate) might trigger additional navigations to the same\n        //   URL via a popstate event and the locationChangeListener. We should skip these duplicate\n        //   navs. Duplicates may also be triggered by attempts to sync AngularJS and Angular router\n        //   states.\n        // * Imperative navigations can be cancelled by router guards, meaning the URL won't change. If\n        //   the user follows that with a navigation using the back/forward button or manual URL change,\n        //   the destination may be the same as the previous imperative attempt. We should not skip\n        //   these navigations because it's a separate case from the one above -- it's not a duplicate\n        //   navigation.\n        const lastNavigation = this.getTransition();\n        // We don't want to skip duplicate successful navs if they're imperative because\n        // onSameUrlNavigation could be 'reload' (so the duplicate is intended).\n        const browserNavPrecededByRouterNav = isBrowserTriggeredNavigation(source) && lastNavigation &&\n            !isBrowserTriggeredNavigation(lastNavigation.source);\n        const lastNavigationSucceeded = this.lastSuccessfulId === lastNavigation.id;\n        // If the last navigation succeeded or is in flight, we can use the rawUrl as the comparison.\n        // However, if it failed, we should compare to the final result (urlAfterRedirects).\n        const lastNavigationUrl = (lastNavigationSucceeded || this.currentNavigation) ?\n            lastNavigation.rawUrl :\n            lastNavigation.urlAfterRedirects;\n        const duplicateNav = lastNavigationUrl.toString() === rawUrl.toString();\n        if (browserNavPrecededByRouterNav && duplicateNav) {\n            return Promise.resolve(true); // return value is not used\n        }\n        let resolve;\n        let reject;\n        let promise;\n        if (priorPromise) {\n            resolve = priorPromise.resolve;\n            reject = priorPromise.reject;\n            promise = priorPromise.promise;\n        }\n        else {\n            promise = new Promise((res, rej) => {\n                resolve = res;\n                reject = rej;\n            });\n        }\n        const id = ++this.navigationId;\n        let targetPageId;\n        if (this.canceledNavigationResolution === 'computed') {\n            const isInitialPage = this.currentPageId === 0;\n            if (isInitialPage) {\n                restoredState = this.location.getState();\n            }\n            // If the `ɵrouterPageId` exist in the state then `targetpageId` should have the value of\n            // `ɵrouterPageId`. This is the case for something like a page refresh where we assign the\n            // target id to the previously set value for that page.\n            if (restoredState && restoredState.ɵrouterPageId) {\n                targetPageId = restoredState.ɵrouterPageId;\n            }\n            else {\n                // If we're replacing the URL or doing a silent navigation, we do not want to increment the\n                // page id because we aren't pushing a new entry to history.\n                if (extras.replaceUrl || extras.skipLocationChange) {\n                    targetPageId = (_a = this.browserPageId) !== null && _a !== void 0 ? _a : 0;\n                }\n                else {\n                    targetPageId = ((_b = this.browserPageId) !== null && _b !== void 0 ? _b : 0) + 1;\n                }\n            }\n        }\n        else {\n            // This is unused when `canceledNavigationResolution` is not computed.\n            targetPageId = 0;\n        }\n        this.setTransition({\n            id,\n            targetPageId,\n            source,\n            restoredState,\n            currentUrlTree: this.currentUrlTree,\n            currentRawUrl: this.rawUrlTree,\n            rawUrl,\n            extras,\n            resolve,\n            reject,\n            promise,\n            currentSnapshot: this.routerState.snapshot,\n            currentRouterState: this.routerState\n        });\n        // Make sure that the error is propagated even though `processNavigations` catch\n        // handler does not rethrow\n        return promise.catch((e) => {\n            return Promise.reject(e);\n        });\n    }\n    setBrowserUrl(url, t) {\n        const path = this.urlSerializer.serialize(url);\n        const state = Object.assign(Object.assign({}, t.extras.state), this.generateNgRouterState(t.id, t.targetPageId));\n        if (this.location.isCurrentPathEqualTo(path) || !!t.extras.replaceUrl) {\n            this.location.replaceState(path, '', state);\n        }\n        else {\n            this.location.go(path, '', state);\n        }\n    }\n    /**\n     * Performs the necessary rollback action to restore the browser URL to the\n     * state before the transition.\n     */\n    restoreHistory(t, restoringFromCaughtError = false) {\n        var _a, _b;\n        if (this.canceledNavigationResolution === 'computed') {\n            const targetPagePosition = this.currentPageId - t.targetPageId;\n            // The navigator change the location before triggered the browser event,\n            // so we need to go back to the current url if the navigation is canceled.\n            // Also, when navigation gets cancelled while using url update strategy eager, then we need to\n            // go back. Because, when `urlUpdateSrategy` is `eager`; `setBrowserUrl` method is called\n            // before any verification.\n            const browserUrlUpdateOccurred = (t.source === 'popstate' || this.urlUpdateStrategy === 'eager' ||\n                this.currentUrlTree === ((_a = this.currentNavigation) === null || _a === void 0 ? void 0 : _a.finalUrl));\n            if (browserUrlUpdateOccurred && targetPagePosition !== 0) {\n                this.location.historyGo(targetPagePosition);\n            }\n            else if (this.currentUrlTree === ((_b = this.currentNavigation) === null || _b === void 0 ? void 0 : _b.finalUrl) && targetPagePosition === 0) {\n                // We got to the activation stage (where currentUrlTree is set to the navigation's\n                // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).\n                // We still need to reset the router state back to what it was when the navigation started.\n                this.resetState(t);\n                // TODO(atscott): resetting the `browserUrlTree` should really be done in `resetState`.\n                // Investigate if this can be done by running TGP.\n                this.browserUrlTree = t.currentUrlTree;\n                this.resetUrlToCurrentUrlTree();\n            }\n            else {\n                // The browser URL and router state was not updated before the navigation cancelled so\n                // there's no restoration needed.\n            }\n        }\n        else if (this.canceledNavigationResolution === 'replace') {\n            // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op\n            // for `deferred` navigations that haven't change the internal state yet because guards\n            // reject. For 'eager' navigations, it seems like we also really should reset the state\n            // because the navigation was cancelled. Investigate if this can be done by running TGP.\n            if (restoringFromCaughtError) {\n                this.resetState(t);\n            }\n            this.resetUrlToCurrentUrlTree();\n        }\n    }\n    resetState(t) {\n        this.routerState = t.currentRouterState;\n        this.currentUrlTree = t.currentUrlTree;\n        this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n    }\n    resetUrlToCurrentUrlTree() {\n        this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n    }\n    cancelNavigationTransition(t, reason) {\n        const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), reason);\n        this.triggerEvent(navCancel);\n        t.resolve(false);\n    }\n    generateNgRouterState(navigationId, routerPageId) {\n        if (this.canceledNavigationResolution === 'computed') {\n            return { navigationId, ɵrouterPageId: routerPageId };\n        }\n        return { navigationId };\n    }\n}\nRouter.ɵfac = function Router_Factory(t) { return new (t || Router)(ɵngcc0.ɵɵinject(ɵngcc0.Type), ɵngcc0.ɵɵinject(UrlSerializer), ɵngcc0.ɵɵinject(ChildrenOutletContexts), ɵngcc0.ɵɵinject(ɵngcc1.Location), ɵngcc0.ɵɵinject(ɵngcc0.Injector), ɵngcc0.ɵɵinject(ɵngcc0.NgModuleFactoryLoader), ɵngcc0.ɵɵinject(ɵngcc0.Compiler), ɵngcc0.ɵɵinject(undefined)); };\nRouter.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: Router, factory: Router.ɵfac });\nRouter.ctorParameters = () => [\n    { type: Type },\n    { type: UrlSerializer },\n    { type: ChildrenOutletContexts },\n    { type: Location },\n    { type: Injector },\n    { type: NgModuleFactoryLoader },\n    { type: Compiler },\n    { type: undefined }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(Router, [{\n        type: Injectable\n    }], function () { return [{ type: ɵngcc0.Type }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: ɵngcc1.Location }, { type: ɵngcc0.Injector }, { type: ɵngcc0.NgModuleFactoryLoader }, { type: ɵngcc0.Compiler }, { type: undefined }]; }, null); })();\nfunction validateCommands(commands) {\n    for (let i = 0; i < commands.length; i++) {\n        const cmd = commands[i];\n        if (cmd == null) {\n            throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n        }\n    }\n}\nfunction isBrowserTriggeredNavigation(source) {\n    return source !== 'imperative';\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segements.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n *   app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n *   looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n *   link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n *  - `'merge'`: Merge the given `queryParams` into the current query params.\n *  - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n *   link to user component\n * </a>\n * ```\n *\n * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n *   link to user component\n * </a>\n * ```\n *\n * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n *   const navigation = router.getCurrentNavigation();\n *   tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass RouterLink {\n    constructor(router, route, tabIndex, renderer, el) {\n        this.router = router;\n        this.route = route;\n        this.commands = [];\n        /** @internal */\n        this.onChanges = new Subject();\n        if (tabIndex == null) {\n            renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n        }\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes\n        // to the RouterLinks it's tracking.\n        this.onChanges.next(this);\n    }\n    /**\n     * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n     *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n     *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n     *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n     * @see {@link Router#createUrlTree Router#createUrlTree}\n     */\n    set routerLink(commands) {\n        if (commands != null) {\n            this.commands = Array.isArray(commands) ? commands : [commands];\n        }\n        else {\n            this.commands = [];\n        }\n    }\n    /** @nodoc */\n    onClick() {\n        const extras = {\n            skipLocationChange: attrBoolValue(this.skipLocationChange),\n            replaceUrl: attrBoolValue(this.replaceUrl),\n            state: this.state,\n        };\n        this.router.navigateByUrl(this.urlTree, extras);\n        return true;\n    }\n    get urlTree() {\n        return this.router.createUrlTree(this.commands, {\n            // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n            // Otherwise, we should use the value provided by the user in the input.\n            relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n            queryParams: this.queryParams,\n            fragment: this.fragment,\n            queryParamsHandling: this.queryParamsHandling,\n            preserveFragment: attrBoolValue(this.preserveFragment),\n        });\n    }\n}\nRouterLink.ɵfac = function RouterLink_Factory(t) { return new (t || RouterLink)(ɵngcc0.ɵɵdirectiveInject(Router), ɵngcc0.ɵɵdirectiveInject(ActivatedRoute), ɵngcc0.ɵɵinjectAttribute('tabindex'), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nRouterLink.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: RouterLink, selectors: [[\"\", \"routerLink\", \"\", 5, \"a\", 5, \"area\"]], hostBindings: function RouterLink_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"click\", function RouterLink_click_HostBindingHandler() { return ctx.onClick(); });\n    } }, inputs: { routerLink: \"routerLink\", queryParams: \"queryParams\", fragment: \"fragment\", queryParamsHandling: \"queryParamsHandling\", preserveFragment: \"preserveFragment\", skipLocationChange: \"skipLocationChange\", replaceUrl: \"replaceUrl\", state: \"state\", relativeTo: \"relativeTo\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature] });\nRouterLink.ctorParameters = () => [\n    { type: Router },\n    { type: ActivatedRoute },\n    { type: String, decorators: [{ type: Attribute, args: ['tabindex',] }] },\n    { type: Renderer2 },\n    { type: ElementRef }\n];\nRouterLink.propDecorators = {\n    queryParams: [{ type: Input }],\n    fragment: [{ type: Input }],\n    queryParamsHandling: [{ type: Input }],\n    preserveFragment: [{ type: Input }],\n    skipLocationChange: [{ type: Input }],\n    replaceUrl: [{ type: Input }],\n    state: [{ type: Input }],\n    relativeTo: [{ type: Input }],\n    routerLink: [{ type: Input }],\n    onClick: [{ type: HostListener, args: ['click',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(RouterLink, [{\n        type: Directive,\n        args: [{ selector: ':not(a):not(area)[routerLink]' }]\n    }], function () { return [{ type: Router }, { type: ActivatedRoute }, { type: String, decorators: [{\n                type: Attribute,\n                args: ['tabindex']\n            }] }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }]; }, { routerLink: [{\n            type: Input\n        }], \n    /** @nodoc */\n    onClick: [{\n            type: HostListener,\n            args: ['click']\n        }], queryParams: [{\n            type: Input\n        }], fragment: [{\n            type: Input\n        }], queryParamsHandling: [{\n            type: Input\n        }], preserveFragment: [{\n            type: Input\n        }], skipLocationChange: [{\n            type: Input\n        }], replaceUrl: [{\n            type: Input\n        }], state: [{\n            type: Input\n        }], relativeTo: [{\n            type: Input\n        }] }); })();\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass RouterLinkWithHref {\n    constructor(router, route, locationStrategy) {\n        this.router = router;\n        this.route = route;\n        this.locationStrategy = locationStrategy;\n        this.commands = [];\n        /** @internal */\n        this.onChanges = new Subject();\n        this.subscription = router.events.subscribe((s) => {\n            if (s instanceof NavigationEnd) {\n                this.updateTargetUrlAndHref();\n            }\n        });\n    }\n    /**\n     * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n     *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n     *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n     *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n     * @see {@link Router#createUrlTree Router#createUrlTree}\n     */\n    set routerLink(commands) {\n        if (commands != null) {\n            this.commands = Array.isArray(commands) ? commands : [commands];\n        }\n        else {\n            this.commands = [];\n        }\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        this.updateTargetUrlAndHref();\n        this.onChanges.next(this);\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        this.subscription.unsubscribe();\n    }\n    /** @nodoc */\n    onClick(button, ctrlKey, shiftKey, altKey, metaKey) {\n        if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n            return true;\n        }\n        if (typeof this.target === 'string' && this.target != '_self') {\n            return true;\n        }\n        const extras = {\n            skipLocationChange: attrBoolValue(this.skipLocationChange),\n            replaceUrl: attrBoolValue(this.replaceUrl),\n            state: this.state\n        };\n        this.router.navigateByUrl(this.urlTree, extras);\n        return false;\n    }\n    updateTargetUrlAndHref() {\n        this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n    }\n    get urlTree() {\n        return this.router.createUrlTree(this.commands, {\n            // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n            // Otherwise, we should use the value provided by the user in the input.\n            relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n            queryParams: this.queryParams,\n            fragment: this.fragment,\n            queryParamsHandling: this.queryParamsHandling,\n            preserveFragment: attrBoolValue(this.preserveFragment),\n        });\n    }\n}\nRouterLinkWithHref.ɵfac = function RouterLinkWithHref_Factory(t) { return new (t || RouterLinkWithHref)(ɵngcc0.ɵɵdirectiveInject(Router), ɵngcc0.ɵɵdirectiveInject(ActivatedRoute), ɵngcc0.ɵɵdirectiveInject(ɵngcc1.LocationStrategy)); };\nRouterLinkWithHref.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: RouterLinkWithHref, selectors: [[\"a\", \"routerLink\", \"\"], [\"area\", \"routerLink\", \"\"]], hostVars: 2, hostBindings: function RouterLinkWithHref_HostBindings(rf, ctx) { if (rf & 1) {\n        ɵngcc0.ɵɵlistener(\"click\", function RouterLinkWithHref_click_HostBindingHandler($event) { return ctx.onClick($event.button, $event.ctrlKey, $event.shiftKey, $event.altKey, $event.metaKey); });\n    } if (rf & 2) {\n        ɵngcc0.ɵɵhostProperty(\"href\", ctx.href, ɵngcc0.ɵɵsanitizeUrl);\n        ɵngcc0.ɵɵattribute(\"target\", ctx.target);\n    } }, inputs: { routerLink: \"routerLink\", target: \"target\", queryParams: \"queryParams\", fragment: \"fragment\", queryParamsHandling: \"queryParamsHandling\", preserveFragment: \"preserveFragment\", skipLocationChange: \"skipLocationChange\", replaceUrl: \"replaceUrl\", state: \"state\", relativeTo: \"relativeTo\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature] });\nRouterLinkWithHref.ctorParameters = () => [\n    { type: Router },\n    { type: ActivatedRoute },\n    { type: LocationStrategy }\n];\nRouterLinkWithHref.propDecorators = {\n    target: [{ type: HostBinding, args: ['attr.target',] }, { type: Input }],\n    queryParams: [{ type: Input }],\n    fragment: [{ type: Input }],\n    queryParamsHandling: [{ type: Input }],\n    preserveFragment: [{ type: Input }],\n    skipLocationChange: [{ type: Input }],\n    replaceUrl: [{ type: Input }],\n    state: [{ type: Input }],\n    relativeTo: [{ type: Input }],\n    href: [{ type: HostBinding }],\n    routerLink: [{ type: Input }],\n    onClick: [{ type: HostListener, args: ['click',\n                ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey'],] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(RouterLinkWithHref, [{\n        type: Directive,\n        args: [{ selector: 'a[routerLink],area[routerLink]' }]\n    }], function () { return [{ type: Router }, { type: ActivatedRoute }, { type: ɵngcc1.LocationStrategy }]; }, { routerLink: [{\n            type: Input\n        }], \n    /** @nodoc */\n    onClick: [{\n            type: HostListener,\n            args: ['click',\n                ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey']]\n        }], href: [{\n            type: HostBinding\n        }], target: [{\n            type: HostBinding,\n            args: ['attr.target']\n        }, {\n            type: Input\n        }], queryParams: [{\n            type: Input\n        }], fragment: [{\n            type: Input\n        }], queryParamsHandling: [{\n            type: Input\n        }], preserveFragment: [{\n            type: Input\n        }], skipLocationChange: [{\n            type: Input\n        }], replaceUrl: [{\n            type: Input\n        }], state: [{\n            type: Input\n        }], relativeTo: [{\n            type: Input\n        }] }); })();\nfunction attrBoolValue(s) {\n    return s === '' || !!s;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>`  parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n *   <a routerLink=\"/user/jim\">Jim</a>\n *   <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass RouterLinkActive {\n    constructor(router, element, renderer, cdr, link, linkWithHref) {\n        this.router = router;\n        this.element = element;\n        this.renderer = renderer;\n        this.cdr = cdr;\n        this.link = link;\n        this.linkWithHref = linkWithHref;\n        this.classes = [];\n        this.isActive = false;\n        /**\n         * Options to configure how to determine if the router link is active.\n         *\n         * These options are passed to the `Router.isActive()` function.\n         *\n         * @see Router.isActive\n         */\n        this.routerLinkActiveOptions = { exact: false };\n        this.routerEventsSubscription = router.events.subscribe((s) => {\n            if (s instanceof NavigationEnd) {\n                this.update();\n            }\n        });\n    }\n    /** @nodoc */\n    ngAfterContentInit() {\n        // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n        of(this.links.changes, this.linksWithHrefs.changes, of(null)).pipe(mergeAll()).subscribe(_ => {\n            this.update();\n            this.subscribeToEachLinkOnChanges();\n        });\n    }\n    subscribeToEachLinkOnChanges() {\n        var _a;\n        (_a = this.linkInputChangesSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();\n        const allLinkChanges = [...this.links.toArray(), ...this.linksWithHrefs.toArray(), this.link, this.linkWithHref]\n            .filter((link) => !!link)\n            .map(link => link.onChanges);\n        this.linkInputChangesSubscription = from(allLinkChanges).pipe(mergeAll()).subscribe(link => {\n            if (this.isActive !== this.isLinkActive(this.router)(link)) {\n                this.update();\n            }\n        });\n    }\n    set routerLinkActive(data) {\n        const classes = Array.isArray(data) ? data : data.split(' ');\n        this.classes = classes.filter(c => !!c);\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        this.update();\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        var _a;\n        this.routerEventsSubscription.unsubscribe();\n        (_a = this.linkInputChangesSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();\n    }\n    update() {\n        if (!this.links || !this.linksWithHrefs || !this.router.navigated)\n            return;\n        Promise.resolve().then(() => {\n            const hasActiveLinks = this.hasActiveLinks();\n            if (this.isActive !== hasActiveLinks) {\n                this.isActive = hasActiveLinks;\n                this.cdr.markForCheck();\n                this.classes.forEach((c) => {\n                    if (hasActiveLinks) {\n                        this.renderer.addClass(this.element.nativeElement, c);\n                    }\n                    else {\n                        this.renderer.removeClass(this.element.nativeElement, c);\n                    }\n                });\n            }\n        });\n    }\n    isLinkActive(router) {\n        const options = isActiveMatchOptions(this.routerLinkActiveOptions) ?\n            this.routerLinkActiveOptions :\n            // While the types should disallow `undefined` here, it's possible without strict inputs\n            (this.routerLinkActiveOptions.exact || false);\n        return (link) => router.isActive(link.urlTree, options);\n    }\n    hasActiveLinks() {\n        const isActiveCheckFn = this.isLinkActive(this.router);\n        return this.link && isActiveCheckFn(this.link) ||\n            this.linkWithHref && isActiveCheckFn(this.linkWithHref) ||\n            this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);\n    }\n}\nRouterLinkActive.ɵfac = function RouterLinkActive_Factory(t) { return new (t || RouterLinkActive)(ɵngcc0.ɵɵdirectiveInject(Router), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(RouterLink, 8), ɵngcc0.ɵɵdirectiveInject(RouterLinkWithHref, 8)); };\nRouterLinkActive.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: RouterLinkActive, selectors: [[\"\", \"routerLinkActive\", \"\"]], contentQueries: function RouterLinkActive_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n        ɵngcc0.ɵɵcontentQuery(dirIndex, RouterLink, 5);\n        ɵngcc0.ɵɵcontentQuery(dirIndex, RouterLinkWithHref, 5);\n    } if (rf & 2) {\n        let _t;\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.links = _t);\n        ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.linksWithHrefs = _t);\n    } }, inputs: { routerLinkActiveOptions: \"routerLinkActiveOptions\", routerLinkActive: \"routerLinkActive\" }, exportAs: [\"routerLinkActive\"], features: [ɵngcc0.ɵɵNgOnChangesFeature] });\nRouterLinkActive.ctorParameters = () => [\n    { type: Router },\n    { type: ElementRef },\n    { type: Renderer2 },\n    { type: ChangeDetectorRef },\n    { type: RouterLink, decorators: [{ type: Optional }] },\n    { type: RouterLinkWithHref, decorators: [{ type: Optional }] }\n];\nRouterLinkActive.propDecorators = {\n    links: [{ type: ContentChildren, args: [RouterLink, { descendants: true },] }],\n    linksWithHrefs: [{ type: ContentChildren, args: [RouterLinkWithHref, { descendants: true },] }],\n    routerLinkActiveOptions: [{ type: Input }],\n    routerLinkActive: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(RouterLinkActive, [{\n        type: Directive,\n        args: [{\n                selector: '[routerLinkActive]',\n                exportAs: 'routerLinkActive'\n            }]\n    }], function () { return [{ type: Router }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ChangeDetectorRef }, { type: RouterLink, decorators: [{\n                type: Optional\n            }] }, { type: RouterLinkWithHref, decorators: [{\n                type: Optional\n            }] }]; }, { routerLinkActiveOptions: [{\n            type: Input\n        }], routerLinkActive: [{\n            type: Input\n        }], links: [{\n            type: ContentChildren,\n            args: [RouterLink, { descendants: true }]\n        }], linksWithHrefs: [{\n            type: ContentChildren,\n            args: [RouterLinkWithHref, { descendants: true }]\n        }] }); })();\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(options) {\n    return !!options.paths;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * and a deactivate event when a component is destroyed.\n *\n * ```\n * <router-outlet\n *   (activate)='onActivate($event)'\n *   (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n *\n * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets \"Example of a named\n * outlet and secondary route configuration\").\n * @see `RouterLink`\n * @see `Route`\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass RouterOutlet {\n    constructor(parentContexts, location, resolver, name, changeDetector) {\n        this.parentContexts = parentContexts;\n        this.location = location;\n        this.resolver = resolver;\n        this.changeDetector = changeDetector;\n        this.activated = null;\n        this._activatedRoute = null;\n        this.activateEvents = new EventEmitter();\n        this.deactivateEvents = new EventEmitter();\n        this.name = name || PRIMARY_OUTLET;\n        parentContexts.onChildOutletCreated(this.name, this);\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        this.parentContexts.onChildOutletDestroyed(this.name);\n    }\n    /** @nodoc */\n    ngOnInit() {\n        if (!this.activated) {\n            // If the outlet was not instantiated at the time the route got activated we need to populate\n            // the outlet when it is initialized (ie inside a NgIf)\n            const context = this.parentContexts.getContext(this.name);\n            if (context && context.route) {\n                if (context.attachRef) {\n                    // `attachRef` is populated when there is an existing component to mount\n                    this.attach(context.attachRef, context.route);\n                }\n                else {\n                    // otherwise the component defined in the configuration is created\n                    this.activateWith(context.route, context.resolver || null);\n                }\n            }\n        }\n    }\n    get isActivated() {\n        return !!this.activated;\n    }\n    /**\n     * @returns The currently activated component instance.\n     * @throws An error if the outlet is not activated.\n     */\n    get component() {\n        if (!this.activated)\n            throw new Error('Outlet is not activated');\n        return this.activated.instance;\n    }\n    get activatedRoute() {\n        if (!this.activated)\n            throw new Error('Outlet is not activated');\n        return this._activatedRoute;\n    }\n    get activatedRouteData() {\n        if (this._activatedRoute) {\n            return this._activatedRoute.snapshot.data;\n        }\n        return {};\n    }\n    /**\n     * Called when the `RouteReuseStrategy` instructs to detach the subtree\n     */\n    detach() {\n        if (!this.activated)\n            throw new Error('Outlet is not activated');\n        this.location.detach();\n        const cmp = this.activated;\n        this.activated = null;\n        this._activatedRoute = null;\n        return cmp;\n    }\n    /**\n     * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n     */\n    attach(ref, activatedRoute) {\n        this.activated = ref;\n        this._activatedRoute = activatedRoute;\n        this.location.insert(ref.hostView);\n    }\n    deactivate() {\n        if (this.activated) {\n            const c = this.component;\n            this.activated.destroy();\n            this.activated = null;\n            this._activatedRoute = null;\n            this.deactivateEvents.emit(c);\n        }\n    }\n    activateWith(activatedRoute, resolver) {\n        if (this.isActivated) {\n            throw new Error('Cannot activate an already activated outlet');\n        }\n        this._activatedRoute = activatedRoute;\n        const snapshot = activatedRoute._futureSnapshot;\n        const component = snapshot.routeConfig.component;\n        resolver = resolver || this.resolver;\n        const factory = resolver.resolveComponentFactory(component);\n        const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n        const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n        this.activated = this.location.createComponent(factory, this.location.length, injector);\n        // Calling `markForCheck` to make sure we will run the change detection when the\n        // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n        this.changeDetector.markForCheck();\n        this.activateEvents.emit(this.activated.instance);\n    }\n}\nRouterOutlet.ɵfac = function RouterOutlet_Factory(t) { return new (t || RouterOutlet)(ɵngcc0.ɵɵdirectiveInject(ChildrenOutletContexts), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ComponentFactoryResolver), ɵngcc0.ɵɵinjectAttribute('name'), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef)); };\nRouterOutlet.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: RouterOutlet, selectors: [[\"router-outlet\"]], outputs: { activateEvents: \"activate\", deactivateEvents: \"deactivate\" }, exportAs: [\"outlet\"] });\nRouterOutlet.ctorParameters = () => [\n    { type: ChildrenOutletContexts },\n    { type: ViewContainerRef },\n    { type: ComponentFactoryResolver },\n    { type: String, decorators: [{ type: Attribute, args: ['name',] }] },\n    { type: ChangeDetectorRef }\n];\nRouterOutlet.propDecorators = {\n    activateEvents: [{ type: Output, args: ['activate',] }],\n    deactivateEvents: [{ type: Output, args: ['deactivate',] }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(RouterOutlet, [{\n        type: Directive,\n        args: [{ selector: 'router-outlet', exportAs: 'outlet' }]\n    }], function () { return [{ type: ChildrenOutletContexts }, { type: ɵngcc0.ViewContainerRef }, { type: ɵngcc0.ComponentFactoryResolver }, { type: String, decorators: [{\n                type: Attribute,\n                args: ['name']\n            }] }, { type: ɵngcc0.ChangeDetectorRef }]; }, { activateEvents: [{\n            type: Output,\n            args: ['activate']\n        }], deactivateEvents: [{\n            type: Output,\n            args: ['deactivate']\n        }] }); })();\nclass OutletInjector {\n    constructor(route, childContexts, parent) {\n        this.route = route;\n        this.childContexts = childContexts;\n        this.parent = parent;\n    }\n    get(token, notFoundValue) {\n        if (token === ActivatedRoute) {\n            return this.route;\n        }\n        if (token === ChildrenOutletContexts) {\n            return this.childContexts;\n        }\n        return this.parent.get(token, notFoundValue);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nclass PreloadingStrategy {\n}\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nclass PreloadAllModules {\n    preload(route, fn) {\n        return fn().pipe(catchError(() => of(null)));\n    }\n}\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nclass NoPreloading {\n    preload(route, fn) {\n        return of(null);\n    }\n}\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\nclass RouterPreloader {\n    constructor(router, moduleLoader, compiler, injector, preloadingStrategy) {\n        this.router = router;\n        this.injector = injector;\n        this.preloadingStrategy = preloadingStrategy;\n        const onStartLoad = (r) => router.triggerEvent(new RouteConfigLoadStart(r));\n        const onEndLoad = (r) => router.triggerEvent(new RouteConfigLoadEnd(r));\n        this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n    }\n    setUpPreloading() {\n        this.subscription =\n            this.router.events\n                .pipe(filter((e) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n                .subscribe(() => { });\n    }\n    preload() {\n        const ngModule = this.injector.get(NgModuleRef);\n        return this.processRoutes(ngModule, this.router.config);\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        if (this.subscription) {\n            this.subscription.unsubscribe();\n        }\n    }\n    processRoutes(ngModule, routes) {\n        const res = [];\n        for (const route of routes) {\n            // we already have the config loaded, just recurse\n            if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n                const childConfig = route._loadedConfig;\n                res.push(this.processRoutes(childConfig.module, childConfig.routes));\n                // no config loaded, fetch the config\n            }\n            else if (route.loadChildren && !route.canLoad) {\n                res.push(this.preloadConfig(ngModule, route));\n                // recurse into children\n            }\n            else if (route.children) {\n                res.push(this.processRoutes(ngModule, route.children));\n            }\n        }\n        return from(res).pipe(mergeAll(), map((_) => void 0));\n    }\n    preloadConfig(ngModule, route) {\n        return this.preloadingStrategy.preload(route, () => {\n            const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                this.loader.load(ngModule.injector, route);\n            return loaded$.pipe(mergeMap((config) => {\n                route._loadedConfig = config;\n                return this.processRoutes(config.module, config.routes);\n            }));\n        });\n    }\n}\nRouterPreloader.ɵfac = function RouterPreloader_Factory(t) { return new (t || RouterPreloader)(ɵngcc0.ɵɵinject(Router), ɵngcc0.ɵɵinject(ɵngcc0.NgModuleFactoryLoader), ɵngcc0.ɵɵinject(ɵngcc0.Compiler), ɵngcc0.ɵɵinject(ɵngcc0.Injector), ɵngcc0.ɵɵinject(PreloadingStrategy)); };\nRouterPreloader.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: RouterPreloader, factory: RouterPreloader.ɵfac });\nRouterPreloader.ctorParameters = () => [\n    { type: Router },\n    { type: NgModuleFactoryLoader },\n    { type: Compiler },\n    { type: Injector },\n    { type: PreloadingStrategy }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(RouterPreloader, [{\n        type: Injectable\n    }], function () { return [{ type: Router }, { type: ɵngcc0.NgModuleFactoryLoader }, { type: ɵngcc0.Compiler }, { type: ɵngcc0.Injector }, { type: PreloadingStrategy }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass RouterScroller {\n    constructor(router, \n    /** @docsNotRequired */ viewportScroller, options = {}) {\n        this.router = router;\n        this.viewportScroller = viewportScroller;\n        this.options = options;\n        this.lastId = 0;\n        this.lastSource = 'imperative';\n        this.restoredId = 0;\n        this.store = {};\n        // Default both options to 'disabled'\n        options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n        options.anchorScrolling = options.anchorScrolling || 'disabled';\n    }\n    init() {\n        // we want to disable the automatic scrolling because having two places\n        // responsible for scrolling results race conditions, especially given\n        // that browser don't implement this behavior consistently\n        if (this.options.scrollPositionRestoration !== 'disabled') {\n            this.viewportScroller.setHistoryScrollRestoration('manual');\n        }\n        this.routerEventsSubscription = this.createScrollEvents();\n        this.scrollEventsSubscription = this.consumeScrollEvents();\n    }\n    createScrollEvents() {\n        return this.router.events.subscribe(e => {\n            if (e instanceof NavigationStart) {\n                // store the scroll position of the current stable navigations.\n                this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n                this.lastSource = e.navigationTrigger;\n                this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n            }\n            else if (e instanceof NavigationEnd) {\n                this.lastId = e.id;\n                this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n            }\n        });\n    }\n    consumeScrollEvents() {\n        return this.router.events.subscribe(e => {\n            if (!(e instanceof Scroll))\n                return;\n            // a popstate event. The pop state event will always ignore anchor scrolling.\n            if (e.position) {\n                if (this.options.scrollPositionRestoration === 'top') {\n                    this.viewportScroller.scrollToPosition([0, 0]);\n                }\n                else if (this.options.scrollPositionRestoration === 'enabled') {\n                    this.viewportScroller.scrollToPosition(e.position);\n                }\n                // imperative navigation \"forward\"\n            }\n            else {\n                if (e.anchor && this.options.anchorScrolling === 'enabled') {\n                    this.viewportScroller.scrollToAnchor(e.anchor);\n                }\n                else if (this.options.scrollPositionRestoration !== 'disabled') {\n                    this.viewportScroller.scrollToPosition([0, 0]);\n                }\n            }\n        });\n    }\n    scheduleScrollEvent(routerEvent, anchor) {\n        this.router.triggerEvent(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        if (this.routerEventsSubscription) {\n            this.routerEventsSubscription.unsubscribe();\n        }\n        if (this.scrollEventsSubscription) {\n            this.scrollEventsSubscription.unsubscribe();\n        }\n    }\n}\nRouterScroller.ɵfac = function RouterScroller_Factory(t) { return new (t || RouterScroller)(ɵngcc0.ɵɵinject(Router), ɵngcc0.ɵɵinject(ɵngcc1.ViewportScroller), ɵngcc0.ɵɵinject(undefined)); };\nRouterScroller.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: RouterScroller, factory: RouterScroller.ɵfac });\nRouterScroller.ctorParameters = () => [\n    { type: Router },\n    { type: ViewportScroller },\n    { type: undefined }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(RouterScroller, [{\n        type: Injectable\n    }], function () { return [{ type: Router }, { type: ɵngcc1.ViewportScroller }, { type: undefined }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent];\n/**\n * A [DI token](guide/glossary/#di-token) for the router service.\n *\n * @publicApi\n */\nconst ROUTER_CONFIGURATION = new InjectionToken('ROUTER_CONFIGURATION');\n/**\n * @docsNotRequired\n */\nconst ROUTER_FORROOT_GUARD = new InjectionToken('ROUTER_FORROOT_GUARD');\nconst ɵ0 = { enableTracing: false };\nconst ROUTER_PROVIDERS = [\n    Location,\n    { provide: UrlSerializer, useClass: DefaultUrlSerializer },\n    {\n        provide: Router,\n        useFactory: setupRouter,\n        deps: [\n            UrlSerializer, ChildrenOutletContexts, Location, Injector, NgModuleFactoryLoader, Compiler,\n            ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],\n            [RouteReuseStrategy, new Optional()]\n        ]\n    },\n    ChildrenOutletContexts,\n    { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },\n    { provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader },\n    RouterPreloader,\n    NoPreloading,\n    PreloadAllModules,\n    { provide: ROUTER_CONFIGURATION, useValue: ɵ0 },\n];\nfunction routerNgProbeToken() {\n    return new NgProbeToken('Router', Router);\n}\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/router) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\nclass RouterModule {\n    // Note: We are injecting the Router so it gets created eagerly...\n    constructor(guard, router) { }\n    /**\n     * Creates and configures a module with all the router providers and directives.\n     * Optionally sets up an application listener to perform an initial navigation.\n     *\n     * When registering the NgModule at the root, import as follows:\n     *\n     * ```\n     * @NgModule({\n     *   imports: [RouterModule.forRoot(ROUTES)]\n     * })\n     * class MyNgModule {}\n     * ```\n     *\n     * @param routes An array of `Route` objects that define the navigation paths for the application.\n     * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n     * @return The new `NgModule`.\n     *\n     */\n    static forRoot(routes, config) {\n        return {\n            ngModule: RouterModule,\n            providers: [\n                ROUTER_PROVIDERS,\n                provideRoutes(routes),\n                {\n                    provide: ROUTER_FORROOT_GUARD,\n                    useFactory: provideForRootGuard,\n                    deps: [[Router, new Optional(), new SkipSelf()]]\n                },\n                { provide: ROUTER_CONFIGURATION, useValue: config ? config : {} },\n                {\n                    provide: LocationStrategy,\n                    useFactory: provideLocationStrategy,\n                    deps: [PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION]\n                },\n                {\n                    provide: RouterScroller,\n                    useFactory: createRouterScroller,\n                    deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n                },\n                {\n                    provide: PreloadingStrategy,\n                    useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n                        NoPreloading\n                },\n                { provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken },\n                provideRouterInitializer(),\n            ],\n        };\n    }\n    /**\n     * Creates a module with all the router directives and a provider registering routes,\n     * without creating a new Router service.\n     * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n     *\n     * ```\n     * @NgModule({\n     *   imports: [RouterModule.forChild(ROUTES)]\n     * })\n     * class MyNgModule {}\n     * ```\n     *\n     * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n     * @return The new NgModule.\n     *\n     */\n    static forChild(routes) {\n        return { ngModule: RouterModule, providers: [provideRoutes(routes)] };\n    }\n}\nRouterModule.ɵfac = function RouterModule_Factory(t) { return new (t || RouterModule)(ɵngcc0.ɵɵinject(ROUTER_FORROOT_GUARD, 8), ɵngcc0.ɵɵinject(Router, 8)); };\nRouterModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: RouterModule });\nRouterModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({});\nRouterModule.ctorParameters = () => [\n    { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [ROUTER_FORROOT_GUARD,] }] },\n    { type: Router, decorators: [{ type: Optional }] }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(RouterModule, [{\n        type: NgModule,\n        args: [{\n                declarations: ROUTER_DIRECTIVES,\n                exports: ROUTER_DIRECTIVES,\n                entryComponents: [ɵEmptyOutletComponent]\n            }]\n    }], function () { return [{ type: undefined, decorators: [{\n                type: Optional\n            }, {\n                type: Inject,\n                args: [ROUTER_FORROOT_GUARD]\n            }] }, { type: Router, decorators: [{\n                type: Optional\n            }] }]; }, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(RouterModule, { declarations: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent] }); })();\nfunction createRouterScroller(router, viewportScroller, config) {\n    if (config.scrollOffset) {\n        viewportScroller.setOffset(config.scrollOffset);\n    }\n    return new RouterScroller(router, viewportScroller, config);\n}\nfunction provideLocationStrategy(platformLocationStrategy, baseHref, options = {}) {\n    return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n        new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\nfunction provideForRootGuard(router) {\n    if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) {\n        throw new Error(`RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n    }\n    return 'guarded';\n}\n/**\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n *   imports: [RouterModule.forChild(ROUTES)],\n *   providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nfunction provideRoutes(routes) {\n    return [\n        { provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes },\n        { provide: ROUTES, multi: true, useValue: routes },\n    ];\n}\nfunction setupRouter(urlSerializer, contexts, location, injector, loader, compiler, config, opts = {}, urlHandlingStrategy, routeReuseStrategy) {\n    const router = new Router(null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n    if (urlHandlingStrategy) {\n        router.urlHandlingStrategy = urlHandlingStrategy;\n    }\n    if (routeReuseStrategy) {\n        router.routeReuseStrategy = routeReuseStrategy;\n    }\n    assignExtraOptionsToRouter(opts, router);\n    if (opts.enableTracing) {\n        router.events.subscribe((e) => {\n            var _a, _b;\n            // tslint:disable:no-console\n            (_a = console.group) === null || _a === void 0 ? void 0 : _a.call(console, `Router Event: ${e.constructor.name}`);\n            console.log(e.toString());\n            console.log(e);\n            (_b = console.groupEnd) === null || _b === void 0 ? void 0 : _b.call(console);\n            // tslint:enable:no-console\n        });\n    }\n    return router;\n}\nfunction assignExtraOptionsToRouter(opts, router) {\n    if (opts.errorHandler) {\n        router.errorHandler = opts.errorHandler;\n    }\n    if (opts.malformedUriErrorHandler) {\n        router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n    }\n    if (opts.onSameUrlNavigation) {\n        router.onSameUrlNavigation = opts.onSameUrlNavigation;\n    }\n    if (opts.paramsInheritanceStrategy) {\n        router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n    }\n    if (opts.relativeLinkResolution) {\n        router.relativeLinkResolution = opts.relativeLinkResolution;\n    }\n    if (opts.urlUpdateStrategy) {\n        router.urlUpdateStrategy = opts.urlUpdateStrategy;\n    }\n}\nfunction rootRoute(router) {\n    return router.routerState.root;\n}\n/**\n * Router initialization requires two steps:\n *\n * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if\n * a resolver or a guard executes asynchronously.\n *\n * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the\n * `afterPreactivation` hook provided by the router.\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\nclass RouterInitializer {\n    constructor(injector) {\n        this.injector = injector;\n        this.initNavigation = false;\n        this.destroyed = false;\n        this.resultOfPreactivationDone = new Subject();\n    }\n    appInitializer() {\n        const p = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n        return p.then(() => {\n            // If the injector was destroyed, the DI lookups below will fail.\n            if (this.destroyed) {\n                return Promise.resolve(true);\n            }\n            let resolve = null;\n            const res = new Promise(r => resolve = r);\n            const router = this.injector.get(Router);\n            const opts = this.injector.get(ROUTER_CONFIGURATION);\n            if (opts.initialNavigation === 'disabled') {\n                router.setUpLocationChangeListener();\n                resolve(true);\n            }\n            else if (\n            // TODO: enabled is deprecated as of v11, can be removed in v13\n            opts.initialNavigation === 'enabled' || opts.initialNavigation === 'enabledBlocking') {\n                router.hooks.afterPreactivation = () => {\n                    // only the initial navigation should be delayed\n                    if (!this.initNavigation) {\n                        this.initNavigation = true;\n                        resolve(true);\n                        return this.resultOfPreactivationDone;\n                        // subsequent navigations should not be delayed\n                    }\n                    else {\n                        return of(null);\n                    }\n                };\n                router.initialNavigation();\n            }\n            else {\n                resolve(true);\n            }\n            return res;\n        });\n    }\n    bootstrapListener(bootstrappedComponentRef) {\n        const opts = this.injector.get(ROUTER_CONFIGURATION);\n        const preloader = this.injector.get(RouterPreloader);\n        const routerScroller = this.injector.get(RouterScroller);\n        const router = this.injector.get(Router);\n        const ref = this.injector.get(ApplicationRef);\n        if (bootstrappedComponentRef !== ref.components[0]) {\n            return;\n        }\n        // Default case\n        if (opts.initialNavigation === 'enabledNonBlocking' || opts.initialNavigation === undefined) {\n            router.initialNavigation();\n        }\n        preloader.setUpPreloading();\n        routerScroller.init();\n        router.resetRootComponentType(ref.componentTypes[0]);\n        this.resultOfPreactivationDone.next(null);\n        this.resultOfPreactivationDone.complete();\n    }\n    ngOnDestroy() {\n        this.destroyed = true;\n    }\n}\nRouterInitializer.ɵfac = function RouterInitializer_Factory(t) { return new (t || RouterInitializer)(ɵngcc0.ɵɵinject(ɵngcc0.Injector)); };\nRouterInitializer.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: RouterInitializer, factory: RouterInitializer.ɵfac });\nRouterInitializer.ctorParameters = () => [\n    { type: Injector }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(RouterInitializer, [{\n        type: Injectable\n    }], function () { return [{ type: ɵngcc0.Injector }]; }, null); })();\nfunction getAppInitializer(r) {\n    return r.appInitializer.bind(r);\n}\nfunction getBootstrapListener(r) {\n    return r.bootstrapListener.bind(r);\n}\n/**\n * A [DI token](guide/glossary/#di-token) for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nconst ROUTER_INITIALIZER = new InjectionToken('Router Initializer');\nfunction provideRouterInitializer() {\n    return [\n        RouterInitializer,\n        {\n            provide: APP_INITIALIZER,\n            multi: true,\n            useFactory: getAppInitializer,\n            deps: [RouterInitializer]\n        },\n        { provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer] },\n        { provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER },\n    ];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('12.2.5');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, provideRoutes, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a, routerNgProbeToken as ɵangular_packages_router_router_b, createRouterScroller as ɵangular_packages_router_router_c, provideLocationStrategy as ɵangular_packages_router_router_d, provideForRootGuard as ɵangular_packages_router_router_e, setupRouter as ɵangular_packages_router_router_f, rootRoute as ɵangular_packages_router_router_g, RouterInitializer as ɵangular_packages_router_router_h, getAppInitializer as ɵangular_packages_router_router_i, getBootstrapListener as ɵangular_packages_router_router_j, provideRouterInitializer as ɵangular_packages_router_router_k, ɵEmptyOutletComponent as ɵangular_packages_router_router_l, Tree as ɵangular_packages_router_router_m, TreeNode as ɵangular_packages_router_router_n, RouterScroller as ɵangular_packages_router_router_o, assignExtraOptionsToRouter as ɵassignExtraOptionsToRouter, flatten as ɵflatten };\n\n","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\nexport function last(predicate, defaultValue) {\n    const hasDefaultValue = arguments.length >= 2;\n    return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n","export const clients: any = {\r\n  clients: [\r\n    {\r\n      label: 'aelin',\r\n      name: 'Adjie',\r\n      brand: 'Aelin Skincare',\r\n      testimonial: 'Sebelumnya penjualan kami agak kurang signifikan, namun semenjak kami mengunakan service AturToko, penjualan produk kami lebih meningkat.'\r\n    },\r\n    {\r\n      label: 'arra-beauty',\r\n      name: 'Puspa',\r\n      brand: 'ARRA Beauty',\r\n      testimonial: 'AturToko bisa mengelola Shopee Ads kami dengan baik. Selain itu juga memberikan strategi marketing yang membantu performa toko kami di Shopee menjadi lebih baik.'\r\n    },\r\n    {\r\n      label: 'draft-8-leather-goods',\r\n      name: 'Romano',\r\n      brand: 'Draft-8 leather goods',\r\n      testimonial: 'Very good service. Very professional. I recommended them to anyone who want to grow their sales and social media.'\r\n    },\r\n    {\r\n      label: 'kidtink',\r\n      name: 'Putra',\r\n      brand: 'Kidtink',\r\n      testimonial: 'Online menjadi salah satu strategi pengembangan bisnis kami, kami mencari partner yang bisa mengakomodir pengembangan ini. Aturtoko membantu kami dari branding dan selling di divisi online kami. Terima kasih Aturtoko.'\r\n    },\r\n    {\r\n      label: 'sari-cosmetics',\r\n      name: 'Roni Kosasih',\r\n      brand: 'Sari Cosmetics',\r\n      testimonial: 'Dengan munculnya bisnis online terutama di masa pandemi yang berkepanjangan ini, penting bagi toko offline untuk memiliki platform online agar dapat menjangkau orang lebih banyak Dengan AturToko, bisnis kami dapat mencapai hal ini dengan sangat mudah dan tanpa kerumitan.'\r\n    },\r\n    {\r\n      label: 'brother-boots',\r\n      name: 'Bapak Agung Andriono',\r\n      brand: 'Brother Boots',\r\n      testimonial: 'Penjualan kami menjadi meningkat di tangan AturToko. Mengelola bisnis online kami dengan sangat profesional.'\r\n    },\r\n    {\r\n      label: 'cangcomak',\r\n      name: 'Ibu Salmi Sufraeni',\r\n      brand: 'Cangcomak',\r\n      testimonial: 'AturToko membuat usaha online kami menjadi meningkat dan juga selalu memberikan yang terbaik melaui perencaan yang matang. Terimakasih AturToko!'\r\n    },\r\n    {\r\n      label: 'neoair',\r\n      name: 'Kiki',\r\n      brand: 'Neo Air Indonesia',\r\n      testimonial: 'Semenjak pandemi, kami harus adaptasi dari berjualan offline ke online. Kami tidak memiliki kapasitas untuk mengelola seluruh platform marketplace, oleh karena itu kami mempercayakan AturToko.id untuk mengaturnya.'\r\n    },\r\n    \r\n  ]\r\n}\r\n","import { Injectable, Inject } from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\n\r\n@Injectable({\r\n  providedIn: 'root'\r\n})\r\nexport class SeoService {\r\n\r\n  constructor(@Inject(DOCUMENT) private doc: any) { }\r\n\r\n  createLinkForCanonicalURL() {\r\n    let links = this.doc.querySelectorAll('[rel=\"canonical\"]');\r\n    links[0].setAttribute('href', this.doc.URL);\r\n  }\r\n}\r\n","<header>\r\n  <div class=\"container\">\r\n    <div class=\"row pt-5\">\r\n      <div class=\"col-12 col-md-6\" id=\"leftMain\">\r\n        <div class=\"h6\">AturToko percaya bahwa</div>\r\n        <div class=\"h4\">Setiap orang dapat memiliki kesempatannya masing-masing</div>\r\n        <p>Untuk dapat menjangkau lebih mudah, fleksibel, dan efisien untuk memiliki usahanya sendiri.</p>\r\n      </div>\r\n      <div class=\"col-12 col-md-6\" id=\"rightMain\">\r\n        <div id=\"mainImg\">\r\n          <div id=\"bgImg\" class=\"d-none d-sm-block\"></div>\r\n          <img src=\"assets/backgrounds/headline-rev.webp\" alt=\"Kantor AturToko\" width=\"600\" height=\"600\"\r\n            class=\"d-block d-md-none\">\r\n          <img src=\"assets/backgrounds/headline-rev.webp\" alt=\"Kantor AturToko\" width=\"550\" height=\"640\"\r\n            class=\"d-none d-md-block\">\r\n          <div class=\"blur-box\" (click)=\"toTestimonial()\">\r\n            <h6>Apa kata {{rt.name}}, {{rt.brand}}?</h6>\r\n            <p>{{short}}</p>\r\n            <img [src]=\"'/assets/clients/' + rt.label + '.webp'\" [alt]=\"rt.brand\" class=\"icon-box\">\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</header>\r\n\r\n<main>\r\n  <section class=\"section-1\">\r\n    <div class=\"container product\">\r\n      <p>\r\n        Kami membantu kamu untuk berjualan di <em>marketplace</em>\r\n        dengan tiga produk unggulan kami.\r\n      </p>\r\n      <h2>OmniPos, BuatToko, dan AturToko+</h2>\r\n      <div class=\"cards text-center\">\r\n        <div class=\"d-flex flex-column flex-lg-row justify-content-between\" style=\"gap: 30px;\">\r\n          <div class=\"card\">\r\n            <div class=\"card-body d-flex flex-column justify-content-between\">\r\n              <div class=\"card-title\">\r\n                <img src=\"assets/logos/omnipos.svg\" alt=\"Logo OmniPOS\" width=\"200\" height=\"50\">\r\n              </div>\r\n              <p class=\"card-text\" style=\"letter-spacing: -0.5px;\">\r\n                Mengelola bisnis <em>online</em> secara mudah dalam satu <em>dashboard</em>\r\n              </p>\r\n              <div class=\"cobaProduct\">\r\n                <img src=\"assets/products/omnipos-card.webp\" alt=\"Ilustrasi OmniPOS\" width=\"500\" height=\"500\">\r\n              </div>\r\n              <a [routerLink]=\"['/omnipos']\" fragment=\"registrasi\"\r\n                class=\"btn btn-custom1 px-4 py-2 primary-btn my-5 mx-auto\">Coba Gratis</a>\r\n            </div>\r\n          </div>\r\n          <div class=\"card\">\r\n            <div class=\"card-body d-flex flex-column justify-content-between\">\r\n              <div class=\"card-title\">\r\n                <img src=\"assets/logos/buattoko.svg\" alt=\"Logo BuatToko\" width=\"200\" height=\"50\">\r\n              </div>\r\n              <p class=\"card-text\">\r\n                Memperkuat <em>branding</em> secara tepat dengan menggunakan website\r\n              </p>\r\n              <div class=\"cobaProduct\">\r\n                <img src=\"assets/products/buattoko-card.webp\" alt=\"Ilustrasi BuatToko\" width=\"500\" height=\"500\">\r\n              </div>\r\n              <a [routerLink]=\"['/buattoko']\" fragment=\"registrasi\"\r\n                class=\"btn btn-custom2 px-4 py-2 primary-btn my-5 mx-auto\">Coba Gratis</a>\r\n            </div>\r\n          </div>\r\n          <div class=\"card\">\r\n            <div class=\"card-body d-flex flex-column justify-content-between\">\r\n              <div class=\"card-title\">\r\n                <img src=\"assets/logos/atplus.svg\" alt=\"Logo AturToko +\" width=\"200\" height=\"50\">\r\n              </div>\r\n              <p class=\"card-text\">\r\n                Cukup fokus pada produksi kamu. Kami yang memasarkan.\r\n              </p>\r\n              <div class=\"cobaProduct\">\r\n                <img src=\"assets/products/aturtokoplus-card.webp\" alt=\"Ilustrasi AturToko +\" width=\"500\" height=\"500\">\r\n              </div>\r\n              <a [routerLink]=\"['/aturtokoplus']\" fragment=\"registrasi\"\r\n                class=\"btn btn-custom3 px-5 py-2 primary-btn my-5 mx-auto\">Daftar</a>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </div>\r\n\r\n    <div class=\"container\">\r\n      <div class=\"h6\">Kelola bisnismu lebih profesional dengan AturToko</div>\r\n      <div class=\"h2\">Atur Toko Online Jadi Gampang!</div>\r\n      <div class=\"cardInfo\">\r\n        <div class=\"row\">\r\n          <div class=\"col-12 col-md-6\">\r\n            <video controls class=\"w-100\" preload=\"metadata\" poster=\"assets/products/cover.webp\" autopictureinpicture>\r\n              <source src=\"aturtoko.mp4\" type=\"video/mp4\">\r\n              Sorry, your browser doesn't support embedded videos.\r\n            </video>\r\n          </div>\r\n          <div class=\"col-12 col-md-6 d-flex\">\r\n            <p class=\"align-self-center\">AturToko akan membantu mengembangkan bisnis Kamu mulai dari digital marketing,\r\n              budgeting iklan hingga meningkatkan kinerja sosial media kamu.</p>\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </div>\r\n  </section>\r\n\r\n  <section class=\"section-2\" id=\"testimonial\">\r\n    <div class=\"container\">\r\n      <h2 class=\"title\">Apa Kata Rekan AturToko?</h2>\r\n      <div class=\"row\">\r\n        <div class=\"col-12\">\r\n          <ngb-carousel *ngIf=\"testimonials\">\r\n            <ng-template ngbSlide *ngFor=\"let t of testimonials\" class=\"carousel-item\">\r\n              <div class=\"row mb-3\">\r\n                <div class=\"col-12 col-md-2 client-logo\">\r\n                  <img [src]=\"'assets/clients/' + t.label + '.webp'\" [alt]=\"t.brand\" class=\"client-logo\">\r\n                </div>\r\n                <div class=\"col-12 col-md-10 client-name\">\r\n                  <span>{{t.name}}, {{t.brand}}</span>\r\n                </div>\r\n              </div>\r\n              <div class=\"row\">\r\n                <div class=\"col-12\">\r\n                  <p class=\"client-testimonial\">\r\n                    {{t.testimonial}}\r\n                  </p>\r\n                </div>\r\n              </div>\r\n            </ng-template>\r\n          </ngb-carousel>\r\n        </div>\r\n      </div>\r\n    </div>\r\n  </section>\r\n\r\n  <section class=\"section-4\">\r\n    <div class=\"liputan\">\r\n      <div class=\"container\">\r\n        <h2>Liputan AturToko</h2>\r\n        <ngx-slick-carousel class=\"partner-carousel\" #slickModal=\"slick-carousel\" [config]=\"slideConfig\"\r\n          (init)=\"slickInit($event)\" (breakpoint)=\"breakpoint($event)\" (afterChange)=\"afterChange($event)\"\r\n          (beforeChange)=\"beforeChange($event)\">\r\n          <div ngxSlickItem *ngFor=\"let l of liputan\" class=\"slide\">\r\n            <a [href]=\"l.url\" target=\"_blank\" rel=\"noopener noreferrer nofollow\"><img [src]=\"l.img\" [alt]=\"l.url\"\r\n                width=\"12.5rem\" height=\"12.5rem\" class=\"slick-img\"></a>\r\n          </div>\r\n        </ngx-slick-carousel>\r\n      </div>\r\n    </div>\r\n  </section>\r\n\r\n  <section class=\"section-3\">\r\n    <div class=\"partner\">\r\n      <div class=\"container\">\r\n        <h2>Partner Kami</h2>\r\n        <ngx-slick-carousel class=\"partner-carousel\" #slickModal=\"slick-carousel\" [config]=\"slideConfig\"\r\n          (init)=\"slickInit($event)\" (breakpoint)=\"breakpoint($event)\" (afterChange)=\"afterChange($event)\"\r\n          (beforeChange)=\"beforeChange($event)\">\r\n          <div ngxSlickItem *ngFor=\"let slide of slides\" class=\"slide\">\r\n            <img [src]=\"slide.img\" [alt]=\"slide.label\" class=\"slick-img\" width=\"12.5rem\" height=\"4.6875rem\">\r\n          </div>\r\n        </ngx-slick-carousel>\r\n      </div>\r\n    </div>\r\n  </section>\r\n</main>\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { SeoService } from '../seo.service';\r\nimport { clients } from './clients';\r\nimport { Router } from '@angular/router';\r\n\r\n@Component({\r\n  selector: 'app-dashboard',\r\n  templateUrl: './dashboard.component.html',\r\n  styleUrls: ['./dashboard.component.css']\r\n})\r\nexport class DashboardComponent implements OnInit {\r\n\r\n  testimonials: any;\r\n\r\n  rt: any;\r\n  short: any;\r\n\r\n  slides = [\r\n    { img: 'assets/partners/tokopedia.webp', label: 'Tokopedia' },\r\n    { img: 'assets/partners/shopee.webp', label: 'Shopee' },\r\n    { img: 'assets/partners/blibli.webp', label: 'Blibli' },\r\n    { img: 'assets/partners/lazada.webp', label: 'Lazada' },\r\n    { img: 'assets/partners/woocommerce.webp', label: 'WooCommerce' },\r\n    { img: 'assets/partners/midtrans.webp', label: 'Midtrans' },\r\n    { img: 'assets/partners/biteship.webp', label: 'Biteship' },\r\n  ];\r\n\r\n  liputan = [\r\n    { img: 'assets/coverage/1.webp', url: 'https://www.beritasatu.com/whisnu-bagus-prasetyo/ekonomi/707429/startup4industry-pacu-perusahaan-rintisan-hadirkan-solusi-teknologi-pada-ikm' },\r\n    { img: 'assets/coverage/2.webp', url: 'https://www.antaranews.com/berita/1883580/menperin-harap-program-startup4industry-hasilkan-solusi-teknologi-baru' },\r\n    { img: 'assets/coverage/3.webp', url: 'https://foto.bisnis.com/view/20201208/1328261/penyerahan-penghargaan-kepada-lima-startup-terbaik-dalam-ajang-startup4industry' },\r\n    { img: 'assets/coverage/4.webp', url: 'https://portalbandungtimur.pikiran-rakyat.com/ekonomi/pr-941077836/startup4industry-2020-ciptakan-ekosistem-solusi-teknologi-kala-pandemi' },\r\n    { img: 'assets/coverage/5.webp', url: 'https://finance.detik.com/foto-bisnis/d-5287369/kemenperin-gelar-kompetisi-startup4industry-2020' },\r\n    { img: 'assets/coverage/6.webp', url: 'https://www.liputan6.com/on-off/read/4429745/foto-dorong-teknologi-dalam-negeri-kemenperin-beri-penghargaan-5-startup-terbaik' },\r\n    { img: 'assets/coverage/7.webp', url: 'https://economy.okezone.com/read/2020/12/08/320/2323977/ri-butuh-teknologi-lokal-tunjang-ekonomi-digital' },\r\n    { img: 'assets/coverage/8.webp', url: 'https://ekbis.sindonews.com/read/261996/34/startup4industry-ciptakan-ekosistem-solusi-teknologi-kala-pandemi-1607490732' },\r\n    { img: 'assets/coverage/9.webp', url: 'https://pressrelease.kontan.co.id/release/startup4industry-2020-ciptakan-ekosistem-solusi-teknologi-kala-pandemi?page=all' },\r\n    { img: 'assets/coverage/10.webp', url: 'https://swa.co.id/swa/trends/economic-issues/ciptakan-ekosistem-teknologi-melalui-startup4industry' },\r\n    { img: 'assets/coverage/11.webp', url: 'https://www.industry.co.id/read/77856/gelar-startup4industry-kemenperin-ajak-startup-berikan-layanan-teknologi-bagi-ikm' },\r\n    { img: 'assets/coverage/12.webp', url: 'https://balinesia.id/read/lima-start-up-sabet-penghargaan-startup-4-industry' },\r\n    { img: 'assets/coverage/13.webp', url: 'https://hallomedan.co/read/kemenperin-pilih-lima-start-up-inovasi-terbaik-dalam-negeri' },\r\n    { img: 'assets/coverage/14.webp', url: 'https://halojatim.com/read/inilah-lima-start-up-terbaik-indonesia-versi-startup-4-industry' },\r\n    { img: 'assets/coverage/15.webp', url: 'https://jogjaaja.com/read/lima-start-up-terbaik-kompetisi-startup-4-industry-raih-rp-20-juta' },\r\n    { img: 'assets/coverage/16.webp', url: 'https://jabarjuara.co/read/kemenperin-pilih-lima-start-up-inovasi-terbaik-dalam-negeri' },\r\n    { img: 'assets/coverage/17.webp', url: 'https://www.harianbrebes.com/2021/06/08/audensi-dengan-wakil-bupati-brebes-pt-atur-toko-gandeng-pelaku-umkm/' },\r\n    { img: 'assets/coverage/18.webp', url: 'https://tatiye.id/konsep-aturtoko-solusi-umkm-go-digital-di-kabgor/' },\r\n  ]\r\n  slideConfig = {\r\n    'autoplay': true,\r\n    'slidesToShow': 3,\r\n    'slidesToScroll': 1,\r\n    'dots': true,\r\n    'centerPadding': '50px',\r\n    'centerMode': true,\r\n    'variableWidth': true,\r\n    'focusOnSelect': true,\r\n    'responsive': [\r\n      {\r\n        'breakpoint': 576,\r\n        'settings': {\r\n          'arrows': false,\r\n          'dots': false,\r\n          'swipe': true,\r\n          'lazyLoad': 'ondemand',\r\n          'autoplaySpeed': 1500,\r\n          'centerMode': true,\r\n          'centerPadding': '40px',\r\n          'slidesToShow': 1\r\n        }\r\n      }\r\n    ]\r\n  };\r\n\r\n  campaign: any;\r\n\r\n  constructor(\r\n    private seo: SeoService,\r\n    private router: Router\r\n  ) { }\r\n\r\n  ngOnInit(): void {\r\n    this.seo.createLinkForCanonicalURL();\r\n    this.testimonials = clients.clients;\r\n    this.rt = this.testimonials[Math.floor(Math.random() * this.testimonials.length)];\r\n    this.short = this.truncate(this.rt.testimonial, 50, true);\r\n  }\r\n\r\n  truncate( str: string, n: number, useWordBoundary: boolean ){\r\n    if (str.length <= n) { return str; }\r\n    const subString = str.substr(0, n-1);\r\n    return (useWordBoundary \r\n      ? subString.substr(0, subString.lastIndexOf(\" \")) \r\n      : subString) + '...';\r\n  };\r\n\r\n  slickInit(e: any) {\r\n  }\r\n\r\n  breakpoint(e: any) {\r\n  }\r\n\r\n  afterChange(e: any) {\r\n  }\r\n\r\n  beforeChange(e: any) {\r\n  }\r\n\r\n  toTestimonial() {\r\n    this.router.navigate(['/dashboard'], { fragment: 'testimonial' })\r\n  }\r\n\r\n}\r\n","export const tnc: any = {\r\n  data: `<div class=\"container\">\r\n  <h1 class=\"text-center\">KETENTUAN PENGGUNAAN</h1>\r\n\r\n  <p class=\"text-justify\">PT. Atur Toko Solusi Indonesia (\"Kami\"), memiliki dan mengoperasikan AturToko. AturToko\r\n    memberikan Anda rangkaian\r\n    lengkap solusi manajemen ritel untuk meningkatkan penjualan dan efisiensi kerja untuk bisnis online dan offline\r\n    Anda\r\n    (\"Layanan \") yang dapat Anda akses melalui situs web Kami di <a\r\n      href=\"https://aturtoko.id/\">https://aturtoko.id/</a>\r\n    (\"Situs Web\"). Halaman ini menetapkan Layanan dan syarat pengguna Situs Web Kami (\"Ketentuan\"). Ketentuan dalam\r\n    halaman\r\n    ini penting karena menjelaskan aturan yang harus diikuti saat menggunakan Layanan dan Situs Web; dan syarat dan\r\n    ketentuan\r\n    yang berlaku untuk setiap langganan yang Anda lakukan di Layanan dan Situs Web Kami.</p>\r\n\r\n  <h2 class=\"text-center pt-5\">HARAP BACA KETENTUAN INI DENGAN SEKSAMA SEBELUM MENGGUNAKAN LAYANAN ATAU SITUS WEB\r\n    KAMI.\r\n  </h2>\r\n\r\n  <p class=\"text-justify\">Saat Kami menggunakan \"Anda\" atau \"milik Anda\" dalam Ketentuan ini, Kami merujuk pada siapa\r\n    pun\r\n    yang mengakses atau\r\n    menggunakan Layanan dan Situs Web Kami. Dengan mengakses atau menggunakan Layanan dan Situs Web Kami serta fitur\r\n    apa\r\n    pun (termasuk OmniPos, BuatToko, dan AturToko+) dan konten (termasuk Harga dan FAQ) yang tersedia melalui Situs\r\n    Web,\r\n    Anda menyatakan bahwa Anda telah membaca Ketentuan ini dan menunjukkan persetujuan Anda untuk terikat oleh\r\n    Ketentuan\r\n    ini dan dokumen yang dirujuk di dalamnya. Jika terjadi konflik atau ketidaksesuaian antara Ketentuan dan Harga\r\n    atau\r\n    FAQ, Ketentuan ini yang akan berlaku. </p>\r\n\r\n  <p class=\"text-center\">Jika Anda tidak menyetujui bagian mana pun dari Ketentuan ini, Anda harus segera<br> berhenti\r\n    menggunakan Layanan dan Situs Web.\r\n  </p>\r\n\r\n  <p class=\"text-center\">\r\n    Jika Anda memiliki pertanyaan, komentar, keluhan, atau klaim sehubungan dengan<br> Layanan dan Situs Web Kami,\r\n    Anda\r\n    dapat menghubungi Kami di:\r\n  </p>\r\n\r\n  <p class=\"text-center\"> Email: info@aturtoko.id<br>\r\n    Alamat: Metropolitan Tower, Lantai 2 Jl. R.A. Kartini No. 14, RW.4, Cilandak Barat,<br> Cilandak, Kota Jakarta\r\n    Selatan,\r\n    Jakarta 12430\r\n  </p>\r\n</div>\r\n\r\n<div class=\"container pt-5\">\r\n  <ol>\r\n    <li>MENGGUNAKAN LAYANAN DAN SITUS WEB\r\n      <ol class=\"subtitle-s\">\r\n        <li>Pendaftaran\r\n          <ol class=\"content\">\r\n            <li>Anda harus berusia minimal 21 tahun atau lebih untuk menggunakan Layanan. Jika Anda berusia di bawah\r\n              21\r\n              tahun, Anda menyatakan dan menjamin kepada Kami bahwa Anda telah memperoleh persetujuan dari orang tua\r\n              atau wali sah Anda untuk menerima dan mematuhi Ketentuan ini atas nama Anda dan bertanggung jawab atas\r\n              tindakan Anda, dan segala biaya yang terkait dengan penggunaan Anda atas yang Layanan dan Situs Web.\r\n            </li>\r\n            <li>Untuk mengakses dan menggunakan Layanan dan Situs Web Kami, Anda harus mendaftar dan membuat akun\r\n              dengan\r\n              memberikan alamat email Anda yang valid, nomor ponsel yang valid, dan informasi lain yang ditunjukkan\r\n              sebagaimana diperlukan. Sebagai bagian dari proses aktivasi akun, Anda mungkin diminta untuk\r\n              memverifikasi\r\n              alamat email dan/atau nomor ponsel Anda.</li>\r\n            <li>Orang yang mendaftar atau membuka akun akan dianggap sebagai pemilik akun dan pihak yang\r\n              menandatangani\r\n              kontrak untuk tujuan Ketentuan ini dan akan menjadi orang yang berwenang untuk menggunakan akun\r\n              sehubungan\r\n              dengan Layanan. Untuk menghindari keraguan, \"Anda\" dan \"milik Anda\" dalam Ketentuan ini merujuk pada\r\n              pemilik akun.</li>\r\n            <li>Jika Anda membuka atau mengoperasikan akun atas nama perusahaan Anda atau pihak ketiga lainnya,\r\n              perusahaan Anda atau pihak ketiga tersebut akan menjadi pemilik akun dan Anda menyatakan dan menjamin\r\n              bahwa Anda memiliki kewenangan untuk bertindak atas nama perusahaan tersebut atau pihak ketiga dan\r\n              mengikat perusahaan atau pihak ketiga tersebut dengan Ketentuan ini. </li>\r\n            <li>Anda menjamin bahwa semua keterangan dan informasi yang diberikan dalam pembuatan akun Anda adalah\r\n              lengkap, benar dan akurat. Anda harus memastikan bahwa keterangan dan informasi pribadi tersebut terus\r\n              diperbarui di profil pengguna.</li>\r\n            <li>Anda sepenuhnya bertanggung jawab atas aktivitas apapun yang terjadi pada akun Anda dan bertanggung\r\n              jawab untuk menjaga keamanan dan kerahasiaan kata sandi Anda ke akun Anda. Anda harus segera memberi\r\n              tahu\r\n              Kami jika Anda mengetahui atau memiliki alasan untuk mencurigai bahwa kerahasiaan kata sandi Anda telah\r\n              dibobol atau jika telah terjadi penggunaan yang tidak sah atas akun Anda atau pelanggaran keamanan\r\n              terkait\r\n              akun lainnya yang diketahui.</li>\r\n            <li>Kami tidak akan bertanggung jawab atas kerugian atau kerusakan yang terjadi sebagai akibat dari\r\n              rincian\r\n              akun Anda yang dibagikan oleh Anda atau disebabkan oleh tindakan yang dilarang oleh pihak ketiga mana\r\n              pun.\r\n            </li>\r\n            <li>Jika terjadi perselisihan mengenai kepemilikan akun, Kami dapat memutuskan layanan untuk sementara\r\n              waktu\r\n              hingga kesepakatan ditentukan antara para pihak yang berselisih. Kami berhak untuk menentukan dan/atau\r\n              memberikan kepemilikan akun berdasarkan penilaian Kami yang wajar, terlepas apakah penyelidikan\r\n              independen\r\n              telah dilakukan oleh Kami atau tidak. Kami berhak meminta dokumentasi apa pun untuk menentukan atau\r\n              mengkonfirmasi kepemilikan akun. Namun, jika Kami tidak dapat membuat keputusan tersebut (yang Kami\r\n              perkirakan berdasarkan kebijakan Kami sendiri), Kami berhak untuk tidak melakukannya, tanpa kewajiban\r\n              kepada Anda atau pihak lain.</li>\r\n          </ol>\r\n        </li>\r\n        <li>Hak Kami\r\n          <ol class=\"content\">\r\n            <li>Kami berhak, tanpa diperlukan pemberitahuan atau persetujuan Anda, untuk:\r\n              <ol class=\"alphabet\">\r\n                <li>Membatasi akses ke, memutuskan layanan atau menghapus akun Anda dengan alasan apapun dan kapanpun;\r\n                </li>\r\n                <li>Melaporkan aktivitas apa pun yang Kami curigai melanggar hukum yang berlaku kepada pihak berwenang\r\n                  yang sesuai dan bekerja sama dengan pihak berwenang tersebut;</li>\r\n                <li>Dalam setiap waktu meminta informasi apapun dari Anda sehubungan dengan penggunaan dan/atau akses\r\n                  Anda ke Layanan dan Situs Web;</li>\r\n                <li>Memberikan Layanan Kami kepada pesaing Anda dan tidak menjanjikan eksklusivitas di segmen pasar\r\n                  tertentu. Anda selanjutnya mengetahui dan menyetujui bahwa karyawan dan kontraktor Kami juga dapat\r\n                  menjadi pelanggan Kami dan bahwa mereka dapat bersaing dengan Anda, meskipun mereka tidak\r\n                  menggunakan\r\n                  informasi rahasia Anda untuk melakukan hal tersebut;</li>\r\n                <li>Mengoptimalkan dan menyesuaikan Layanan dan/atau Situs Web, antarmuka, aturan penggunaan dan\r\n                  lainnya\r\n                  milik Kami dari waktu ke waktu, dan menyesuaikan ruang lingkup dan jenis spesifik dari\r\n                  produk-produk;\r\n                </li>\r\n                <li>Menghapus Konten Pengguna yang, berdasarkan pendapat kamu, melanggar Ketentuan ini atau peraturan\r\n                  perundangan yang berlaku;</li>\r\n                <li>Menolak aplikasi Anda untuk sebuah akun, membatalkan penerbitan akun yang ada, membatalkan\r\n                  langganan\r\n                  atau menghapus akun yang ada dengan alasan apa pun, atas kebijakan Kami sendiri;</li>\r\n                <li>Memblokir, membatasi, menonaktifkan, menangguhkan, atau menghentikan akses Anda ke semua atau\r\n                  sebagian Layanan dan Situs Web kapan saja berdasarkan kebijakan Kami dalam hal:\r\n                  <ol class=\"roman\">\r\n                    <li>Anda telah melanggar atau tidak mematuhi ketentuan apa pun dari Ketentuan ini atau peraturan\r\n                      perundang-undangan yang berlaku;</li>\r\n                    <li>Anda lebih lanjut mendaftarkan dan masuk ke dalam Layanan dan Situs Web Kami secara langsung\r\n                      ataupun tidak langsung atau menggunakan nama orang atau entitas lain setelah akses anda telah\r\n                      diblokir, ditangguhkan atau dihentikan oleh Kami;</li>\r\n                    <li>Anda tidak meningkatkan langganan layanan anda sesuai Pasal 1.3.3 Ketentuan ini; dan/atau</li>\r\n                    <li>Anda tidak melakukan pembayaran sebelum berakhirnya masa berlangganan saat ini sesuai Pasal\r\n                      1.3.4 Ketentuan ini.</li>\r\n                  </ol>\r\n                </li>\r\n              </ol>\r\n            </li>\r\n            <li>Setelah pemblokiran, pembatasan, penonaktifan, penangguhan, atau penghentian akses Anda ke semua atau\r\n              sebagian Layanan dan Situs Web menjadi efektif, Anda bertanggung jawab penuh atas semua data dan\r\n              informasi\r\n              yang terdapat dalam akun Anda, termasuk untuk memigrasikan atau meneruskan yang diperlukan informasi\r\n              atau\r\n              data. Kami tidak berkewajiban untuk menyimpan informasi atau data apa pun di atau terkait dengan akun\r\n              untuk Anda, atau meneruskan atau memigrasikan informasi atau data apa pun (termasuk namun tidak terbatas\r\n              pada pesan yang belum dibaca atau dikirim) kepada Anda atau pengguna atau pihak ketiga pihak, dan Kami\r\n              tidak akan bertanggung jawab atas segala kerusakan atau kerugian yang ditimbulkan oleh Anda, pengguna,\r\n              atau pihak ketiga karena hal-hal tersebut di atas.</li>\r\n            <li>Setelah penghentian akses Anda ke semua atau sebagian dari Layanan dan/atau Situs Web, Anda dengan ini\r\n              memberi Kami hak untuk menyimpan dan/atau menghapus informasi atau data apa pun di atau terkait dengan\r\n              akun Anda tanpa kewajiban apa pun kepada Anda.</li>\r\n          </ol>\r\n        </li>\r\n        <li>Biaya dan Pembayaran\r\n          <ol class=\"content\">\r\n            <li>Biaya berlangganan untuk berlangganan Layanan Kami tersedia di Halaman Harga Kami. Semua biaya\r\n              berlangganan dibayar di muka, terlepas dari paket berlangganan yang dipilih. Setelah pembayaran biaya\r\n              berlangganan, Anda akan menerima tanda terima pembayaran. Metode pembayaran yang tersedia serta harga\r\n              setiap paket langganan tersedia di halaman Harga Situs Web.</li>\r\n            <li>Setelah berlangganan Layanan Kami, Anda juga dapat meningkatkan paket langganan Anda. Biaya langganan\r\n              untuk meningkatkan paket langganan Anda tersedia di Halaman Harga Kami.</li>\r\n            <li>Jika selama periode layanan berlangganan, jumlah pesanan yang Anda terima (baik yang diproses atau\r\n              dibatalkan) dalam satu bulan di Layanan mencapai volume pesanan bulanan maksimum yang ditentukan oleh\r\n              jenis layanan, Anda harus meningkatkan jenis layanan Anda. Jika Anda tidak meningkatkan layanan Anda\r\n              dalam\r\n              waktu 7 hari kalender sejak tanggal Anda mencapai volume pesanan bulanan maksimum, Kami berhak untuk\r\n              mencegah, membatasi, menurunkan versi, menonaktifkan, menangguhkan, atau menghentikan akses Anda ke\r\n              semua\r\n              atau sebagian layanan di Situs Web dan/atau Layanan, dan Kami tidak akan bertanggung jawab atas kerugian\r\n              Anda. Biaya berlangganan untuk meningkatkan paket langganan Anda dapat diperoleh di halaman harga Kami.\r\n              Anda dapat memilih antara tersebut:\r\n              <ol class=\"alphabet\">\r\n                <li>Metode Top-Up. Anda harus membayar nilai top-up yang mana sejumlah selisih harga jenis layanan\r\n                  (sebagaimana tercantum dalam metode pengembalian uang atau <em>top-up</em> untuk keperluan\r\n                  peningkatan\r\n                  halaman\r\n                  harga Kami) yang ditingkatkan dengan harga jenis layanan asli yang tidak digunakan (harga yang tidak\r\n                  digunakan didasarkan pada rasio jumlah hari yang digunakan / 365 Hitung pengurangan).</li>\r\n                <li>Metode Pengembalian Dana. Anda harus membayar penuh harga layanan yang ditingkatkan dan setelah\r\n                  menerima pembayaran Anda, Kami akan mengembalikan harga jenis layanan asli yang tidak digunakan.\r\n                  Seluruh pajak yang telah Anda bayarkan sehubungan dengan Layanan Kami tidak akan dikembalikan.</li>\r\n              </ol>\r\n            </li>\r\n            <li>Kami dapat memberitahukan kepada Anda setidaknya melalui email 7 hari kalender sebelum berakhirnya\r\n              periode berlangganan yang berlaku untuk mengingatkan Anda tentang masa berlangganan yang berlaku. Jika\r\n              Anda gagal melakukan pembayaran sebelum akhir periode langganan tersebut, Kami dapat, dalam setiap saat\r\n              berdasarkan kebijaksanaan Kami, memblokir, membatasi, menurunkan, menonaktifkan, menangguhkan atau\r\n              menghentikan akses Anda ke semua atau sebagian Layanan dan Situs Web tanpa pemberitahuan sebelumnya atau\r\n              kewajiban terhadap Anda. Setelah itu, kecuali Anda telah menyelesaikan pembayaran untuk perpanjangan\r\n              langganan Anda, Kami menyangkal dan tidak membuat pernyataan atau jaminan sehubungan dengan, dan dalam\r\n              hal\r\n              apapun Kami tidak memiliki kewajiban apa pun yang timbul dari atau sehubungan dengan kerugian,\r\n              kewajiban,\r\n              kerusakan, atau pengeluaran dalam bentuk apapun dari tindakan yang telah Kami lakukan terkait dengan\r\n              akses\r\n              Anda ke Layanan dan Situs Web Kami.</li>\r\n            <li>Jika Anda menghapus akun Anda atau membatalkan langganan Anda ke Layanan Kami, Kami tidak akan\r\n              memberikan pengembalian uang atau rabat untuk biaya langganan Anda, baik secara pro-rata atau\r\n              sebaliknya.\r\n            </li>\r\n            <li>Biaya langganan tidak termasuk pajak, dan Anda akan bertanggung jawab untuk pembayaran semua pajak\r\n              yang\r\n              berlaku terkait dengan penggunaan Anda atas Layanan atau pembayaran apa pun yang Anda lakukan.</li>\r\n          </ol>\r\n        </li>\r\n      </ol>\r\n    </li>\r\n\r\n    <li class=\"pt-4\">TINDAKAN YANG DILARANG\r\n      <ol class=\"subtitle-t\">\r\n        <li>Anda setuju untuk menggunakan Layanan dan Situs Web Kami sesuai dengan Ketentuan ini dan untuk\r\n          tujuan yang sah dan tepat. Selanjutnya, Anda setuju untuk tidak:\r\n          <ol class=\"content\">\r\n            <li>Menyatakan atau mencoba untuk menyamarkan Layanan dan Situs Web Kami sebagai produk orang lain selain\r\n              Kami, termasuk menghapus, mengubah, atau mengganti pemberitahuan tentang kepemilikan, merek dagang, nama\r\n              bisnis, logo, atau sebutan asal lainnya;</li>\r\n            <li>Mengganggu atau mengacaukan atau menghancurkan atau mencoba untuk mengganggu Layanan dan Situs Web\r\n              Kami,\r\n              atau server atau jaringan yang terhubung ke Layanan dan Situs Web Kami, termasuk menjalankan atau\r\n              mengaktifkan proses di Layanan dan Situs Web Kami yang mengganggu layanan yang benar atau menempatkan\r\n              beban yang tidak wajar pada Layanan dan infrastruktur Situs Web Kami;</li>\r\n            <li>Melanggar keamanan jaringan apapun, termasuk memecahkan kata sandi atau kode enkripsi, mentransfer\r\n              atau\r\n              menyimpan materi ilegal, atau mendapatkan kata sandi, akun, atau informasi pribadi dari pengguna lain\r\n              Layanan dan Situs Web Kami;</li>\r\n            <li>Memperoleh atau mencoba untuk mendapatkan akses tidak sah, dengan cara apa pun, ke salah satu sistem\r\n              Kami dan sistem yang dimiliki atau dioperasikan oleh Kami;</li>\r\n            <li>Membongkar, merekayasa balik, mengkompilasi, atau memodifikasi perangkat lunak atau aplikasi apa pun\r\n              yang terdapat di dalam atau tersedia di Situs Web Kami secara keseluruhan atau sebagian, atau mencoba\r\n              untuk mendapatkan atau mengakses kode sumber Situs Web Kami;</li>\r\n            <li>Menggunakan perangkat lunak atau proses manual atau otomatis untuk mengekstrak, mengekspor, atau\r\n              mengambil <em>(scrape)</em> materi apa pun yang ditampilkan di Situs Web Kami, termasuk teks, grafik,\r\n              foto,\r\n              gambar,\r\n              ilustrasi, audio, video, data, peringkat, ulasan, dan informasi lainnya (\"Konten”). Perangkat lunak atau\r\n              proses manual atau otomatis seperti itu termasuk pencatatan data <em>(datamining)</em>, pengikisan\r\n              <em>(scraping),\r\n                spidering,</em> pengindeksan, penyimpanan, atau pemuatan ulang Konten di luar Situs Web Kami;</li>\r\n            <li>Menggunakan perangkat lunak atau proses manual atau otomatis untuk membuat karya turunan berdasarkan\r\n              Konten di Layanan dan Situs Web Kami;</li>\r\n            <li>Menyalahgunakan, melecehkan, mengancam, meniru atau mengintimidasi siapa pun;</li>\r\n            <li>Melakukan perbuatan penipuan, palsu atau menyesatkan;</li>\r\n            <li>Mengirimkan atau mentransmisikan, atau menyebabkan dikirimnya atau ditransmisikannya materi apa pun\r\n              sebagaimana disebutkan dalam klausul 5.2 di bawah;</li>\r\n            <li>Melakukan tindakan yang mengacaukan atau mencoba untuk mengacaukan keamanan, termasuk namun tidak\r\n              terbatas mengirimkan atau mentransmisikan, atau menyebabkan dikirimnya atau ditransmisikannya, konten\r\n              berbahaya termasuk <em>malware, Trojan horse,</em> atau virus atau kode komputer, file skrip, dan\r\n              program\r\n              lainnya,\r\n              secara ilegal memasuki server Kami, dengan maksud tidak baik memindai server Kami, mengumpulkan data\r\n              Kami\r\n              tanpa otorisasi atau mengganggu akses pengguna ke Layanan dan Situs Web Kami;</li>\r\n            <li>Mengirimkan atau mentransmisikan, atau menyebabkan dikirimnya atau ditransmisikannya, surat massal\r\n              yang\r\n              tidak diminta atau bentuk spam lainnya, termasuk surat sampah atau surat berantai;</li>\r\n            <li>Melanggar hak pihak ketiga mana pun, termasuk hak kekayaan intelektual atau hak kepemilikan;</li>\r\n            <li>Melakukan tindakan apapun yang, berdasarkan diskresi Kami, membatasi atau menghalangi orang atau\r\n              entitas\r\n              lain untuk menggunakan atau menikmati Layanan dan Situs Web Kami; dan</li>\r\n            <li>Melanggar, atau menyebabkan Kami melanggar, hukum, undang-undang, tata cara, atau regulasi apa pun\r\n              yang\r\n              berlaku.</li>\r\n          </ol>\r\n        </li>\r\n        <li>Sehubungan dengan Situs Web, Kami berhak, atas kebijakan Kami (termasuk untuk pelanggaran\r\n          klausul 2.1 di atas), untuk:\r\n          <ol class=\"content\">\r\n            <li>Menghapus konten yang melanggar standar Kami;</li>\r\n            <li>Menangguhkan atau menghentikan akun atau akses Anda ke Situs Web;</li>\r\n            <li>Memberitahukan otoritas terkait; dan</li>\r\n            <li>Mengambil tindakan lain yang Kami anggap pantas atau sebagaimana disarankan.</li>\r\n          </ol>\r\n        </li>\r\n        <li>Jika Anda mengakses Layanan dan Situs Web Kami melalui akun terdaftar, Anda mengakui dan setuju\r\n          bahwa Anda bertanggung jawab untuk menjaga kerahasiaan nama pengguna dan kata sandi akun Anda, Anda akan\r\n          membatasi akses ke komputer Anda, dan Anda setuju untuk menerima tanggung jawab atas semua aktivitas yang\r\n          terjadi pada akun Anda.</li>\r\n      </ol>\r\n    </li>\r\n\r\n    <li class=\"pt-4\">DATA PRIBADI ANDA\r\n      <ol class=\"subtitle-t\">\r\n        <li>Kebijakan Privasi Kami juga mengatur penggunaan Anda atas Layanan dan Situs Web Kami. Kebijakan\r\n          Privasi menjelaskan data pribadi apa yang Kami kumpulkan dari Anda, bagaimana dan mengapa Kami mengumpulkan,\r\n          menggunakan, dan mengungkapkan informasi tersebut, hak-hak Anda terkait dengan data pribadi Anda dan\r\n          bagaimana\r\n          menghubungi Kami jika Anda memiliki pertanyaan tentang penggunaan data pribadi Anda.</li>\r\n      </ol>\r\n    </li>\r\n\r\n    <li class=\"pt-4\">KEPEMILIKAN, PENGGUNAAAN DAN HAK KEKAYAAN INTELEKTUAL\r\n      <ol class=\"subtitle-t\">\r\n        <li>Semua hak, termasuk hak kekayaan intelektual, di dalam dan terhadap Layanan dan Situs Web Kami,\r\n          termasuk namun tidak terbatas pada desain, teks, grafik, aplikasi, perangkat lunak, kode sumber yang\r\n          mendasarinya, dimiliki oleh Kami atau pemberi lisensi Kami (sebagaimana berlaku). Hak kekayaan intelektual\r\n          berarti hak seperti hak cipta, merek dagang, nama domain, hak desain, hak basis data, paten, dan semua hak\r\n          kekayaan intelektual lainnya dalam bentuk apapun baik terdaftar atau tidak terdaftar.</li>\r\n        <li>Masing-masing dari Kami dan pemberi lisensi Kami memiliki semua hak atas kekayaan intelektual\r\n          apa pun sehubungan dengan Ketentuan ini. Ini berarti, misalnya, bahwa Kami dan mereka tetap menjadi\r\n          pemiliknya\r\n          dan bebas menggunakannya sesuai keinginan Kami.</li>\r\n        <li>Tidak ada dalam Ketentuan ini yang memberi Anda hak hukum dalam Layanan dan Situs Web Kami\r\n          selain yang diperlukan untuk memungkinkan Anda mengakses Layanan dan Situs Web. Anda setuju untuk tidak\r\n          menyesuaikan atau mencoba mengakali atau menghapus pemberitahuan apa pun yang terdapat di Layanan dan Situs\r\n          Web Kami (termasuk pemberitahuan kekayaan intelektual) dan khususnya dalam hak digital atau teknologi\r\n          keamanan\r\n          lainnya yang terdapat atau terkandung dalam Layanan dan Situs Web Kami.</li>\r\n        <li>Anda dengan ini memberi Kami lisensi dan persetujuan yang berlaku di seluruh dunia, bebas\r\n          royalti, dapat dipublikasikan, dapat dialihkan, dan abadi untuk menggunakan nama, merek, merek dagang,\r\n          dan/atau logo Anda untuk tujuan promosi dan pemasaran Layanan Kami, termasuk namun tidak terbatas pada\r\n          menampilkan nama, merek, merek dagang, dan/atau logo di Situs Web Kami.</li>\r\n        <li>Tidak ada hal yang terkandung di Layanan atau Situs Web yang dapat ditafsirkan sebagai\r\n          pemberian lisensi atau hak untuk menggunakan merek dagang apa pun tanpa persetujuan tertulis sebelumnya dari\r\n          pemilik merek dagang.</li>\r\n        <li>Dalam mengakses Layanan dan Situs Web Kami, Anda setuju bahwa setiap pengunduhan konten adalah\r\n          untuk referensi pribadi dan non-komersial saja. Tidak ada bagian dari Layanan dan Situs Web Kami yang dapat\r\n          direproduksi atau ditransmisikan dalam bentuk apa pun atau dengan cara apa pun, elektronik, mekanis,\r\n          fotokopi,\r\n          rekaman, atau lainnya, tanpa persetujuan tertulis sebelumnya dari Kami.</li>\r\n      </ol>\r\n    </li>\r\n\r\n    <li class=\"pt-4\">ULASAN DAN KIRIMAN PENGGUNA\r\n      <ol class=\"subtitle-t\">\r\n        <li>Sejauh Layanan dan Situs Web Kami memungkinkan Anda untuk memposting, mengunggah, mengirimkan,\r\n          atau menyediakan Konten apa pun (\"Konten Pengguna\"), Anda setuju bahwa:\r\n          <ol class=\"content\">\r\n            <li>Anda sepenuhnya bertanggung jawab atas Konten Pengguna yang Anda unggah dan Anda menyatakan dan setuju\r\n              bahwa Anda tidak akan membagikan apa pun yang akan melanggar hak pihak ketiga mana pun, termasuk hak\r\n              kekayaan intelektual atau hak kepemilikan;</li>\r\n            <li>Meskipun semua hak kekayaan intelektual yang ada dalam Konten Pengguna akan menjadi milik Anda atau\r\n              pemberi lisensi Anda dan Anda selalu bebas untuk membagikan Konten Pengguna Anda dengan siapa pun,\r\n              dengan\r\n              ini Anda memberi Kami dan afiliasi Kami hak yang bersifat non-eksklusif, abadi (terus berlaku setelah\r\n              pengakhiran kontrak Kami dengan Anda), bebas royalti, berlaku di seluruh dunia, dapat dialihkan dan\r\n              disublisensikan untuk menampilkan, menggunakan, mereproduksi baik secara elektronik atau sebaliknya,\r\n              menampilkan secara publik, mendistribusikan, memodifikasi, mengadaptasi, menerbitkan, menerjemahkan, dan\r\n              membuat hasil turunan dari setiap dan semua Konten Pengguna tersebut (sesuai dengan Kebijakan Privasi\r\n              Kami), termasuk namun tidak terbatas pada tujuan periklanan dan pemasaran Layanan dan Situs Web Kami;\r\n            </li>\r\n            <li>Kami tidak berkewajiban untuk menyimpan, menahan, menerbitkan, atau menyediakan Konten Pengguna apa\r\n              pun\r\n              yang Anda unggah dan bahwa Anda akan bertanggung jawab untuk membuat cadangan Konten Pengguna apapun\r\n              jika\r\n              perlu.</li>\r\n          </ol>\r\n        </li>\r\n        <li>Anda tidak boleh mengunggah, memposting atau mengirimkan pada atau melalui Layanan dan Situs\r\n          Web Konten Pengguna apa pun yang:\r\n          <ol class=\"content\">\r\n            <li>Melanggar hak cipta pihak ketiga atau hak kekayaan intelektual lainnya atau hak publisitas atau\r\n              privasi;\r\n            </li>\r\n            <li>Berisi konten pornografi, memfitnah, atau ilegal atau tidak bermoral;</li>\r\n            <li>Mengeksploitasi anak di bawah umur;</li>\r\n            <li>Berisi tindakan melanggar hukum atau kekerasan;</li>\r\n            <li>Berisi kekejaman terhadap hewan atau kekerasan terhadap hewan;</li>\r\n            <li>Mempromosikan skema penipuan atau membuat klaim iklan yang menipu atau persaingan tidak sehat; dan\r\n            </li>\r\n            <li>Melanggar hukum, undang-undang atau peraturan apa pun.</li>\r\n          </ol>\r\n        </li>\r\n        <li>Anda dengan ini setuju untuk mengganti kerugian Kami terhadap kerugian, kewajiban, kerusakan\r\n          atau pengeluaran apapun yang Kami, dan afiliasi Kami, mungkin terima yang secara langsung atau tidak\r\n          langsung\r\n          disebabkan oleh atau disebabkan oleh penggunaan Anda atas Layanan dan Situs Web Kami, untuk mengirim atau\r\n          memposting Konten Pengguna apa pun.</li>\r\n      </ol>\r\n    </li>\r\n\r\n    <li class=\"pt-4\">HYPERLINKS DAN SITUS PIHAK KETIGA\r\n      <ol class=\"subtitle-t\">\r\n        <li>Tautan eksternal dapat disediakan di Layanan dan Situs Web Kami untuk kenyamanan Anda, tetapi mereka\r\n          berada di luar kendali Kami dan Kami tidak membuat pernyataan tentang tautan ini. Penggunaan atau\r\n          ketergantungan Anda pada tautan eksternal apa pun dan konten di dalamnya dilakukan dengan risiko Anda\r\n          sendiri. Saat mengunjungi tautan eksternal, Anda harus mengacu pada syarat dan ketentuan penggunaan situs\r\n          web eksternal tersebut.</li>\r\n        <li>Anda tidak akan membuat <em>hypertext</em> apa pun dari situs web manapun yang dikendalikan oleh Anda atau\r\n          sebaliknya ke Layanan dan Situs Web Kami tanpa persetujuan tertulis sebelumnya dari Kami.</li>\r\n      </ol>\r\n    </li>\r\n\r\n    <li class=\"pt-4\">PENYANGKALAN DAN PEMBATASAN TANGGUNG JAWAB\r\n      <ol class=\"subtitle-t\">\r\n        <li>Sejauh diizinkan oleh hukum dan peraturan yang berlaku, Kami dan afiliasi Kami bersama dengan\r\n          masing-masing pejabat, direktur, para karyawan, agen, mitra, dan perwakilan Kami tidak akan bertanggung\r\n          jawab atas kerusakan langsung, tidak langsung, insidental, khusus, contoh, konsekuensial, atau lainnya apa\r\n          pun, termasuk namun tidak terbatas pada tanggung jawab untuk:\r\n          <ol class=\"content\">\r\n            <li>Hilangnya pendapatan aktual atau yang diantisipasi (baik langsung maupun tidak langsung);</li>\r\n            <li>Hilangnya keuntungan aktual atau yang diantisipasi (baik langsung maupun tidak langsung);</li>\r\n            <li>Hilangnya kontrak atau bisnis atau niat baik (baik langsung maupun tidak langsung); atau</li>\r\n            <li>Kehilangan data, yang timbul karena alasan apapun juga sehubungan dengan Ketentuan ini, bahkan jika\r\n              salah satu dari Kami dan afiliasi Kami bersama dengan masing-masing pejabat, direktur, karyawan, agen,\r\n              mitra, dan perwakilan Kami masing-masing telah diberitahukan tentang kemungkinan kerugian atau kerusakan\r\n              yang, sedang atau akan terjadi, termasuk kerugian atau kerusakan apa pun akibat (i) akses, penggunaan,\r\n              atau tidak dapat digunakannya Layanan atau Situs Web; (ii) eror, kesalahan, atau ketidakakuratan dari\r\n              atau dalam konten apa pun (termasuk Konten Pengguna) yang tersedia melalui Layanan dan/atau Situs Web\r\n              (iii) akses tidak sah ke atau penggunaan server Kami dan/atau data pribadi dan/atau informasi lainnya\r\n              yang disimpan di sini, (iv) gangguan atau penghentian transmisi ke atau dari Layanan atau Situs Web,\r\n              atau (v) penggunaan Anda atas situs atau layanan pihak ketiga atau penggunaan atau akses ke situs web\r\n              lain yang ditautkan ke Situs Web. Ketentuan ini berlaku terlepas dari apakah kerusakan didasarkan pada\r\n              kontrak, kesalahan (termasuk kelalaian), pelanggaran kewajiban hukum atau sebaliknya, termasuk\r\n              berdasarkan kewajiban ganti rugi sesuai Ketentuan ini.</li>\r\n          </ol>\r\n        </li>\r\n        <li>Kami tidak memiliki hubungan khusus dengan atau kewajiban kepada Anda untuk mengakses dan menggunakan\r\n          Layanan dan Situs Web dan Konten Kami. Kami tidak memiliki kendali atas, dan tidak berkewajiban untuk\r\n          mengambil tindakan apapun terkait:\r\n          <ol class=\"content\">\r\n            <li>Pengguna mana yang dapat mengakses ke Layanan dan Situs Web Kami;</li>\r\n            <li>Konten apa yang Anda akses melalui Layanan dan Situs Web Kami;</li>\r\n            <li>Apa pengaruh Konten Kami terhadap Anda;</li>\r\n            <li>Bagaimana Anda dapat menafsirkan atau menggunakan Konten Kami; dan</li>\r\n            <li>Tindakan apa yang mungkin Anda ambil sebagai akibat dari terpaparnya Konten.</li>\r\n          </ol>\r\n        </li>\r\n        <li>Kami juga tidak bertanggung jawab atas biaya apa pun yang terkait dengan penyedia jaringan Anda, yang\r\n          mungkin membebankan biaya kepada Anda untuk mengakses layanan koneksi mereka untuk mengakses dan menggunakan\r\n          Layanan dan Situs Web Kami. Kami juga tidak bertanggung jawab atas ketersediaan dan kualitas penerimaan\r\n          telekomunikasi Anda saat mengakses atau menggunakan Layanan dan Situs Web Kami.</li>\r\n        <li>Import Data\r\n          <ol class=\"content\">\r\n            <li>Anda memahami bahwa karena pengaturan teknis yang mendasari dan alasan lain, dalam proses mengimpor\r\n              data, data mungkin rusak atau berubah. Karena kerumitan dan ketidakpastian migrasi data, Kami menyangkal\r\n              dan tidak menanggung kewajiban hukum atau Kerugian apa pun, termasuk kewajiban kompensasi, untuk data\r\n              yang tidak dipulihkan atau tidak diperbaiki.</li>\r\n            <li>Anda menjamin bahwa data yang dimigrasikan atau diimpor dari platform pihak ketiga lainnya ke Situs\r\n              Web diperoleh secara sah dan sesuai aturan dan telah secara tegas disahkan oleh pihak terkait dan segala\r\n              risiko yang timbul darinya akan ditanggung oleh Anda sendiri. Jika Kami menderita kerugian sebagai\r\n              akibatnya, Anda harus bertanggung jawab untuk kompensasi. Anda menyatakan dan menjamin bahwa Anda\r\n              memiliki semua kualifikasi yang diperlukan dan otorisasi hukum yang diperlukan untuk melaksanakan\r\n              kewajiban ini, dan bahwa tindakan Anda untuk selalu mematuhi hukum yang berlaku terkait termasuk namun\r\n              tidak terbatas pada undang-undang perlindungan data.</li>\r\n            <li>Karena Kami hanya memberi Anda layanan teknis untuk impor data dan tidak, dengan cara apa pun,\r\n              memverifikasi kebenaran, kelengkapan, atau kesesuaian data yang diimpor, Anda harus memastikan kebenaran\r\n              data yang diimpor. Jika pengimporan data tidak dapat dilakukan karena kesalahan data atau hasil\r\n              pengimporan data tidak sesuai atau alasan lain apa pun yang tidak disebabkan oleh kesalahan atau\r\n              kelalaian Kami semata, Kami tidak bertanggung jawab atas kerugian, kewajiban, kerusakan, atau biaya apa\r\n              pun atas sifat apa pun yang Anda alami karena keadaan seperti itu.</li>\r\n          </ol>\r\n        </li>\r\n        <li>Sejauh diizinkan oleh undang-undang dan peraturan yang berlaku, Kami menyangkal dan tidak membuat\r\n          pernyataan atau jaminan sehubungan dengan, dan dalam hal apapun Kami tidak memiliki tanggung jawab apa pun\r\n          yang timbul dari atau sehubungan dengan:\r\n          <ol class=\"content\">\r\n            <li>Legalitas, kesusilaan, atau kepatutan materi apa pun yang terkandung atau diakses melalui Layanan dan\r\n              Situs Web Kami, termasuk materi di situs web lain yang mungkin Kami arahkan kepada Anda;</li>\r\n            <li>Materi iklan apa pun yang dikirimkan oleh pihak ketiga dan ditampilkan di Layanan dan Situs Web Kami,\r\n              termasuk namun tidak terbatas pada, kesalahan, kelalaian, atau ketidakakuratan; dan</li>\r\n            <li>Setiap informasi yang ditampilkan, dan saran atau rekomendasi yang dibuat tentang Layanan dan Situs\r\n              Web untuk tujuan apa pun.</li>\r\n          </ol>\r\n        </li>\r\n        <li>Layanan dan Situs Web dan semua konten, informasi, materi, dan produk yang tersedia dari Layanan dan Situs\r\n          Web disediakan kepada anda secara ketat berdasarkan \"sebagaimana adanya\" dan \"sebagaimana tersedia\". Semua\r\n          ketentuan, pernyataan, dan jaminan, baik tersurat, tersirat, berharga atau lainnya, termasuk, tanpa batasan,\r\n          jaminan tersirat atas dapat diperdagangkan, kesesuaian untuk tujuan tertentu, atau bukan pelanggaran atas\r\n          hak pihak ketiga terhadap informasi, materi, dan produk yang tersedia dari situs web ini disangkakan oleh\r\n          Kami sejauh diizinkan oleh hukum yang berlaku (termasuk afiliasi Kami, direksi, pejabat, karyawan, agen,\r\n          kontraktor, penerus dan penerima pengalihan). Tanpa mengurangi hal tersebut, Kami, pemberi lisensi Kami\r\n          tidak memberikan pernyataan, jaminan atau garansi terhadap keandalan, ketepatan waktu, kualitas, kesesuaian,\r\n          kebenaran, ketersediaan, keakuratan, atau kelengkapan dari situs web atau konten, informasi, materi atau\r\n          produk yang tersedia dari layanan dan situs web. Kami (termasuk afiliasi, direksi, pejabat, karyawan, agen,\r\n          kontraktor, penerus dan penerima pengalihan) tidak menyatakan atau menjamin bahwa penggunaan layanan dan\r\n          situs web akan sesuai waktu, tidak terganggu, atau tidak terdapat eror atau dapat beroperasi dengan\r\n          perangkat keras, perangkat lunak, sistem atau data.</li>\r\n        <li>Layanan Kami, termasuk namun tidak terbatas pada OmniPos, BuatToko, danAturToko+, yang tersedia di Situs\r\n          web bergantung pada layanan Antarmuka Pemrograman Situs Web (<em>Website Programming Interface</em> atau\r\n          API) dari platform tempat Layanan Kami terhubung dan API dari platform tersebut mungkin tidak menyediakan\r\n          pembaruan secara real-time kepada Layanan Kami. Sejauh diizinkan oleh undang-undang dan peraturan yang\r\n          berlaku, Kami menyangkal dan tidak membuat pernyataan atau jaminan sehubungan dengan, dan dalam hal apapun\r\n          Kami tidak memiliki kewajiban apa pun yang timbul dari atau sehubungan dengan kehilangan, kewajiban,\r\n          kerusakan, atau biaya dalam bentuk apa pun yang disebabkan oleh ketersediaan API dari platform tersebut,\r\n          termasuk hukuman atau tindakan apa pun yang mungkin dikenakan platform kepada Anda.</li>\r\n        <li>Anda setuju bahwa Kami dapat mengubah atau menyela beberapa atau semua layanan jaringan (yang termasuk,\r\n          namun tidak terbatas pada direktori, pesan, berbagi file, server file dan/atau layanan penyimpanan file),\r\n          dan menghapus informasi apa pun yang Anda kirimkan dalam menggunakan layanan jaringan Kami sesuai dengan\r\n          ketentuan Ketentuan ini, tanpa memberi tahu Anda, dan tanpa kewajiban apa pun kepada Anda.</li>\r\n        <li>Kami berhak untuk merombak atau melakukan pemeliharaan pada Layanan, Situs Web atau peralatan terkait yang\r\n          menyediakan Layanan secara berkala atau insidental, tetapi Kami akan memberi tahu Anda terlebih dahulu\r\n          melalui pengumuman situs web atau cara lain . Kami tidak akan bertanggung jawab atas setiap pengeluaran,\r\n          kerugian (termasuk kehilangan keuntungan atau peluang) atau kerusakan yang Anda alami karena gangguan,\r\n          gangguan, atau penangguhan Layanan karena keadaan seperti itu.</li>\r\n        <li>Fitur yang tersedia di Layanan Kami memungkinkan Anda mengunggah dan menyalin produk dari satu pasar ke\r\n          pasar lain. Namun, Anda bertanggung jawab untuk memastikan bahwa produk yang diunggah dan disalin ke\r\n          platform mana pun memenuhi kriteria dan persyaratan yang ditetapkan oleh platform masing-masing. Sejauh\r\n          diizinkan oleh undang-undang dan peraturan yang berlaku, Kami menyangkal dan tidak membuat pernyataan atau\r\n          jaminan sehubungan dengan, dan dalam hal apapun Kami tidak memiliki kewajiban apa pun yang timbul dari atau\r\n          sehubungan dengan kehilangan, kewajiban, kerusakan, atau biaya dalam bentuk apa pun yang disebabkan oleh\r\n          penggunaan fitur ini oleh Anda.</li>\r\n        <li>Kami akan melakukan upaya yang wajar secara komersial untuk memberikan langkah-langkah keamanan\r\n          berdasarkan praktik industri untuk memastikan keamanan dan pengoperasian normal Layanan dan Situs Web.\r\n          Namun, karena kemungkinan virus komputer, kegagalan komunikasi jaringan, pemeliharaan sistem dan\r\n          faktor-faktor lain serta peristiwa force majeure yang mungkin terjadi, Kami tidak memberikan jaminan bahwa\r\n          Layanan yang diberikan tanpa cacat. Oleh karena itu, jika ada cacat, kekurangan, kegagalan atau kesalahan\r\n          dalam Layanan yang Kami berikan, tetapi cacat, kekurangan, kegagalan atau kesalahan tidak dapat dihindari\r\n          karena tindakan pengamanan yang diterapkan berdasarkan praktik industri saat ini atau teknologi yang ada,\r\n          Kami tidak akan bertanggung jawab atas pelanggaran kontrak dalam keadaan seperti itu.</li>\r\n        <li>Kami tidak bertanggung jawab kepada Anda atas pelanggaran Ketentuan ini yang disebabkan oleh peristiwa\r\n          atau keadaan di luar kendali Kami yang wajar termasuk, namun tidak terbatas pada, mogok kerja, penutupan\r\n          atau perselisihan industri lainnya; kerusakan sistem atau akses jaringan; atau banjir, kebakaran, ledakan\r\n          atau kecelakaan. Jika peristiwa atau keadaan seperti itu mengakibatkan keterlambatan atau kegagalan dalam\r\n          penyediaan Layanan Kami, Kami akan memberi Anda perkiraan waktu kapan Anda akan mendapatkan kembali akses ke\r\n          Layanan Kami, tetapi Anda tidak akan memiliki hak untuk mengakhiri Ketentuan ini karena keterlambatan atau\r\n          atau kegagalan tersebut.</li>\r\n      </ol>\r\n    </li>\r\n\r\n    <li class=\"pt-4\">GANTI RUGI\r\n      <ol class=\"subtitle-t\">\r\n        <li>Anda setuju untuk membela, mengganti kerugian, dan membebaskan Kami, pejabat, direktur, pemegang saham,\r\n          karyawan, afiliasi, agen, partner dan perwakilan Kami dari dan terhadap setiap dan semua klaim, kerusakan,\r\n          kewajiban, kerugian, kewajiban, biaya (termasuk biaya pengacara) yang timbul dari (i) pelanggaran Anda\r\n          terhadap salah satu Ketentuan ini; (ii) pelanggaran Anda terhadap hak pihak ketiga mana pun, termasuk hak\r\n          cipta atau hak privasi, yang diakibatkan oleh Konten Pengguna Anda dan penggunaan Anda atas Layanan dan\r\n          Situs Web; dan (iii) jenis klaim lainnya yang membahas dugaan kerusakan yang disebabkan oleh Konten Pengguna\r\n          Anda kepada pihak ketiga.</li>\r\n        <li>Selain itu, Kami dapat menggunakan informasi apa pun yang tersedia tentang Anda untuk menghentikan\r\n          pelanggaran persyaratan ini, penggunaan Layanan atau Situs Web yang melanggar hukum atau tidak tepat,\r\n          termasuk memberi tahu pihak ketiga mana pun yang Kami anggap tepat atas pelanggaran atau penggunaan dan/atau\r\n          mengungkapkan data pribadi Anda kepada pihak ketiga tersebut.</li>\r\n      </ol>\r\n    </li>\r\n\r\n    <li class=\"pt-4\">PENGAKHIRAN\r\n      <ol class=\"subtitle-t\">\r\n        <li>Ketentuan ini berakhir Ketika salah satu dari kondisi berikut ini terpenuhi:\r\n          <ol class=\"content\">\r\n            <li>Pemberitahuan pengakhiran: Kami dapat mengakhiri Ketentuan ini dengan pemberitahuan tertulis 30 hari\r\n              kalender sebelumnya tanpa bertanggung jawab atas pelanggaran kontrak;</li>\r\n            <li>Hak pengakhiran sepihak: Anda memahami bahwa Kami berhak untuk segera mengakhiri Ketentuan ini dan\r\n              memberikan sanksi kepada Anda jika:\r\n              <ol class=\"alphabet\">\r\n                <li>Berdasarkan kebijakan Kami sendiri, Anda telah melanggar persyaratan, perjanjian, aturan,\r\n                  pemberitahuan dan ketentuan terkait lainnya dari Layanan dan Situs Web yang relevan; dan/atau</li>\r\n                <li>Suatu data atau informasi yang Anda isi atau kirimkan kepada Kami tidak benar atau tidak akurat.\r\n                </li>\r\n              </ol>\r\n            </li>\r\n          </ol>\r\n        </li>\r\n        <li>Akibat pengakhiran setelah Ketentuan ini berakhir:\r\n          <ol class=\"content\">\r\n            <li>Kami akan menghentikan akses Anda ke Situs Web dan Layanan tanpa kewajiban apapun kepada Anda;</li>\r\n            <li>Anda bertanggung jawab penuh atas semua data dan informasi yang terdapat dalam akun Anda, termasuk\r\n              untuk memigrasikan atau meneruskan informasi atau data yang diperlukan. Kami tidak berkewajiban untuk\r\n              menyimpan informasi apa pun di atau terkait dengan akun asli untuk Anda, atau meneruskan atau\r\n              memigrasikan informasi apa pun (termasuk namun tidak terbatas pada pesan yang belum dibaca atau dikirim)\r\n              kepada Anda atau pengguna atau pihak ketiga, dan Kami tidak akan bertanggung jawab atas segala kerusakan\r\n              atau kerugian yang ditimbulkan oleh Anda, pengguna, atau pihak ketiga karena hal tersebut di atas;</li>\r\n            <li>Setiap saat setelah pengakhiran menjadi efektif, Anda harus menghapus atau mengembalikan, atas\r\n              permintaan Kami, semua data yang Anda peroleh dari Layanan dan Situs Web Kami, termasuk namun tidak\r\n              terbatas pada data pengguna, Situs Web atau data operasi Layanan dan menyatakan secara tertulis bahwa\r\n              pengembalian atau pemusnahan tersebut telah terjadi;</li>\r\n            <li>Anda akan tetap berkewajiban untuk melakukan semua kewajibannya yang terutang hingga dan termasuk\r\n              tanggal pengakhiran; dan</li>\r\n            <li>Anda dengan ini memberi Kami hak untuk menyimpan dan/atau menghapus informasi atau data apa pun di\r\n              dalam atau terkait dengan akun Anda tanpa kewajiban apapun kepada Anda.</li>\r\n          </ol>\r\n        </li>\r\n      </ol>\r\n    </li>\r\n\r\n    <li class=\"pt-4\">LAIN - LAIN\r\n      <ol class=\"subtitle-t\">\r\n        <li>Kami dapat mengubah Ketentuan ini dari waktu ke waktu dengan memberitahukan Ketentuan yang diperbarui di\r\n          Situs web Kami atau di mana pun Layanan Kami tersedia. Dengan terus menggunakan Layanan atau Situs Web Kami\r\n          setelah perubahan berlaku berarti Anda setuju untuk terikat oleh Ketentuan yang direvisi.</li>\r\n        <li>Tidak ada kegagalan atau penundaan oleh Kami atau salah satu penerima kepentingan Kami dalam menjalankan\r\n          hak atau upaya hukum apa pun berdasarkan Ketentuan ini yang dapat dianggap sebagai pengabaian hak tersebut.\r\n          Pengecualian atau penghilangan ketentuan atau istilah apa pun dari Ketentuan ini tidak dapat dianggap\r\n          pengesampingan atas hak atau upaya hukum yang mungkin Kami miliki berdasarkan hukum yang berlaku.</li>\r\n        <li>Pasal 1.2.3, 4.4, 5.1.2, 5.3, 7, 8, 9.2 dari Ketentuan ini dan ketentuan lain dari Ketentuan ini yang\r\n          menurut sifatnya atau oleh keadaan dimaksudkan untuk bertahan, akan tetap berlaku setelah pengakhiran atau\r\n          berakhirnya Ketentuan ini.</li>\r\n        <li>Tidak ada dalam Ketentuan ini yang dianggap atau ditafsirkan untuk menciptakan kemitraan antara Kami dan\r\n          Anda, dan Anda mengakui bahwa Kami adalah pihak independen terhadap Ketentuan ini dan tidak satu pun dari\r\n          kita yang merupakan agen pihak lainnya.</li>\r\n        <li>Seseorang yang bukan pihak dalam Ketentuan ini tidak akan memiliki hak atau kewajiban berdasarkan hukum\r\n          dan peraturan yang berlaku untuk menegakkan ketentuan apa pun berdasarkan Ketentuan ini.</li>\r\n        <li>Ketentuan ini dan dokumen lain yang secara tegas dirujuk dalam Ketentuan ini, sebagaimana dapat diubah\r\n          dari waktu ke waktu, merupakan keseluruhan perjanjian dan pemahaman antara Kami dan Anda sehubungan dengan\r\n          pokok bahasan Ketentuan ini dan menggantikan perjanjian atau pemahaman sebelumnya di antara Kami dan diri\r\n          Anda sendiri dalam kaitannya dengan hal tersebut.</li>\r\n        <li>Tidak ada kegagalan, penundaan, atau kelalaian oleh Kami dalam menjalankan hak, kekuasaan, atau upaya\r\n          hukum yang disediakan oleh hukum atau berdasarkan Ketentuan ini yang akan beroperasi sebagai pengabaian hak,\r\n          kekuasaan, atau upaya hukum, maupun menghalangi atau membatasi pelaksanaannya atau hak atau upaya hukum\r\n          lainnya di masa mendatang. Tidak ada pelaksanaan tunggal atau sebagian oleh Kami atas hak, kekuasaan, atau\r\n          upaya hukum yang disediakan oleh hukum atau berdasarkan Ketentuan ini yang akan mencegah pelaksanaannya atau\r\n          pelaksanaan hak, kekuasaan, atau upaya hukum lainnya di masa mendatang.</li>\r\n        <li>Ketentuan ini tidak dapat dialihkan, ditransfer atau disublisensikan oleh Anda kecuali dengan persetujuan\r\n          tertulis sebelumnya dari Kami. Kami dapat mentransfer, mengalihkan atau mendelegasikan Ketentuan ini dan hak\r\n          dan kewajiban Kami kepada badan hukum terkait, pembeli bisnis atau pihak ketiga lainnya. Kami akan\r\n          memberitahu Anda secara tertulis sebelum ini terjadi dan Kami akan memastikan bahwa pengalihan tersebut\r\n          tidak akan mempengaruhi hak Anda berdasarkan Ketentuan ini. Dengan terus mengakses atau menggunakan Layanan\r\n          dan Situs Web setelah pemberitahuan tersebut, Anda menyetujui pengalihan atau pendelegasian tersebut.</li>\r\n        <li>Jika ada ketentuan dalam Ketentuan ini (atau bagian dari ketentuan apa pun) yang atau menjadi ilegal,\r\n          tidak valid, atau tidak dapat dilaksanakan, ketentuan atau bagian lainnya akan tetap berlaku sepenuhnya dan\r\n          berlaku sejauh yang diizinkan menurut hukum dan peraturan yang berlaku.</li>\r\n        <li>Ketentuan ini akan ditafsirkan sesuai dengan, dan diatur oleh, hukum Republik Indonesia. Setiap masalah\r\n          yang belum terselesaikan atau pertanyaan interpretasi yang timbul sehubungan dengan Ketentuan ini akan\r\n          diselesaikan secara damai.</li>\r\n        <li>Sesuai dengan Undang-Undang Republik Indonesia Nomor 24 Tahun 2009 tentang Bendera, Bahasa, Lambang dan\r\n          Lagu Kebangsaan dan Peraturan Presiden Republik Indonesia Nomor 63 Tahun 2019 tentang Penggunaan Bahasa\r\n          Indonesia, Ketentuan ini disusun di bahasa Indonesia. Jika terdapat ketidaksesuaian teks bahasa Indonesia,\r\n          atau jika terdapat perselisihan tentang arti atau interpretasi dari ketentuan tertentu, teks bahasa\r\n          Indonesia akan dianggap diubah untuk menyesuaikan dengan, dan untuk membuat teks bahasa Indonesia yang\r\n          relevan konsisten.</li>\r\n      </ol>\r\n    </li>\r\n  </ol>\r\n</div>`\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';\r\nimport { tnc } from './tnc'\r\n\r\n@Component({\r\n  selector: 'app-tnc',\r\n  templateUrl: './tnc.component.html',\r\n  styleUrls: ['./tnc.component.css']\r\n})\r\nexport class TNCComponent implements OnInit {\r\n\r\n  tnc: any;\r\n\r\n  constructor(\r\n    public activeModal: NgbActiveModal\r\n  ) { }\r\n\r\n  ngOnInit(): void {\r\n    this.tnc = tnc.data;\r\n  }\r\n\r\n}\r\n","<div class=\"modal-header\">\r\n  <h5 class=\"modal-title\" id=\"syaratKetentuan\">Syarat dan Ketentuan</h5>\r\n  <button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"activeModal.dismiss('Cross click')\">\r\n    <span aria-hidden=\"true\">&times;</span>\r\n  </button>\r\n</div>\r\n<div class=\"modal-body\" [innerHTML]=\"tnc\">\r\n</div>\r\n\r\n<div class=\"modal-footer\">\r\n  <button type=\"button\" class=\"btn btn-custom3\" (click)=\"activeModal.close('Close click')\">Tutup</button>\r\n</div>\r\n","import { Injectable, TemplateRef } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class ToastService {\n  toasts: any[] = [];\n\n  show(textOrTpl: string | TemplateRef<any>, options: any = {}) {\n    this.toasts.push({ textOrTpl, ...options });\n  }\n\n  remove(toast: any) {\n    this.toasts = this.toasts.filter(t => t !== toast);\n  }\n}\n","<header>\n  <div class=\"container\">\n    <div class=\"row pt-5\">\n      <div class=\"col-12 col-xl-6 d-none d-md-block\" id=\"regMode\">\n        <ngb-carousel [showNavigationIndicators]=\"false\">\n          <ng-template ngbSlide class=\"carousel-item\">\n            <div class=\"row d-flex flex-row justify-content-center align-items-center\">\n              <div class=\"col-12\">\n                <div class=\"h4\">Satu Akses Untuk Semua Toko Jualan Mu!</div>\n              </div>\n              <div class=\"col-12 col-md-6\">\n                <img src=\"assets/products/op1.svg\" alt=\"Register\">\n              </div>\n              <div class=\"col-12 col-md-6\">\n                <p><em>Platform</em> yang terhubung dengan beberapa\n                  marketplace untuk mengatur dan memproses\n                  seluruh order Omnichannel Anda, inventaris\n                  produk secara real time, upload massal produk,\n                  chat multiple marketplace dan termasuk\n                  sistem POS untuk penjualan offline.\n                </p>\n              </div>\n            </div>\n          </ng-template>\n          <ng-template ngbSlide class=\"carousel-item\">\n            <div class=\"row d-flex flex-row justify-content-center align-items-center\">\n              <div class=\"col-12\">\n                <div class=\"h4\">Keuntungan Menggunakan OmniPos</div>\n              </div>\n              <div class=\"col-12 col-md-6\">\n                <ol>\n                  <li class=\"fs-6\">Dapat memproses seluruh aktivitas orderan <em>marketplace</em> Anda dalam satu <em>platform</em>;\n                  </li>\n                  <li class=\"fs-6\"><em>Real Time</em> inventaris stok di <em>marketplace</em> dan website Anda yang terhubung;</li>\n                  <li class=\"fs-6\">Terdapat sistem POS untuk jualan offline;</li>\n                  <li class=\"fs-6\">Dapat terintegrasi ke Software pembukuan seperti <em>Accurate</em> dan Jurnal;</li>\n                </ol>\n              </div>\n              <div class=\"col-12 col-md-6\">\n                <img src=\"assets/products/op3.svg\" alt=\"OmniPOS\" class=\"w-100\">\n              </div>\n            </div>\n          </ng-template>\n          <ng-template ngbSlide class=\"carousel-item\">\n            <div class=\"row d-flex flex-row justify-content-center align-items-center\">\n              <div class=\"col-12\">\n                <div class=\"h4\">Keuntungan Menggunakan OmniPos</div>\n              </div>\n              <div class=\"col-12 col-md-6\">\n                <ol start=\"5\">\n                  <li class=\"fs-6\">Chat <em>marketplace</em> Anda di satu <em>platform</em>;</li>\n                  <li class=\"fs-6\">Bisa melakukan <em>upload</em> massal dan duplikasi produk ke semua <em>marketplace</em>;</li>\n                  <li class=\"fs-6\"><em>Download</em> laporan penjualan dan data pelanggan tiap <em>marketplace</em> Anda per\n                    periode/tanggal.</li>\n                </ol>\n              </div>\n              <div class=\"col-12 col-md-6\">\n                <img src=\"assets/products/op3.svg\" alt=\"OmniPOS\" class=\"w-100\">\n              </div>\n            </div>\n          </ng-template>\n        </ngb-carousel>\n      </div>\n      <div class=\"col-12 col-xl-6\">\n        <form autocomplete=\"off\" [formGroup]=\"regForm\" (ngSubmit)=\"onSubmit()\">\n          <div class=\"form-group row pt-5 mb-0\">\n            <div class=\"col-12 col-md-5 offset-md-1 mb-3\">\n              <input type=\"text\" name=\"nama_toko\" formControlName=\"nama_toko\" class=\"form-control\" id=\"nama_toko\"\n                placeholder=\"Nama Toko\" minlength=\"4\">\n              <div *ngIf=\"(submitted || reg.nama_toko.touched) && reg.nama_toko.errors\" class=\"text-danger\">\n                <small *ngIf=\"reg.nama_toko.errors.required\">Nama Toko Harus Diisi</small>\n                <small *ngIf=\"reg.nama_toko.errors.minlength\">Nama Toko Minimal 4 Karakter</small>\n              </div>\n            </div>\n            <div class=\"col-12 col-md-5 mb-3\">\n              <input type=\"text\" name=\"nama_pengguna\" formControlName=\"nama_pengguna\" class=\"form-control\"\n                id=\"nama_pengguna\" placeholder=\"Username\" pattern=\"^(?:[a-zA-Z0-9]+)?$\" minlength=\"4\">\n              <div *ngIf=\"(submitted || reg.nama_pengguna.touched) && reg.nama_pengguna.errors\" class=\"text-danger\">\n                <small *ngIf=\"reg.nama_pengguna.errors.required\">Username Harus Diisi</small>\n                <small *ngIf=\"reg.nama_pengguna.errors.minlength\">Username Minimal 4 Karakter</small>\n                <small *ngIf=\"reg.nama_pengguna.errors.pattern\">Username Hanya Berupa Alfanumerik</small>\n              </div>\n            </div>\n          </div>\n          <div class=\"form-group row mb-0\">\n            <div class=\"col-12 col-md-5 offset-md-1 mb-3\">\n              <input type=\"email\" name=\"email\" formControlName=\"email\" class=\"form-control\" id=\"email\"\n                placeholder=\"E-mail\">\n              <div *ngIf=\"(submitted || reg.email.touched) && reg.email.errors\" class=\"text-danger\">\n                <small *ngIf=\"reg.email.errors.required\">Email Harus Diisi</small>\n                <small *ngIf=\"reg.email.errors.pattern\">Format Email Tidak Sesuai</small>\n              </div>\n            </div>\n            <div class=\"col-12 col-md-5 mb-3\">\n              <input type=\"tel\" name=\"no_telp\" formControlName=\"no_telp\" class=\"form-control\" id=\"no_telp\"\n                placeholder=\"Nomor Whatsapp\" pattern=\"^(\\+62|62|0)8[1-9][0-9]{6,9}$\">\n              <div *ngIf=\"(submitted || reg.no_telp.touched) && reg.no_telp.errors\" class=\"text-danger\">\n                <small *ngIf=\"reg.no_telp.errors.required\">Nomor Whatsapp Harus Diisi</small>\n                <small *ngIf=\"reg.no_telp.errors.pattern\">Format Nomor Whatsapp Tidak Sesuai</small>\n              </div>\n            </div>\n          </div>\n          <div class=\"form-group row mb-0\">\n            <div class=\"col-12 col-md-5 offset-md-1 mb-3\">\n              <input [type]=\"viewPass ? 'text' : 'password'\" name=\"password\" formControlName=\"password\"\n                class=\"form-control\" id=\"password\" placeholder=\"Password\" autocomplete=\"new-password\">\n              <div *ngIf=\"(submitted || reg.password.touched) && reg.password.errors\" class=\"text-danger\">\n                <small *ngIf=\"reg.password.errors.required\">Password Harus Diisi</small>\n              </div>\n            </div>\n            <div class=\"col-12 col-md-5 mb-3\">\n              <input [type]=\"viewPass ? 'text' : 'password'\" name=\"c_password\" formControlName=\"c_password\"\n                class=\"form-control\" id=\"c_password\" placeholder=\"Ulangi Password\" autocomplete=\"new-password\"\n                pattern=\"{{reg.password.value}}\">\n              <div *ngIf=\"(submitted || reg.c_password.touched) && reg.c_password.errors\" class=\"text-danger\">\n                <small *ngIf=\"reg.c_password.errors?.required\">Konfirmasi Password Harus Diisi</small>\n                <small *ngIf=\"reg.c_password.errors?.pattern\">Konfirmasi Password Harus Sama</small>\n              </div>\n            </div>\n          </div>\n          <div class=\"form-group row mb-0\">\n            <div class=\"col-12 col-md-5 offset-md-1 mb-3\">\n              <div class=\"form-check\">\n                <input type=\"checkbox\" class=\"check-control form-check-input\" id=\"lihat-password\" [value]=\"viewPass\"\n                  (change)=\"viewPass = !viewPass\">\n                <label class=\"form-check-label\" for=\"lihat-password\">Lihat Password</label>\n              </div>\n            </div>\n          </div>\n          <div class=\"form-group checkbox-syarat pt-5 text-center\">\n            <div class=\"col-12\">\n              <input type=\"checkbox\" class=\"form-check-input\" id=\"tnc\" formControlName=\"tnc\">\n              <label class=\"form-check-label\" for=\"tnc\" style=\"width: 250px;\">Saya telah membaca, memahami dan\n                menyetujui <a id=\"snk\" (click)=\"viewTnC($event)\">Syarat dan Ketentuan</a></label>\n              <div *ngIf=\"(submitted || reg.tnc.touched) && reg.tnc.errors\" class=\"text-danger\">\n                <small *ngIf=\"reg.tnc.errors.required\">Kamu harus menyetujui syarat dan ketentuan yang berlaku</small>\n              </div>\n            </div>\n          </div>\n          <div class=\"btn-regist pt-5 text-center\">\n            <button type=\"submit\" class=\"btn btn-custom1\">Registrasi</button>\n          </div>\n        </form>\n      </div>\n    </div>\n  </div>\n</header>\n","import { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\nimport { DashboardComponent } from './dashboard/dashboard.component';\r\nimport { RegisterComponent } from './products/register/register.component';\r\n\r\nconst routes: Routes = [\r\n  { path: 'tentang', loadChildren: () => import('./about/about.module').then(m => m.AboutModule) },\r\n  { path: 'harga', loadChildren: () => import('./about/about.module').then(m => m.AboutModule) },\r\n  { path: 'omnipos', loadChildren: () => import('./products/products.module').then(m => m.ProductsModule) },\r\n  { path: 'buattoko', loadChildren: () => import('./products/products.module').then(m => m.ProductsModule) },\r\n  { path: 'aturtokoplus', loadChildren: () => import('./products/products.module').then(m => m.ProductsModule) },\r\n  { path: 'daftar', component: RegisterComponent },\r\n  { path: '', component: DashboardComponent },\r\n];\r\n\r\n@NgModule({\r\n  imports: [RouterModule.forRoot(routes, { anchorScrolling: 'enabled', scrollPositionRestoration: 'disabled' })],\r\n  exports: [RouterModule]\r\n})\r\nexport class AppRoutingModule { }\r\n","import { HttpClient, HttpParams } from '@angular/common/http';\nimport { Component, OnInit } from '@angular/core';\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\nimport { ActivatedRoute } from '@angular/router';\nimport { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap';\nimport { TNCComponent } from '../tnc/tnc.component';\nimport { ToastService } from '../../toast.service';\n\n@Component({\n  selector: 'app-register',\n  templateUrl: './register.component.html',\n  styleUrls: ['./register.component.css']\n})\nexport class RegisterComponent implements OnInit {\n\n  viewPass = false;\n  regForm: FormGroup;\n  submitted: boolean = false;\n  hasParams: any;\n\n  constructor(\n    private http: HttpClient,\n    private fb: FormBuilder,\n    private ts: ToastService,\n    private modalService: NgbModal,\n    private route: ActivatedRoute\n  ) { }\n\n  ngOnInit(): void {\n    this.route.queryParams.subscribe(\n      (params: any) => {\n        console.log(params);\n        this.hasParams = params;\n      }\n    )\n    this.regForm = this.fb.group({\n      nama_toko: ['', [Validators.required, Validators.minLength(4)]],\n      nama_pengguna: ['', [Validators.required, Validators.minLength(4)]],\n      email: ['', [Validators.required, Validators.pattern(\"^[a-z0-9._%+-]+@[a-z0-9.-]+\\\\.[a-z]{2,20}$\")]],\n      no_telp: ['', Validators.required],\n      jenis_usaha: ['Lainnya'],\n      alamat_toko: ['Alamat'],\n      password: ['', Validators.required],\n      c_password: ['', Validators.required],\n      role_id: [1, Validators.required],\n      marketplace: [1, Validators.required],\n      is_active: [true, Validators.required],\n      pilihan_paket: ['AturToko +', Validators.required],\n      tnc: [false, Validators.requiredTrue]\n    })\n  }\n\n  get reg() {\n    return this.regForm.controls;\n  }\n\n  onSubmit() {\n    this.submitted = true;\n    if (this.regForm.invalid) {\n      return;\n    }\n    let params = new HttpParams();\n    Object.keys(this.hasParams).forEach( (item) => {\n      params = params.set(item, this.hasParams[item]);\n    });\n    this.http.post('https://reg.aturtoko.id/api/v1/register?' + params, this.regForm.value).subscribe(\n      (res: any) => {\n        this.ts.show('Registrasi berhasil!', {\n          classname: 'bg-success text-light',\n          autohide: true,\n          delay: 5000\n        });\n        setTimeout(() => {\n          window.open('https://store.aturtoko.id/login', '_blank');\n        }, 5000);\n      }, (err: any) => {\n        for (const key in err.error) {\n          this.ts.show(`${err.error[key][0]}`, {\n            classname: 'bg-danger text-light',\n            autohide: true,\n            delay: 5000\n          });\n        }\n      }\n    )\n  }\n\n  viewTnC(e: any) {\n    e.stopPropagation();\n    const modalRef = this.modalService.open(TNCComponent, {\n      windowClass: 'modal-xl', backdrop: 'static', keyboard: true, centered: true\n    });\n  }\n\n}\n","import { Component, TemplateRef } from '@angular/core';\n\nimport { ToastService } from '../toast.service';\n\n\n@Component({\n  selector: 'app-toast',\n  template: `\n    <ngb-toast\n      *ngFor=\"let toast of toastService.toasts\"\n      [class]=\"toast.classname\"\n      [autohide]=\"true\"\n      [delay]=\"toast.delay || 5000\"\n      (hidden)=\"toastService.remove(toast)\"\n    >\n      <ng-template [ngIf]=\"isTemplate(toast)\" [ngIfElse]=\"text\">\n        <ng-template [ngTemplateOutlet]=\"toast.textOrTpl\"></ng-template>\n      </ng-template>\n\n      <ng-template #text>{{ toast.textOrTpl }}</ng-template>\n    </ngb-toast>\n  `,\n  host: { '[class.ngb-toasts]': 'true' }\n})\nexport class ToastComponent {\n  constructor(public toastService: ToastService) { }\n\n  isTemplate(toast: any) { return toast.textOrTpl instanceof TemplateRef; }\n}\n","import { Component } from '@angular/core';\nimport { Router } from '@angular/router';\n\ndeclare let $: any;\n\n@Component({\n  selector: 'app-root',\n  templateUrl: './app.component.html',\n  styleUrls: ['./app.component.css']\n})\n\nexport class AppComponent {\n  title = 'dashboard-aturtoko';\n  isCollapsed = false;\n\n  constructor(\n    private router: Router\n  ) {}\n\n  register() {\n    this.router.navigate(['/daftar']);\n    // const modalRef = this.modalService.open(RegisterComponent, {\n    //   windowClass: 'modal-xl', backdrop: 'static', keyboard: true, centered: true\n    // });\n    // modalRef.result.then(\n    //   (res: any) => {\n    //     window.open('https://store.aturtoko.id/login', '_blank');\n    //   }, (err: any) => {\n    //     console.log(err);\n    //   }\n    // )\n    \n  }\n}\n","<app-toast></app-toast>\r\n<div class=\"container-fluid\" style=\"margin-bottom: 50px;\">\r\n  <nav class=\"navbar navbar-expand-lg navbar-light fixed-top\">\r\n    <div class=\"container\">\r\n      <a class=\"navbar-brand\" [routerLink]=\"['/']\">\r\n        <img src=\"assets/logos/aturtoko.svg\" alt=\"AturToko\" width=\"140\" height=\"45\">\r\n      </a>\r\n      <button class=\"navbar-toggler\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#navbarNav\"\r\n        aria-controls=\"navbarNav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\" (click)=\"isCollapsed = !isCollapsed\">\r\n        <span class=\"navbar-toggler-icon\"></span>\r\n      </button>\r\n      <div class=\"collapse navbar-collapse\" id=\"navbarNav\" [ngClass]=\"{ 'show': isCollapsed }\">\r\n        <ul class=\"navbar-nav mx-auto\">\r\n          <li class=\"nav-item\">\r\n            <a class=\"nav-link\" [routerLink]=\"['/tentang']\" routerLinkActive=\"link-active\" (click)=\"isCollapsed = false\">Tentang AturToko</a>\r\n          </li>\r\n          <li class=\"nav-item\" ngbDropdown>\r\n            <a class=\"nav-link\" ngbDropdownToggle>Servis AturToko</a>\r\n            <div class=\"dropdown-menu dropdown-menu-right\" ngbDropdownMenu>\r\n              <a ngbDropdownItem class=\"dropdown-item\" [routerLink]=\"['/omnipos']\" [routerLinkActive]=\"'link-active'\" (click)=\"isCollapsed = false\">\r\n                OmniPOS\r\n              </a>\r\n              <a ngbDropdownItem class=\"dropdown-item\" [routerLink]=\"['/buattoko']\" [routerLinkActive]=\"'link-active'\" (click)=\"isCollapsed = false\">\r\n                BuatToko\r\n              </a>\r\n              <a ngbDropdownItem class=\"dropdown-item\" [routerLink]=\"['/aturtokoplus']\" [routerLinkActive]=\"'link-active'\" (click)=\"isCollapsed = false\">\r\n                AturToko +\r\n              </a>\r\n            </div>\r\n          </li>\r\n          <li class=\"nav-item\">\r\n            <a class=\"nav-link\" [routerLink]=\"['/harga']\" routerLinkActive=\"link-active\" (click)=\"isCollapsed = false\">Daftar Harga</a>\r\n          </li>\r\n          <li class=\"nav-item\">\r\n            <a class=\"nav-link\" href=\"https://blog.aturtoko.id/\" target=\"_blank\" rel=\"noreferrer\">Blog</a>\r\n          </li>\r\n        </ul>\r\n        <a href=\"https://store.aturtoko.id\" class=\"btn btn-md btn-custom px-4 py-2 mr-2\">Masuk</a>\r\n        <button class=\"btn btn-md btn-custom4 px-4 py-2 ml-2\" (click)=\"register();\">Daftar</button>\r\n      </div>\r\n    </div>\r\n  </nav>\r\n</div>\r\n\r\n<router-outlet></router-outlet>\r\n\r\n<footer>\r\n  <div class=\"container\">\r\n    <div class=\"row\">\r\n      <div class=\"col-12 col-md-6\">\r\n        <img src=\"assets/logos/aturtoko.svg\" alt=\"Logo AturToko\" width=\"150\" height=\"49\">\r\n        <p>Metropolitan Tower, Lantai 2 <br> Jl. R.A. Kartini No. 14, RW.4, <br> West\r\n          Cilandak, Cilandak, <br> South Jakarta City, Jakarta <br> 12430</p>\r\n        <p class=\"pt-2\">info@aturtoko.id</p>\r\n        <p class=\"pt-2\">PT Atur Toko Solusi Indonesia</p>\r\n      </div>\r\n      <div class=\"col-6 col-md-3\">\r\n        <div class=\"h4\">Servis</div>\r\n        <ul class=\"box\">\r\n          <li><a [routerLink]=\"['/omnipos']\" routerLinkActive=\"link-active\" >OmniPos</a></li>\r\n          <li><a [routerLink]=\"['/buattoko']\" routerLinkActive=\"link-active\" >BuatToko</a></li>\r\n          <li><a [routerLink]=\"['/aturtokoplus']\" routerLinkActive=\"link-active\" >AturToko+</a></li>\r\n          <!-- <li><a [routerLink]=\"['/privacy']\" routerLinkActive=\"link-active\" >Privacy Policy</a></li> -->\r\n        </ul>\r\n      </div>\r\n      <div class=\"col-6 col-md-3\">\r\n        <div class=\"h4\">AturToko</div>\r\n        <ul class=\"box\">\r\n          <li><a [routerLink]=\"['/tentang']\" routerLinkActive=\"link-active\" >Tentang AturToko</a></li>\r\n          <li><a href=\"https://wa.me/628118880258?text=Halo AturToko\" target=\"_blank\" rel=\"noreferrer\">Kontak AturToko</a></li>\r\n          <!-- <li><a [routerLink]=\"['/karir']\" routerLinkActive=\"link-active\" >Karir</a></li> -->\r\n        </ul>\r\n        <div class=\"column\">\r\n          <a href=\"https://www.facebook.com/profile.php?id=100063537397085\" target=\"_blank\" rel=\"noreferrer\"><img class=\"smicons\" src=\"assets/logos/facebook.webp\" alt=\"Facebook\" width=\"40\" height=\"40\"></a>\r\n          <a href=\"https://www.instagram.com/aturtoko.id/\" target=\"_blank\" rel=\"noreferrer\"><img class=\"smicons\" src=\"assets/logos/instagram.webp\" alt=\"Instagram\" width=\"40\" height=\"40\"></a>\r\n          <a href=\"https://www.linkedin.com/company/aturtoko\" target=\"_blank\" rel=\"noreferrer\"><img class=\"smicons\" src=\"assets/logos/linkedin.webp\" alt=\"LinkedIn\" width=\"40\" height=\"40\"></a>\r\n        </div>\r\n      </div>\r\n\r\n\r\n    </div>\r\n  </div>\r\n</footer>\r\n","/**\n * @license Angular v12.2.7\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { isPlatformBrowser } from '@angular/common';\nimport { Injectable, InjectionToken, NgZone, ApplicationRef, PLATFORM_ID, APP_INITIALIZER, Injector, NgModule } from '@angular/core';\nimport { defer, throwError, fromEvent, of, concat, Subject, NEVER, merge } from 'rxjs';\nimport { map, filter, switchMap, publish, take, tap, delay } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport * as ɵngcc0 from '@angular/core';\nconst ERR_SW_NOT_SUPPORTED = 'Service workers are disabled or not supported by this browser';\nfunction errorObservable(message) {\n    return defer(() => throwError(new Error(message)));\n}\n/**\n * @publicApi\n */\nclass NgswCommChannel {\n    constructor(serviceWorker) {\n        this.serviceWorker = serviceWorker;\n        if (!serviceWorker) {\n            this.worker = this.events = this.registration = errorObservable(ERR_SW_NOT_SUPPORTED);\n        }\n        else {\n            const controllerChangeEvents = fromEvent(serviceWorker, 'controllerchange');\n            const controllerChanges = controllerChangeEvents.pipe(map(() => serviceWorker.controller));\n            const currentController = defer(() => of(serviceWorker.controller));\n            const controllerWithChanges = concat(currentController, controllerChanges);\n            this.worker = controllerWithChanges.pipe(filter((c) => !!c));\n            this.registration = (this.worker.pipe(switchMap(() => serviceWorker.getRegistration())));\n            const rawEvents = fromEvent(serviceWorker, 'message');\n            const rawEventPayload = rawEvents.pipe(map(event => event.data));\n            const eventsUnconnected = rawEventPayload.pipe(filter(event => event && event.type));\n            const events = eventsUnconnected.pipe(publish());\n            events.connect();\n            this.events = events;\n        }\n    }\n    postMessage(action, payload) {\n        return this.worker\n            .pipe(take(1), tap((sw) => {\n            sw.postMessage(Object.assign({ action }, payload));\n        }))\n            .toPromise()\n            .then(() => undefined);\n    }\n    postMessageWithStatus(type, payload, nonce) {\n        const waitForStatus = this.waitForStatus(nonce);\n        const postMessage = this.postMessage(type, payload);\n        return Promise.all([waitForStatus, postMessage]).then(() => undefined);\n    }\n    generateNonce() {\n        return Math.round(Math.random() * 10000000);\n    }\n    eventsOfType(type) {\n        const filterFn = (event) => event.type === type;\n        return this.events.pipe(filter(filterFn));\n    }\n    nextEventOfType(type) {\n        return this.eventsOfType(type).pipe(take(1));\n    }\n    waitForStatus(nonce) {\n        return this.eventsOfType('STATUS')\n            .pipe(filter(event => event.nonce === nonce), take(1), map(event => {\n            if (event.status) {\n                return undefined;\n            }\n            throw new Error(event.error);\n        }))\n            .toPromise();\n    }\n    get isEnabled() {\n        return !!this.serviceWorker;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Subscribe and listen to\n * [Web Push\n * Notifications](https://developer.mozilla.org/en-US/docs/Web/API/Push_API/Best_Practices) through\n * Angular Service Worker.\n *\n * @usageNotes\n *\n * You can inject a `SwPush` instance into any component or service\n * as a dependency.\n *\n * <code-example path=\"service-worker/push/module.ts\" region=\"inject-sw-push\"\n * header=\"app.component.ts\"></code-example>\n *\n * To subscribe, call `SwPush.requestSubscription()`, which asks the user for permission.\n * The call returns a `Promise` with a new\n * [`PushSubscription`](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription)\n * instance.\n *\n * <code-example path=\"service-worker/push/module.ts\" region=\"subscribe-to-push\"\n * header=\"app.component.ts\"></code-example>\n *\n * A request is rejected if the user denies permission, or if the browser\n * blocks or does not support the Push API or ServiceWorkers.\n * Check `SwPush.isEnabled` to confirm status.\n *\n * Invoke Push Notifications by pushing a message with the following payload.\n *\n * ```ts\n * {\n *   \"notification\": {\n *     \"actions\": NotificationAction[],\n *     \"badge\": USVString,\n *     \"body\": DOMString,\n *     \"data\": any,\n *     \"dir\": \"auto\"|\"ltr\"|\"rtl\",\n *     \"icon\": USVString,\n *     \"image\": USVString,\n *     \"lang\": DOMString,\n *     \"renotify\": boolean,\n *     \"requireInteraction\": boolean,\n *     \"silent\": boolean,\n *     \"tag\": DOMString,\n *     \"timestamp\": DOMTimeStamp,\n *     \"title\": DOMString,\n *     \"vibrate\": number[]\n *   }\n * }\n * ```\n *\n * Only `title` is required. See `Notification`\n * [instance\n * properties](https://developer.mozilla.org/en-US/docs/Web/API/Notification#Instance_properties).\n *\n * While the subscription is active, Service Worker listens for\n * [PushEvent](https://developer.mozilla.org/en-US/docs/Web/API/PushEvent)\n * occurrences and creates\n * [Notification](https://developer.mozilla.org/en-US/docs/Web/API/Notification)\n * instances in response.\n *\n * Unsubscribe using `SwPush.unsubscribe()`.\n *\n * An application can subscribe to `SwPush.notificationClicks` observable to be notified when a user\n * clicks on a notification. For example:\n *\n * <code-example path=\"service-worker/push/module.ts\" region=\"subscribe-to-notification-clicks\"\n * header=\"app.component.ts\"></code-example>\n *\n * You can read more on handling notification clicks in the [Service worker notifications\n * guide](guide/service-worker-notifications).\n *\n * @see [Push Notifications](https://developers.google.com/web/fundamentals/codelabs/push-notifications/)\n * @see [Angular Push Notifications](https://blog.angular-university.io/angular-push-notifications/)\n * @see [MDN: Push API](https://developer.mozilla.org/en-US/docs/Web/API/Push_API)\n * @see [MDN: Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API)\n * @see [MDN: Web Push API Notifications best practices](https://developer.mozilla.org/en-US/docs/Web/API/Push_API/Best_Practices)\n *\n * @publicApi\n */\nclass SwPush {\n    constructor(sw) {\n        this.sw = sw;\n        this.subscriptionChanges = new Subject();\n        if (!sw.isEnabled) {\n            this.messages = NEVER;\n            this.notificationClicks = NEVER;\n            this.subscription = NEVER;\n            return;\n        }\n        this.messages = this.sw.eventsOfType('PUSH').pipe(map(message => message.data));\n        this.notificationClicks =\n            this.sw.eventsOfType('NOTIFICATION_CLICK').pipe(map((message) => message.data));\n        this.pushManager = this.sw.registration.pipe(map(registration => registration.pushManager));\n        const workerDrivenSubscriptions = this.pushManager.pipe(switchMap(pm => pm.getSubscription()));\n        this.subscription = merge(workerDrivenSubscriptions, this.subscriptionChanges);\n    }\n    /**\n     * True if the Service Worker is enabled (supported by the browser and enabled via\n     * `ServiceWorkerModule`).\n     */\n    get isEnabled() {\n        return this.sw.isEnabled;\n    }\n    /**\n     * Subscribes to Web Push Notifications,\n     * after requesting and receiving user permission.\n     *\n     * @param options An object containing the `serverPublicKey` string.\n     * @returns A Promise that resolves to the new subscription object.\n     */\n    requestSubscription(options) {\n        if (!this.sw.isEnabled) {\n            return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n        }\n        const pushOptions = { userVisibleOnly: true };\n        let key = this.decodeBase64(options.serverPublicKey.replace(/_/g, '/').replace(/-/g, '+'));\n        let applicationServerKey = new Uint8Array(new ArrayBuffer(key.length));\n        for (let i = 0; i < key.length; i++) {\n            applicationServerKey[i] = key.charCodeAt(i);\n        }\n        pushOptions.applicationServerKey = applicationServerKey;\n        return this.pushManager.pipe(switchMap(pm => pm.subscribe(pushOptions)), take(1))\n            .toPromise()\n            .then(sub => {\n            this.subscriptionChanges.next(sub);\n            return sub;\n        });\n    }\n    /**\n     * Unsubscribes from Service Worker push notifications.\n     *\n     * @returns A Promise that is resolved when the operation succeeds, or is rejected if there is no\n     *          active subscription or the unsubscribe operation fails.\n     */\n    unsubscribe() {\n        if (!this.sw.isEnabled) {\n            return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n        }\n        const doUnsubscribe = (sub) => {\n            if (sub === null) {\n                throw new Error('Not subscribed to push notifications.');\n            }\n            return sub.unsubscribe().then(success => {\n                if (!success) {\n                    throw new Error('Unsubscribe failed!');\n                }\n                this.subscriptionChanges.next(null);\n            });\n        };\n        return this.subscription.pipe(take(1), switchMap(doUnsubscribe)).toPromise();\n    }\n    decodeBase64(input) {\n        return atob(input);\n    }\n}\nSwPush.ɵfac = function SwPush_Factory(t) { return new (t || SwPush)(ɵngcc0.ɵɵinject(NgswCommChannel)); };\nSwPush.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: SwPush, factory: SwPush.ɵfac });\nSwPush.ctorParameters = () => [\n    { type: NgswCommChannel }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(SwPush, [{\n        type: Injectable\n    }], function () { return [{ type: NgswCommChannel }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Subscribe to update notifications from the Service Worker, trigger update\n * checks, and forcibly activate updates.\n *\n * @see {@link guide/service-worker-communications Service worker communication guide}\n *\n * @publicApi\n */\nclass SwUpdate {\n    constructor(sw) {\n        this.sw = sw;\n        if (!sw.isEnabled) {\n            this.available = NEVER;\n            this.activated = NEVER;\n            this.unrecoverable = NEVER;\n            return;\n        }\n        this.available = this.sw.eventsOfType('UPDATE_AVAILABLE');\n        this.activated = this.sw.eventsOfType('UPDATE_ACTIVATED');\n        this.unrecoverable = this.sw.eventsOfType('UNRECOVERABLE_STATE');\n    }\n    /**\n     * True if the Service Worker is enabled (supported by the browser and enabled via\n     * `ServiceWorkerModule`).\n     */\n    get isEnabled() {\n        return this.sw.isEnabled;\n    }\n    checkForUpdate() {\n        if (!this.sw.isEnabled) {\n            return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n        }\n        const statusNonce = this.sw.generateNonce();\n        return this.sw.postMessageWithStatus('CHECK_FOR_UPDATES', { statusNonce }, statusNonce);\n    }\n    activateUpdate() {\n        if (!this.sw.isEnabled) {\n            return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n        }\n        const statusNonce = this.sw.generateNonce();\n        return this.sw.postMessageWithStatus('ACTIVATE_UPDATE', { statusNonce }, statusNonce);\n    }\n}\nSwUpdate.ɵfac = function SwUpdate_Factory(t) { return new (t || SwUpdate)(ɵngcc0.ɵɵinject(NgswCommChannel)); };\nSwUpdate.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: SwUpdate, factory: SwUpdate.ɵfac });\nSwUpdate.ctorParameters = () => [\n    { type: NgswCommChannel }\n];\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(SwUpdate, [{\n        type: Injectable\n    }], function () { return [{ type: NgswCommChannel }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Token that can be used to provide options for `ServiceWorkerModule` outside of\n * `ServiceWorkerModule.register()`.\n *\n * You can use this token to define a provider that generates the registration options at runtime,\n * for example via a function call:\n *\n * {@example service-worker/registration-options/module.ts region=\"registration-options\"\n *     header=\"app.module.ts\"}\n *\n * @publicApi\n */\nclass SwRegistrationOptions {\n}\nconst SCRIPT = new InjectionToken('NGSW_REGISTER_SCRIPT');\nfunction ngswAppInitializer(injector, script, options, platformId) {\n    const initializer = () => {\n        if (!(isPlatformBrowser(platformId) && ('serviceWorker' in navigator) &&\n            options.enabled !== false)) {\n            return;\n        }\n        // Wait for service worker controller changes, and fire an INITIALIZE action when a new SW\n        // becomes active. This allows the SW to initialize itself even if there is no application\n        // traffic.\n        navigator.serviceWorker.addEventListener('controllerchange', () => {\n            if (navigator.serviceWorker.controller !== null) {\n                navigator.serviceWorker.controller.postMessage({ action: 'INITIALIZE' });\n            }\n        });\n        let readyToRegister$;\n        if (typeof options.registrationStrategy === 'function') {\n            readyToRegister$ = options.registrationStrategy();\n        }\n        else {\n            const [strategy, ...args] = (options.registrationStrategy || 'registerWhenStable:30000').split(':');\n            switch (strategy) {\n                case 'registerImmediately':\n                    readyToRegister$ = of(null);\n                    break;\n                case 'registerWithDelay':\n                    readyToRegister$ = delayWithTimeout(+args[0] || 0);\n                    break;\n                case 'registerWhenStable':\n                    readyToRegister$ = !args[0] ? whenStable(injector) :\n                        merge(whenStable(injector), delayWithTimeout(+args[0]));\n                    break;\n                default:\n                    // Unknown strategy.\n                    throw new Error(`Unknown ServiceWorker registration strategy: ${options.registrationStrategy}`);\n            }\n        }\n        // Don't return anything to avoid blocking the application until the SW is registered.\n        // Also, run outside the Angular zone to avoid preventing the app from stabilizing (especially\n        // given that some registration strategies wait for the app to stabilize).\n        // Catch and log the error if SW registration fails to avoid uncaught rejection warning.\n        const ngZone = injector.get(NgZone);\n        ngZone.runOutsideAngular(() => readyToRegister$.pipe(take(1)).subscribe(() => navigator.serviceWorker.register(script, { scope: options.scope })\n            .catch(err => console.error('Service worker registration failed with:', err))));\n    };\n    return initializer;\n}\nfunction delayWithTimeout(timeout) {\n    return of(null).pipe(delay(timeout));\n}\nfunction whenStable(injector) {\n    const appRef = injector.get(ApplicationRef);\n    return appRef.isStable.pipe(filter(stable => stable));\n}\nfunction ngswCommChannelFactory(opts, platformId) {\n    return new NgswCommChannel(isPlatformBrowser(platformId) && opts.enabled !== false ? navigator.serviceWorker :\n        undefined);\n}\n/**\n * @publicApi\n */\nclass ServiceWorkerModule {\n    /**\n     * Register the given Angular Service Worker script.\n     *\n     * If `enabled` is set to `false` in the given options, the module will behave as if service\n     * workers are not supported by the browser, and the service worker will not be registered.\n     */\n    static register(script, opts = {}) {\n        return {\n            ngModule: ServiceWorkerModule,\n            providers: [\n                { provide: SCRIPT, useValue: script },\n                { provide: SwRegistrationOptions, useValue: opts },\n                {\n                    provide: NgswCommChannel,\n                    useFactory: ngswCommChannelFactory,\n                    deps: [SwRegistrationOptions, PLATFORM_ID]\n                },\n                {\n                    provide: APP_INITIALIZER,\n                    useFactory: ngswAppInitializer,\n                    deps: [Injector, SCRIPT, SwRegistrationOptions, PLATFORM_ID],\n                    multi: true,\n                },\n            ],\n        };\n    }\n}\nServiceWorkerModule.ɵfac = function ServiceWorkerModule_Factory(t) { return new (t || ServiceWorkerModule)(); };\nServiceWorkerModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: ServiceWorkerModule });\nServiceWorkerModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [SwPush, SwUpdate] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ServiceWorkerModule, [{\n        type: NgModule,\n        args: [{\n                providers: [SwPush, SwUpdate]\n            }]\n    }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ServiceWorkerModule, SwPush, SwRegistrationOptions, SwUpdate, NgswCommChannel as ɵangular_packages_service_worker_service_worker_a, SCRIPT as ɵangular_packages_service_worker_service_worker_b, ngswAppInitializer as ɵangular_packages_service_worker_service_worker_c, ngswCommChannelFactory as ɵangular_packages_service_worker_service_worker_d };\n\n","import { Subject } from '../Subject';\nimport { multicast } from './multicast';\nexport function publish(selector) {\n    return selector ?\n        multicast(() => new Subject(), selector) :\n        multicast(new Subject());\n}\n","import { NgModule } from '@angular/core';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\nimport { HttpClientModule } from '@angular/common/http';\r\n\r\nimport { AppRoutingModule } from './app-routing.module';\r\nimport { AppComponent } from './app.component';\r\nimport { DashboardComponent } from './dashboard/dashboard.component';\r\nimport { NgbModule } from '@ng-bootstrap/ng-bootstrap';\r\nimport { SlickCarouselModule } from 'ngx-slick-carousel';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { ToastComponent } from './toast/toast.component';\r\nimport { ServiceWorkerModule } from '@angular/service-worker';\r\nimport { environment } from '../environments/environment';\r\n\r\n@NgModule({\r\n  declarations: [\r\n    AppComponent,\r\n    DashboardComponent,\r\n    ToastComponent,\r\n  ],\r\n  imports: [\r\n    BrowserModule,\r\n    AppRoutingModule,\r\n    FormsModule,\r\n    ReactiveFormsModule,\r\n    HttpClientModule,\r\n    NgbModule,\r\n    SlickCarouselModule,\r\n    ServiceWorkerModule.register('ngsw-worker.js', {\r\n      enabled: environment.production,\r\n      registrationStrategy: 'registerWhenStable:30000'\r\n    })\r\n  ],\r\n  providers: [],\r\n  bootstrap: [AppComponent],\r\n  exports: [ToastComponent]\r\n})\r\nexport class AppModule { }\r\n","export const environment = {\n  production: true\n};\n","import { enableProdMode } from '@angular/core';\r\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\n\r\nimport { AppModule } from './app/app.module';\r\nimport { environment } from './environments/environment';\r\n\r\nif (environment.production) {\r\n  enableProdMode();\r\n}\r\n\r\nplatformBrowserDynamic().bootstrapModule(AppModule)\r\n  .catch(err => console.error(err));\r\n"],"sourceRoot":"webpack:///","file":"main.6c9f7627902c4fd0c74f.js"}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists